/* ============================================================================
   FINDOMBOOK - LUX THEME (cyberpunk / holographic)
   File: /var/www/html/theme_lux.css
   Loaded AFTER feed_style.css so it overrides the palette and the effects.

   Design goals
     * neon that pulses from BLUE to PURPLE
     * holographic, semi transparent, "3D" cards with a mouse-over sheen
     * READABILITY FIRST on the small FindomPhone MOAP screen (about 500x700):
       under 900px we switch to a single column, bigger text, no blur (blur is
       expensive in the SL viewer), bigger tap targets.

   Performance notes (important for MOAP):
     * only transforms / opacity / background-position are animated (GPU cheap)
     * backdrop-filter is used on desktop only and disabled on small screens
     * every animation can be switched off with prefers-reduced-motion
   ========================================================================== */

:root {
    --bg:        #05030c;
    --ink:       #eef1ff;
    --muted:     #9aa3c9;
    --pink:      #ff2fb0;
    --cyan:      #38d9ff;          /* keept the old names: every page uses them */
    --blue:      #2ad4ff;
    --violet:    #a45cff;
    --purple:    #6f2ff7;
    --glass:     rgba(16, 12, 34, 0.62);
    --glass-2:   rgba(28, 16, 58, 0.55);
    --line:      rgba(122, 214, 255, 0.28);
    --shadow:    0 18px 40px rgba(0, 0, 0, 0.55);
    --radius:    18px;
}

/* ------------------------------------------------------------------ canvas -- */
body {
    background-color: var(--bg);
    color: var(--ink);
    background-image:
        radial-gradient(900px 500px at 12% -10%, rgba(42, 212, 255, 0.20), transparent 60%),
        radial-gradient(900px 600px at 92% 8%,   rgba(164, 92, 255, 0.22), transparent 62%),
        radial-gradient(700px 700px at 50% 110%, rgba(111, 47, 247, 0.18), transparent 60%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 3px);
    background-attachment: fixed;
    background-size: 140% 140%, 140% 140%, 140% 140%, auto;
    animation: luxDrift 26s ease-in-out infinite alternate;
}

@keyframes luxDrift {
    from { background-position: 0% 0%, 100% 0%, 50% 100%, 0 0; }
    to   { background-position: 18% 8%, 82% 10%, 46% 92%, 0 0; }
}

/* --------------------------------------------------------------- the title -- */
h1.title {
    background: linear-gradient(90deg, var(--blue), var(--violet), var(--pink), var(--blue));
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    letter-spacing: 6px;
    text-shadow: none;
    animation: luxHue 8s linear infinite, luxGlow 3.6s ease-in-out infinite;
}

@keyframes luxHue  { from { background-position: 0% 50%; } to { background-position: 300% 50%; } }
@keyframes luxGlow { 0%, 100% { filter: drop-shadow(0 0 8px rgba(42, 212, 255, 0.55)); }
                     50%      { filter: drop-shadow(0 0 18px rgba(164, 92, 255, 0.75)); } }

/* ------------------------------------------------- holographic glass cards -- */
.glass, .glass-pink, .glass-panel, .card, .post-card {
    position: relative;
    background:
        linear-gradient(150deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.015) 38%, transparent 60%),
        linear-gradient(180deg, var(--glass-2), var(--glass));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(14px) saturate(130%);
    -webkit-backdrop-filter: blur(14px) saturate(130%);
    transform: translateZ(0);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
    animation: luxPulse 5.2s ease-in-out infinite;
    overflow: hidden;
}

/* iridescent top edge (blue -> purple), pure gradient: cheap and pretty */
.glass::before, .glass-pink::before, .glass-panel::before, .post-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--blue), var(--violet), var(--pink), transparent);
    opacity: 0.85;
    pointer-events: none;
}

/* the lazy sheen that slides across the card on hover */
.glass::after, .glass-pink::after, .glass-panel::after, .post-card::after {
    content: "";
    position: absolute;
    top: -60%;
    left: -70%;
    width: 45%;
    height: 220%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.13), transparent);
    transform: rotate(12deg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

@keyframes luxPulse {
    0%, 100% { box-shadow: var(--shadow), 0 0 14px rgba(42, 212, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
    50%      { box-shadow: var(--shadow), 0 0 26px rgba(164, 92, 255, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
}

.glass:hover, .glass-pink:hover, .glass-panel:hover, .card:hover, .post-card:hover {
    transform: translateY(-6px) scale(1.008);
    border-color: rgba(164, 92, 255, 0.65);
    box-shadow: 0 26px 55px rgba(0, 0, 0, 0.6), 0 0 30px rgba(122, 92, 255, 0.35);
}

.glass:hover::after, .glass-pink:hover::after, .glass-panel:hover::after, .post-card:hover::after {
    opacity: 1;
    animation: luxSheen 0.9s ease forwards;
}

@keyframes luxSheen { from { left: -70%; } to { left: 130%; } }

.glass-pink { border-color: rgba(255, 47, 176, 0.42); }

/* --------------------------------------------------------------- avatars ---- */
.avatar {
    border: 2px solid transparent;
    background-image: linear-gradient(var(--bg), var(--bg)),
                      conic-gradient(from 0deg, var(--blue), var(--violet), var(--pink), var(--blue));
    background-origin: border-box;
    background-clip: content-box, border-box;
    box-shadow: 0 0 16px rgba(122, 92, 255, 0.45);
}

/* --------------------------------------------------------------- buttons ---- */
.btn-pink, button[type="submit"], .btn {
    background: linear-gradient(120deg, var(--blue), var(--violet) 55%, var(--pink));
    background-size: 200% 100%;
    color: #0a0616;
    border: 0;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 11px 18px;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(111, 47, 247, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-position 0.6s ease;
}

.btn-pink:hover, button[type="submit"]:hover, .btn:hover {
    transform: translateY(-2px);
    background-position: 100% 0;
    box-shadow: 0 14px 34px rgba(42, 212, 255, 0.42);
}

.btn-outline, .btn-ghost {
    background: rgba(42, 212, 255, 0.06);
    color: var(--cyan);
    border: 1px solid rgba(42, 212, 255, 0.55);
    border-radius: 999px;
    padding: 8px 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.22s ease;
}

.btn-outline:hover, .btn-ghost:hover {
    color: #06121a;
    background: var(--cyan);
    box-shadow: 0 0 22px rgba(42, 212, 255, 0.55);
}

input, select, textarea {
    background: rgba(6, 4, 16, 0.72);
    border: 1px solid rgba(122, 214, 255, 0.30);
    color: var(--ink);
    border-radius: 12px;
    padding: 11px 13px;
    font-family: inherit;
    font-size: 14px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--violet);
    box-shadow: 0 0 0 3px rgba(164, 92, 255, 0.22);
}

/* ---------------------------------------------------------- post specifics -- */
.post-card { padding: 16px; }

.post-text {
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
    margin: 10px 0;
    overflow-wrap: anywhere;
}

.post-img {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(122, 214, 255, 0.22);
    margin-bottom: 10px;
}

.post-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.6px;
    border: 1px solid rgba(122, 214, 255, 0.35);
    background: rgba(42, 212, 255, 0.07);
    color: var(--cyan);
    cursor: pointer;
    transition: all 0.2s ease;
}

.chip:hover {
    transform: translateY(-2px);
    border-color: var(--violet);
    color: #fff;
    box-shadow: 0 0 18px rgba(164, 92, 255, 0.45);
}

.chip.liked { background: rgba(255, 47, 176, 0.16); border-color: var(--pink); color: #ffd9f0; }

/* ------------------------------------------------------------- comments ----- */
.comments {
    margin-top: 12px;
    border-top: 1px solid rgba(122, 214, 255, 0.16);
    padding-top: 10px;
}

.comment {
    display: flex;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 12px;
    border-left: 2px solid rgba(164, 92, 255, 0.55);
    background: rgba(255, 255, 255, 0.022);
    margin-bottom: 7px;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.comment:hover {
    background: rgba(164, 92, 255, 0.09);
    transform: translateX(3px);
    border-left-color: var(--pink);
}

.comment .who { font-size: 12px; font-weight: 800; color: var(--cyan); letter-spacing: 0.4px; }
.comment .when { font-size: 10px; color: var(--muted); margin-left: 6px; }
.comment .body { font-size: 13px; line-height: 1.45; margin-top: 2px; overflow-wrap: anywhere; }
.comment .reply-link {
    font-size: 10px; color: var(--violet); cursor: pointer; text-transform: uppercase;
    letter-spacing: 1px; margin-top: 4px; display: inline-block;
}
.comment .reply-link:hover { color: var(--pink); text-shadow: 0 0 8px rgba(255, 47, 176, 0.6); }
.comment.reply { margin-left: 26px; border-left-color: rgba(42, 212, 255, 0.5); background: rgba(42, 212, 255, 0.03); }

.comment-form { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; margin-top: 10px; }
.comment-form textarea { flex: 1 1 auto; min-width: 0; min-height: 44px; resize: vertical; }

/* the send button must stay SMALL: the writing box is what has to be visible
   (the old stylesheet forces width:100% on .btn-pink, which squeezed the textarea) */
.comment-form .btn-send,
.btn-send {
    width: auto !important;
    flex: 0 0 auto;
    padding: 9px 18px;
    min-height: 38px;
    font-size: 12px;
}

.more-comments {
    font-size: 11px; color: var(--violet); cursor: pointer; letter-spacing: 0.8px;
    text-transform: uppercase; margin-bottom: 8px; display: inline-block;
}
.more-comments:hover { color: var(--cyan); }

/* ------------------------------------------------------------- slideshow ---- */
.slideshow, .slide { border-radius: 14px; }
.slide-cap { background: linear-gradient(0deg, rgba(5, 3, 12, 0.92), transparent); color: var(--cyan); }

/* ----------------------------------------------------------- small screens -- */
/* The FindomPhone HUD shows the site in roughly 500x700 pixels: single column,
   bigger text, no blur, bigger buttons. */
@media (max-width: 900px) {
    :root { --radius: 16px; }

    body { animation: none; background-size: 100% 100%, 100% 100%, 100% 100%, auto; }

    h1.title { font-size: 20px; letter-spacing: 4px; margin: 8px 0 12px 0; }

    .app-container {
        flex-direction: column;
        padding: 10px;
        gap: 12px;
        width: 100%;
        max-width: 100%;
    }

    .side-col, .main-col { max-width: 100%; width: 100%; flex: none; }

    /* the chat iframe must not eat the whole screen on the phone */
    .side-col .glass iframe, .chat-frame { height: 300px !important; }

    .glass, .glass-pink, .glass-panel, .card, .post-card {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
        padding: 14px;
    }

    /* the pointer DOES reach the MOAP surface, so the hover effects stay:
       only the blur (expensive in the viewer) is dropped. */
    .glass:hover, .glass-pink:hover, .glass-panel:hover, .card:hover, .post-card:hover {
        transform: translateY(-4px) scale(1.006);
    }

    .post-text { font-size: 15px; }
    .comment .body { font-size: 14px; }
    .comment .who { font-size: 13px; }

    /* comfortable click targets */
    .btn-pink, button[type="submit"], .btn, .btn-outline, .btn-ghost, .chip {
        min-height: 40px;
        font-size: 13px;
    }

    .avatar { width: 44px; height: 44px; }

    /* comment form: box on top, small button under it, aligned to the right */
    .comment-form { flex-direction: column; }
    .comment-form textarea { width: 100%; min-height: 52px; }
    .comment-form .btn-send, .btn-send {
        width: auto !important;
        align-self: flex-end;
        min-height: 36px;
        padding: 8px 20px;
        font-size: 12px;
    }
}

/* Respect the user/viewer preference: everything becomes static. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============================================================================
   AMBIENT EFFECTS - floating butterflies, glitter, soft logo watermark
   Endpoint: lux_fx.php  (disable with feed.php?fx=off)
   Only transform / opacity / background-position are animated: cheap for MOAP.
   ========================================================================== */

.lux-fx {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;         /* never steals a click */
}

/* everything except the effects layer stays above it */
body > *:not(.lux-fx) { position: relative; z-index: 2; }

/* the logo: black background vanishes thanks to screen blending, gold glows */
.lux-logo {
    position: absolute;
    left: 50%;
    top: 46%;
    width: min(46vw, 420px);
    height: min(46vw, 420px);
    transform: translate(-50%, -50%);
    background: url('assets/nsb_logo_transparent.png') center / contain no-repeat;
    mix-blend-mode: screen;
    opacity: 0.16;
    animation: luxLogoBreath 14s ease-in-out infinite;
}

@keyframes luxLogoBreath {
    0%, 100% { opacity: 0.11; transform: translate(-50%, -50%) scale(1); }
    50%      { opacity: 0.20; transform: translate(-50%, -50%) scale(1.04); }
}

/* glitter: two dotted layers that drift and twinkle */
.lux-glitter {
    position: absolute;
    inset: -25%;
    background-image:
        radial-gradient(1.6px 1.6px at 12% 22%, rgba(255,255,255,0.95), transparent 60%),
        radial-gradient(1.4px 1.4px at 68% 12%, rgba(164,92,255,0.95), transparent 60%),
        radial-gradient(1.8px 1.8px at 82% 58%, rgba(42,212,255,0.90), transparent 60%),
        radial-gradient(1.2px 1.2px at 34% 74%, rgba(255,255,255,0.85), transparent 60%),
        radial-gradient(1.5px 1.5px at 52% 44%, rgba(255,47,176,0.85), transparent 60%),
        radial-gradient(1.3px 1.3px at 6% 62%, rgba(42,212,255,0.80), transparent 60%),
        radial-gradient(1.7px 1.7px at 92% 86%, rgba(255,255,255,0.85), transparent 60%),
        radial-gradient(1.2px 1.2px at 26% 8%, rgba(164,92,255,0.85), transparent 60%);
    background-size: 300px 300px;
    opacity: 0.55;
    animation: luxTwinkle 5.5s ease-in-out infinite alternate, luxDriftG 60s linear infinite;
}

.lux-glitter.g2 {
    background-size: 460px 460px;
    opacity: 0.35;
    animation: luxTwinkle 8.5s ease-in-out infinite alternate-reverse, luxDriftG 95s linear infinite reverse;
}

@keyframes luxTwinkle { from { opacity: 0.22; } to { opacity: 0.62; } }
@keyframes luxDriftG {
    from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
    to   { background-position: 300px 180px, -240px 260px, 180px -220px, -300px -160px,
                                260px 300px, -180px 120px, 220px -280px, -260px 340px; }
}

/* ------------------------------------------------------------- butterflies -- */
.bfly {
    position: absolute;
    width: 30px;
    height: 24px;
    opacity: 0.85;
    filter: drop-shadow(0 0 6px rgba(164, 92, 255, 0.55));
}

.bfly .w {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at 72% 45%, rgba(255, 214, 140, 0.95), rgba(164, 92, 255, 0.55) 55%, rgba(42, 212, 255, 0.15) 78%, transparent 82%);
    border-radius: 62% 38% 58% 42% / 72% 68% 32% 28%;
}

.bfly .w.l { left: 0;  transform-origin: right center; animation: luxFlapL 0.48s ease-in-out infinite alternate; }
.bfly .w.r { right: 0; transform-origin: left center;  animation: luxFlapR 0.48s ease-in-out infinite alternate; }

.bfly::after {                    /* body */
    content: "";
    position: absolute;
    left: 50%;
    top: 12%;
    width: 2px;
    height: 76%;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(-50%);
}

@keyframes luxFlapL { from { transform: scaleX(1); } to { transform: scaleX(0.26); } }
@keyframes luxFlapR { from { transform: scaleX(1); } to { transform: scaleX(0.26); } }

/* six lazy flight paths */
.bfly.b1 { top: 12%; animation: luxFly1 38s linear infinite; }
.bfly.b2 { top: 34%; transform: scale(0.8);  animation: luxFly2 47s linear infinite 3s; }
.bfly.b3 { top: 58%; transform: scale(1.15); animation: luxFly3 42s linear infinite 7s; }
.bfly.b4 { top: 72%; transform: scale(0.7);  animation: luxFly4 55s linear infinite 1s; }
.bfly.b5 { top: 22%; transform: scale(0.9);  animation: luxFly5 51s linear infinite 12s; }
.bfly.b6 { top: 86%; transform: scale(1.05); animation: luxFly6 44s linear infinite 5s; }

@keyframes luxFly1 {
    0%   { left: -8%;  margin-top: 0; }
    25%  { left: 22%;  margin-top: -6vh; }
    50%  { left: 52%;  margin-top: 5vh; }
    75%  { left: 78%;  margin-top: -4vh; }
    100% { left: 108%; margin-top: 3vh; }
}
@keyframes luxFly2 {
    0%   { left: 108%; margin-top: 0; }
    30%  { left: 70%;  margin-top: 7vh; }
    60%  { left: 38%;  margin-top: -5vh; }
    100% { left: -10%; margin-top: 4vh; }
}
@keyframes luxFly3 {
    0%   { left: -10%; margin-top: 4vh; }
    40%  { left: 40%;  margin-top: -7vh; }
    70%  { left: 72%;  margin-top: 6vh; }
    100% { left: 110%; margin-top: -2vh; }
}
@keyframes luxFly4 {
    0%   { left: 110%; margin-top: 0; }
    50%  { left: 45%;  margin-top: -8vh; }
    100% { left: -12%; margin-top: 6vh; }
}
@keyframes luxFly5 {
    0%   { left: -12%; margin-top: -3vh; }
    45%  { left: 50%;  margin-top: 8vh; }
    100% { left: 112%; margin-top: -5vh; }
}
@keyframes luxFly6 {
    0%   { left: 112%; margin-top: 2vh; }
    55%  { left: 42%;  margin-top: -9vh; }
    100% { left: -14%; margin-top: 5vh; }
}

/* --------------------------------------------------------------- sparkles --- */
.spark {
    position: absolute;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, #fff 0%, rgba(255, 255, 255, 0.65) 30%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    animation: luxSpark 7s ease-in-out infinite;
}
.spark::before, .spark::after {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 45%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #fff, transparent);
}
.spark::after {
    left: 45%; right: auto; top: 0; bottom: 0;
    width: 1px; height: auto;
    background: linear-gradient(180deg, transparent, #fff, transparent);
}

.spark.s1 { left: 18%; top: 26%; animation-delay: 0s; }
.spark.s2 { left: 74%; top: 18%; animation-delay: 1.7s; }
.spark.s3 { left: 62%; top: 66%; animation-delay: 3.1s; }
.spark.s4 { left: 30%; top: 82%; animation-delay: 4.6s; }

@keyframes luxSpark {
    0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); }
    45%      { opacity: 0.95; transform: scale(1.25) rotate(35deg); }
    60%      { opacity: 0.5; transform: scale(0.9) rotate(50deg); }
}

/* ------------------------------------------- small screens (MOAP): calmer --- */
@media (max-width: 900px) {
    .lux-logo { width: min(70vw, 330px); height: min(70vw, 330px); opacity: 0.13; }
    .bfly { width: 22px; height: 18px; opacity: 0.7; }
    .lux-glitter { opacity: 0.42; }
    .lux-glitter.g2 { display: none; }              /* one glitter layer is enough */
    .spark.s3, .spark.s4 { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .lux-fx { display: none; }
}
