:root{
    --bg-0:#0e0e10;
    --bg-grid: rgba(255,255,255,0.04);
    --panel:#1a1a1d;
    --panel-edge:#2a2a2f;
    --text:#e6e6e6;
    --text-dim:#a0a0a6;
    --accent:#bdbdbd;
    --accent-2:#8a8a8a;
    --radius:10px;
    --dock-h:64px;
    --topbar-h:34px;
    --ease:cubic-bezier(.16,1,.3,1);

    /* single source of truth for dock icon size, drives everything below */
    --dock-size:40px;

    /* single source of truth for desktop file-icon size */
    --icon-size:100px;

    /* darkens the desktop background gif — tweak the alpha to taste */
    --bg-overlay: rgba(0,0,0,0.2);
}

*{box-sizing:border-box;}
html,body{margin:0;height:100%;overflow:hidden;}
body{margin:0;height:100vh;font-family:"DM Sans", sans-serif;color:var(--text);}

#desktop{
    width:100%;
    height:100%;
    position:relative;
    overflow:hidden;
  }
  
  div, section {
    max-width: none !important;
    max-height: none !important;
  }
  #desktop::before{
    content:"";
    position:absolute;
    inset:0;
  
    background-image:
      linear-gradient(var(--bg-overlay), var(--bg-overlay)),
      url("assets/compressed-1782094307541.gif");
    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;
  
    transform:scaleX(-1);
    z-index:-1;
}

/* ambient glow layer */
#desktop::after{
    content:"";
    position:absolute;
    inset:-20%;

    background:
      radial-gradient(
        circle at center,
        rgba(255,255,255,0.12) 0%,
        rgba(255,255,255,0.04) 25%,
        transparent 60%
      );

    opacity:0;
    pointer-events:none;
    mix-blend-mode:screen;

    animation:backgroundGlow 24s infinite ease-in-out;
}

@keyframes backgroundGlow{
    0%, 8%, 100%{
        opacity:0;
        transform:scale(1);
    }

    10%{
        opacity:.25;
        transform:scale(1.05);
    }

    15%{
        opacity:0;
        transform:scale(1.1);
    }

    45%{
        opacity:0;
    }

    50%{
        opacity:.18;
        transform:scale(1.03);
    }

    55%{
        opacity:0;
        transform:scale(1.08);
    }
}

/* ============================================================
   ICON RAIL — now an absolute-positioned cluster instead of a
   grid, so each PNG shard can sit at its own offset like the
   reference (pink top, gold upper-right, blue lower-right,
   purple lower-left). Position every icon by editing its
   `left`/`top` inline values in script.js, not here.
============================================================ */
#icon-rail{
    position:absolute;
    top:0; left:0;
    width:420px;
    height:480px;
    z-index:2;
}
.file-icon{
    position:absolute;
    width:var(--icon-size);
    background:transparent;
    border:none;
    padding:0;
    display:flex;flex-direction:column;align-items:center;
    cursor:pointer;
    color:var(--text);
    -webkit-tap-highlight-color:transparent;
}
.file-icon .glyph{
    width:var(--icon-size);
    height:var(--icon-size);
    display:flex;align-items:center;justify-content:center;
    transition:transform .18s var(--ease), filter .18s var(--ease);
}
/* PNGs are the icon now — no background chip behind them */
.file-icon .glyph img{
    width:100%;
    height:100%;
    object-fit:contain;
    display:block;
    filter:drop-shadow(0 6px 14px rgba(0,0,0,.45));
}
.file-icon span.label{
    margin-top:4px;
    font-size:11px;
    color:var(--text-dim);
    text-shadow:0 1px 3px rgba(0,0,0,.6);
}
.file-icon:hover .glyph{
    animation:none;
    transform:translateY(-6px) scale(1.07);
}
.file-icon:focus-visible .glyph{outline:2px solid var(--accent);outline-offset:4px;border-radius:6px;}

/* ============================================================
   ICON LAUNCH BOUNCE — quick mac-style jump played by adding
   .icon-launch-bounce to a button via JS (bounceIconFor in
   script.js). Self-removing: script.js strips the class once
   the animation finishes, so it's ready to replay instantly.
============================================================ */
@keyframes iconLaunchBounce{
    0%   { transform: translateY(0) scale(1); }
    30%  { transform: translateY(-20px) scale(1.08); }
    50%  { transform: translateY(0) scale(0.95); }
    70%  { transform: translateY(-7px) scale(1.02); }
    100% { transform: translateY(0) scale(1); }
}
.icon-launch-bounce{
    animation: iconLaunchBounce .6s cubic-bezier(.28,.84,.42,1);
    transform-origin: 50% 100%;
}

/* ============================================================
   IDLE ICON BREATHING — every desktop icon (member shards +
   util rail) gets a slow, gentle vertical float when idle, so
   the desktop feels alive even with no one touching it. Each
   icon runs its own duration/delay so nothing moves in sync.
============================================================ */
@keyframes iconBreathe{
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}


.file-icon .glyph{
    animation: iconBreathe 4.4s ease-in-out infinite;
}
#icon-rail .file-icon:nth-child(1) .glyph{ animation-duration:4.2s; animation-delay:0s;   }
#icon-rail .file-icon:nth-child(2) .glyph{ animation-duration:5.1s; animation-delay:.6s;  }
#icon-rail .file-icon:nth-child(3) .glyph{ animation-duration:4.7s; animation-delay:1.1s; }
#icon-rail .file-icon:nth-child(4) .glyph{ animation-duration:5.6s; animation-delay:.3s;  }

#util-rail{
    position:absolute;top:48px;right:34px;
    display:flex;flex-direction:column;gap:16px;z-index:2;
}
.util-btn{
    width:96px;height:auto;border-radius:14px;border:none;
    background:transparent;display:flex;flex-direction:column;align-items:center;
    gap:6px;padding:4px 0;
    cursor:pointer;color:var(--text);
}
.util-btn img{width:68px;height:68px;object-fit:contain;}
.util-btn:hover{transform:translateY(-3px);}
.util-label{
    font-family:'DM Sans', sans-serif;
    font-size:13px;
    font-weight:700;
    color:#fff;
    text-shadow:0 1px 1px rgba(0,0,0,.7), 0 0 8px rgba(0,0,0,.45);
    text-align:center;
    line-height:1.25;
    max-width:110px;
}

/* ============================================================
   WINDOWS — draggable member/utility panels. Positioned via
   inline left/top set from script.js (cascaded on open, then
   updated continuously while dragging the title bar).
============================================================ */
.window{
    position:absolute;top:90px;right:34px;width:420px;max-height:70vh;
    background:var(--panel);border:1px solid var(--panel-edge);border-radius:var(--radius);
    box-shadow:0 24px 60px -10px rgba(0,0,0,.6);
    display:flex;flex-direction:column;overflow:hidden;
    opacity:0;pointer-events:none;transform:translateY(18px) scale(.92);
    transform-origin:50% 100%;
    transition:opacity .26s ease, transform .32s cubic-bezier(.34,1.56,.64,1);
}
.window.open{opacity:1;pointer-events:auto;transform:translateY(0) scale(1);}
.window.front{z-index:20;}
.window-head{
    display:flex;justify-content:space-between;align-items:center;padding:10px 14px;
    background:#000;border-bottom:1px solid var(--panel-edge);cursor:grab;
    -webkit-user-select:none;user-select:none;
}
.window-head.dragging{cursor:grabbing;}
.window-head .title{font-family:"massilia",sans-serif;color:var(--text);}

/* The lore-video window is pinned in place — no drag affordance */
.window--fixed .window-head{
    cursor: default;
}

/* ============================================================
   LORE-VIDEO WINDOW — fixed wide/short display box, independent
   of the thumbnail PNG's actual aspect ratio (this window is
   pinned and non-resizable, so a fixed frame makes sense here
   instead of relying on the image's native dimensions).
   object-fit:cover fills the box without stretching — it crops
   slightly rather than distorting. The window itself is locked
   to this same width, and the body's padding is stripped, so
   the visible tab is always exactly the image's size — no gap,
   no overflow, no mismatch between the two.
============================================================ */
#win-video{
    width: 640px;
}
#win-video .window-body{
    padding: 0;
    overflow: hidden;
}
#win-video .member-window-img{
    width: 640px;
    height: 360px;
    max-width: none;
    max-height: none;
    object-fit: cover;
    display: block;
}

.win-controls{
    display:flex;
    align-items:center;
    gap:6px;
}
.win-btn{
    width:22px;height:22px;border-radius:50%;
    border:1px solid var(--panel-edge);
    background:transparent;
    color:var(--text-dim);
    cursor:pointer;
    font-size:14px;
    line-height:1;
    display:flex;align-items:center;justify-content:center;
    transition:background .15s, color .15s, transform .15s, border-color .15s;
}
.win-btn:hover{transform:translateY(-1px);}
.win-btn.minimize:hover{background:#ffd54d;color:#000;border-color:#ffd54d;}
.win-btn.close:hover{background:#ff4dab;color:#000;border-color:#ff4dab;}

.window-body{padding:18px;overflow-y:auto;color:var(--text-dim);font-size:14px;line-height:1.5;flex:1;min-height:0;}

/* closing gets its own quicker "poof" instead of the bouncy open curve */
.window.closing{
    transition:opacity .18s ease, transform .22s cubic-bezier(.55,0,.85,.35) !important;
    opacity:0 !important;
    transform:translateY(8px) scale(.82) !important;
}

/* disables drag/resize interference while a genie fly animation is running */
.window.genie-animating{
    pointer-events:none;
}

/* the dock chip starts invisible/tiny — it pops in only once the window
   has finished shrinking into it, so the two animations hand off cleanly */
.dock-min-chip--entering{
    opacity:0;
    transform:scale(.4);
}

/* Member windows: window shrink-wraps to the image's own size
   (capped so huge PNGs don't blow past the viewport), top bar
   only carries the exit/minimize controls. */
.window.window--portrait{
    width:auto;
    max-height:none;
}
.window.window--portrait .window-body{
    padding:0;
    overflow:hidden;
}
.member-window-img{
    display:block;
    width:auto;
    height:auto;
    max-width:min(100vw, 1500px);
    max-height:90vh;
  }
  .member-window-img{
    display:block;
    width:auto;
    height:auto;
    max-width:min(62vw, 1500px);
    max-height:100vh;
  }
  /* ============================================================
   WINDOW RESIZE HANDLE — corner grip, bottom-right. For portrait
   windows (member/help/video) JS locks the drag to the PNG's own
   width/height ratio, so the box can only scale uniformly — it
   can never squash or stretch the image.
============================================================ */
.window-resize-handle{
    position:absolute;
    right:3px;
    bottom:3px;
    width:18px;
    height:18px;
    cursor:nwse-resize;
    z-index:5;
    background:
      linear-gradient(135deg,
        transparent 0 45%,
        rgba(255,255,255,.4) 45% 55%,
        transparent 55% 65%,
        rgba(255,255,255,.4) 65% 75%,
        transparent 75% 85%,
        rgba(255,255,255,.4) 85% 95%,
        transparent 95% 100%
      );
    opacity:.7;
    transition:opacity .15s;
}
.window-resize-handle:hover{
    opacity:1;
    background:
      linear-gradient(135deg,
        transparent 0 45%,
        #ff4dab 45% 55%,
        transparent 55% 65%,
        #ff4dab 65% 75%,
        transparent 75% 85%,
        #ff4dab 85% 95%,
        transparent 95% 100%
      );
}

/* ============================================================
   DOCK MINIMIZED GROUP — minimized windows tuck directly into
   the dock itself (mac-style) instead of floating above it. A
   thin divider only appears once something's actually parked
   there, and each chip gets the little glowing dot mac uses to
   mark a running/minimized app.
============================================================ */
.dock-min-sep{
    width:0;
    height:var(--dock-size);
    margin:0;
    opacity:0;
    background:rgba(255,255,255,0.18);
    border-radius:2px;
    flex-shrink:0;
    transition:width .2s var(--ease), margin .2s var(--ease), opacity .2s var(--ease), height .08s;
}
#dock.has-minimized .dock-min-sep{
    width:1px;
    margin:0 10px;
    opacity:1;
}
.dock-minimized-group{
    display:flex;
    align-items:center;
    gap:8px;
}
.dock-min-chip{
    position:relative;
    width:var(--dock-size);
    height:var(--dock-size);
    border:none;
    background:transparent;
    border-radius:14px;
    cursor:pointer;
    display:flex;align-items:center;justify-content:center;
    flex-shrink:0;
    opacity:.6;
    transition:opacity .15s, transform .15s var(--ease);
}
.dock-min-chip img{
    width:100%;
    height:100%;
    object-fit:contain;
    display:block;
    filter:grayscale(.35);
    transition:filter .15s;
}
.dock-min-chip:hover{
    opacity:1;
    transform:translateY(-4px);
}
.dock-min-chip:hover img{
    filter:none;
}
.dock-min-chip::after{
    content:'';
    position:absolute;
    bottom:-6px;
    left:50%;
    transform:translateX(-50%);
    width:4px;
    height:4px;
    border-radius:50%;
    background:#ff4dab;
    box-shadow:0 0 6px rgba(255,77,171,.8);
}
/* ============================================================
   DOCK TOOLTIPS — macOS-style hover label above each dock icon.
============================================================ */
[data-tooltip]{
    position:relative;
}
[data-tooltip]::before,
[data-tooltip]::after{
    position:absolute;
    left:50%;
    bottom:100%;
    pointer-events:none;
    opacity:0;
    transform:translate(-50%, 4px);
    transition:opacity .12s ease, transform .12s ease;
}
[data-tooltip]::before{
    content:attr(data-tooltip);
    margin-bottom:10px;
    padding:5px 11px;
    background:rgba(28,28,30,.96);
    border:1px solid rgba(255,255,255,.1);
    border-radius:6px;
    color:#f2f2f2;
    font-family:'DM Sans', sans-serif;
    font-size:12.5px;
    font-weight:500;
    white-space:nowrap;
    box-shadow:0 6px 18px rgba(0,0,0,.4);
    z-index:60;
}
[data-tooltip]::after{
    content:'';
    margin-bottom:5px;
    border:5px solid transparent;
    border-top-color:rgba(28,28,30,.96);
    z-index:60;
}
[data-tooltip]:hover::before,
[data-tooltip]:hover::after{
    opacity:1;
    transform:translate(-50%, 0);
}
/* ============================================================
   DOCK — sized off --dock-size so the resize handle can scale
   every icon at once just by changing one CSS variable.
============================================================ */
#dock{
    position:absolute;bottom:18px;left:50%;
    transform:translateX(-50%);
    display:flex;align-items:center;gap:2px;
    padding:10px 20px;
    background:rgba(20,20,22,0.55);
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
    border:1px solid rgba(255,255,255,0.08);
    border-radius: 28px;
    box-shadow:0 18px 50px rgba(0,0,0,0.45);
    transform-origin:bottom center;
}

.dock-btn{
    width:var(--dock-size);
    height:var(--dock-size);
    border-radius:calc(var(--dock-size) * 0.22);
    border:none;
    background:transparent;
    color:var(--text);
    cursor:pointer;
    display:flex;align-items:center;justify-content:center;
    flex-shrink:0;
    transition:transform .15s var(--ease), width .08s, height .08s;
}
.dock-icon-clip{
    width:100%;
    height:100%;
    border-radius:calc(var(--dock-size) * 0.22);
    overflow:hidden;
    display:flex;align-items:center;justify-content:center;
}
.dock-btn img{
  width: var(--dock-size);
  height: var(--dock-size);
  object-fit: contain;
  display: block;
  transform: scale(var(--icon-zoom, 1.35));
  transition: transform .08s, width .08s, height .08s;
}

.dock-btn:hover{transform:translateY(-4px);}

.dock-sep{
    position:relative;
    width:1px;
    height:var(--dock-size);
    margin:0 12px;
    background:rgba(255,255,255,0.18);
    border-radius:2px;
    opacity:0.9;
    cursor:row-resize;
    flex-shrink:0;
    transition:height .08s;
}

.dock-sep::before{
    content:'';
    position:absolute;
    top:-10px;bottom:-10px;left:-8px;right:-8px;
}
.dock-sep:hover,
.dock-sep.dragging{
    box-shadow:0 0 16px rgba(0,229,255,0.9);
}

@media (prefers-reduced-motion: reduce){
    *{transition:none !important;}
}

  .file-icon .glyph img{
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform .2s var(--ease), filter .2s var(--ease);
  }
  .file-icon:hover .glyph img{
    transform: scale(1.05);
    filter:
      drop-shadow(0 0 1px  rgba(var(--glow-rgb, 255,255,255), 0.95))
      drop-shadow(0 0 4px  rgba(var(--glow-rgb, 255,255,255), 0.75))
      drop-shadow(0 0 10px rgba(var(--glow-rgb, 255,255,255), 0.4));
}


  
  /* ==========================================
PHOTOBOOK
========================================== */

#photobook-overlay{
    position:fixed;
    inset:0;
    z-index:9999;
  
    background:rgba(0,0,0,.88);
  
    display:flex;
    justify-content:center;
    align-items:center;
  
    opacity:0;
    pointer-events:none;
  
    transition:opacity .25s ease;
  }
  
  #photobook-overlay.open{
    opacity:1;
    pointer-events:auto;
  }
  
  .gallery-image{
    max-height:85vh;
    max-width:70vw;
  
    object-fit:contain;
    display:block;
  
    box-shadow:
      0 30px 80px rgba(0,0,0,.6);
  }
  
  .gallery-counter{
    position:absolute;
    top:50px;
    left:20px;
  
    font-size:24px;
    font-weight:700;
  
    color:white;
    opacity:.8;
  }
  
  .gallery-close{
    position:absolute;
    top:50px;
    right:20px;
  
    background:none;
    border:none;
  
    color:white;
    font-size:20px;
    font-weight:700;
  
    cursor:pointer;
    opacity:.7;
  }
  
  .gallery-close:hover{
    opacity:1;
  }
  
  .gallery-nav{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
  
    background:none;
    border:none;
  
    color:white;
    font-size:24px;
    font-weight:700;
  
    cursor:pointer;
  
    opacity:.6;
    transition:.2s;
  }
  
  .gallery-nav:hover{
    opacity:1;
  }
  
  .gallery-prev{
    left:24px;
  }
  
  .gallery-next{
    right:24px;
  }

/* ============================================================
   FAN PLAYLIST — same rainbow-border glass card, now with a
   PNG background. A dark scrim sits between the image and the
   text/border so contrast stays high regardless of what the
   image looks like.

   TO SET YOUR PNG: just swap the url() path below.
   TO ADJUST CONTRAST: tweak the scrim's rgba opacity values —
   higher opacity = darker/more readable, lower = more of the
   PNG shows through.
============================================================ */
#fan-playlist-widget{
    position:absolute;
    right:180px;
    bottom:600px;
    width:490px;
    height:230px;

    display:flex;
    flex-direction:column;
    gap:12px;
    padding:20px 24px;

    border-radius:8px;
    border:2px solid transparent;
    background:
        linear-gradient(180deg, rgba(0,0,0,.6), rgba(0,0,0,.65)) padding-box,
        url("assets/playlist-bg.png") center / cover no-repeat padding-box,
        linear-gradient(90deg,
            #ff4dab,
            #ffcc4d,
            #00e5ff,
            #b066ff
        ) border-box;

    box-shadow:0 20px 55px rgba(0,0,0,0.55);

    overflow:hidden;
    z-index:3;
}

/* ----- header: eyebrow label + title row ----- */
.fpw-header{
    display:flex;
    flex-direction:column;
    gap:6px;
    flex-shrink:0;
}
.fpw-eyebrow{
    display:flex;
    align-items:center;
    gap:6px;
    font-family:'DM Sans', sans-serif;
    font-size:10.5px;
    font-weight:700;
    letter-spacing:.14em;
    color:rgba(255,255,255,.65);
    text-shadow:0 1px 2px rgba(0,0,0,.7);
}

/* tiny equalizer animation — subtle sign of life, not a distraction */
.fpw-eq{
    display:inline-flex;
    align-items:flex-end;
    gap:2px;
    height:9px;
}
.fpw-eq span{
    width:2px;
    border-radius:1px;
    transform-origin:bottom;
    animation:fpwEqBounce 1s ease-in-out infinite;
}
.fpw-eq span:nth-child(1){ height:40%; background:#ff4dab; animation-delay:0s; }
.fpw-eq span:nth-child(2){ height:100%; background:#ffcc4d; animation-delay:.2s; }
.fpw-eq span:nth-child(3){ height:60%; background:#00e5ff; animation-delay:.4s; }
@keyframes fpwEqBounce{
    0%, 100%{ transform:scaleY(.4); }
    50%{ transform:scaleY(1); }
}

.fpw-title-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}
#fan-playlist-widget .fpw-title{
    margin:0;
    font-family:"massilia",sans-serif;
    letter-spacing:.04em;
    font-size:19px;
    color:#fff;
    text-shadow:0 1px 3px rgba(0,0,0,.8), 0 0 12px rgba(0,0,0,.6);
}
.fpw-count{
    flex-shrink:0;
    padding:3px 10px;
    border-radius:999px;
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.18);
    font-family:'DM Sans', sans-serif;
    font-size:11px;
    font-weight:600;
    color:#fff;
    text-shadow:0 1px 2px rgba(0,0,0,.7);
    white-space:nowrap;
}

.fpw-divider{
    height:1px;
    flex-shrink:0;
    background:linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.25), rgba(255,255,255,0));
}

/* ----- track list ----- */
.fpw-tracks--widget{
    flex:1;
    min-height:0;
    overflow-y:auto;
    padding-right:4px;
}
.fpw-tracks--widget::-webkit-scrollbar{ width:4px; }
.fpw-tracks--widget::-webkit-scrollbar-thumb{ background:rgba(255,255,255,.25); border-radius:4px; }

.fpw-tracks{
    list-style:none;margin:0;padding:0;
    display:flex;flex-direction:column;gap:10px;
}
.fpw-tracks li{
    display:flex;align-items:flex-start;gap:8px;
    font-size:13px;
}
.fpw-tracks--widget li:not(:last-child){
    padding-bottom:8px;
    border-bottom:1px solid rgba(255,255,255,.08);
}
.fpw-tracks .fpw-note{
    flex-shrink:0;
    margin-top:2px;
    color:#ffcc4d;
    text-shadow:0 0 6px rgba(255,204,77,.7);
}
.fpw-tracks .fpw-song{
    font-weight:700;
    color:#fff;
    line-height:1.3;
    text-shadow:0 1px 3px rgba(0,0,0,.8);
}
.fpw-tracks .fpw-artist{
    font-size:11px;
    color:#e6e6e6;
    text-shadow:0 1px 2px rgba(0,0,0,.7);
}

/* ----- empty state: centered, designed, not just a stray line ----- */
.fpw-empty{
    flex:1;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:6px;
    text-align:center;
    padding:6px 0;
}
.fpw-empty-icon{
    font-size:22px;
    color:rgba(255,255,255,.35);
    text-shadow:0 1px 3px rgba(0,0,0,.6);
}
.fpw-empty-text{
    font-size:12px;
    color:#cfcfcf;
    font-style:italic;
    line-height:1.5;
    text-shadow:0 1px 2px rgba(0,0,0,.7);
}

/* ----- footer caption ----- */
.fpw-footer{
    flex-shrink:0;
    display:flex;
    align-items:center;
    gap:4px;
    padding-top:10px;
    border-top:1px solid rgba(255,255,255,.1);
    font-family:'DM Sans', sans-serif;
    font-size:11px;
    color:rgba(255,255,255,.6);
    text-shadow:0 1px 2px rgba(0,0,0,.7);
}
.fpw-footer-arrow{
    color:#ffcc4d;
}

/* ----- Playlist app window: List / Add Song tabs ----- */
.playlist-tabs{
    display:flex;gap:8px;padding:14px 18px 0;
}
.playlist-tab-btn{
    flex:1;
    padding:8px 0;
    background:transparent;
    border:1px solid var(--panel-edge);
    border-radius:8px;
    color:var(--text-dim);
    font-family:"massilia",sans-serif;
    letter-spacing:.06em;
    font-size:12px;
    cursor:pointer;
    transition:background .15s, color .15s, border-color .15s;
}
.playlist-tab-btn.active{
    background:#35ddfb;
    color:#000;
    border-color:#35ddfb;
}
.playlist-tab-panel .fpw-song{color:var(--text);}
.playlist-tab-panel .fpw-artist{color:var(--text-dim);}
.playlist-tab-panel .fpw-empty{color:var(--text-dim);}
.playlist-form{display:flex;flex-direction:column;gap:10px;}
.playlist-form input{
    background:#0e0e10;
    border:1px solid var(--panel-edge);
    border-radius:8px;
    padding:10px 12px;
    color:var(--text);
    font-family:'DM Sans',sans-serif;
    font-size:13px;
}
.playlist-form input:focus{outline:2px solid #35ddfb;outline-offset:1px;}
.playlist-form button{
    margin-top:4px;
    padding:10px 0;
    border:none;border-radius:8px;
    background:#35ddfb;
    color:#000;
    font-family:"massilia",sans-serif;
    letter-spacing:.06em;
    font-size:13px;
    cursor:pointer;
    transition:transform .15s var(--ease);
}
.playlist-form button:hover{transform:translateY(-2px);}
.playlist-form-note{font-size:11px;color:var(--text-dim);}



.video-portrait-wrap{
    position:relative;
    display:block;
}
.video-play-btn{
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
    width:72px;
    height:72px;
    border-radius:50%;
    background:rgba(255,255,255,0.85);
    color:#1a1a1d;
    display:flex;
    align-items:center;
    justify-content:center;
    box-shadow:0 12px 30px rgba(0,0,0,.45);
    transition:transform .15s var(--ease), background .15s;
}
.video-play-btn svg{
    width:30px;
    height:30px;
    margin-left:3px; /* optical centering — triangle's visual weight sits slightly left of its bounding box */
}
.video-play-btn:hover{
    transform:translate(-50%,-50%) scale(1.08);
    background:#fff;
}


/* LOADING */
/* LOADING SCREEN */
#loading-screen{
    position:fixed;
    inset:0;
    z-index:99999;
  
    display:flex;
    align-items:center;
    justify-content:center;
  
    background:#000;
    color:#fff;
  
    transition:opacity .8s ease, visibility .8s ease;
  }
  
  #loading-screen.hidden{
    opacity:0;
    visibility:hidden;
    pointer-events:none;
  }
  
  .loading-content{
    width:min(420px,80vw);
    text-align:center;
  }
  
  .loading-logo{
    font-family:"massilia",sans-serif;
    font-size:4rem;
    letter-spacing:.15em;
    margin-bottom:1rem;
  }
  
  .loading-status{
    font-family:'Space Mono', monospace;
    font-size:.8rem;
    opacity:.7;
    margin-bottom:1rem;
  }
  
  .loading-bar{
    width:100%;
    height:2px;
    background:rgba(255,255,255,.15);
    overflow:hidden;
  }
  
  .loading-progress{
    height:100%;
    width:0%;
    background:#fff;
    animation:bootProgress 2.2s ease forwards;
  }
  
  @keyframes bootProgress{
    from{ width:0%; }
    to{ width:100%; }
  }

/* ============================================================
   TOPBAR — slim macOS/Chrome-style menu bar, always on top
   (above windows) so it reads as system chrome, not a panel.
============================================================ */
#topbar{
    position:absolute;
    top:0; left:0; right:0;
    height:var(--topbar-h);
    z-index:9999;

    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 16px;

    background:rgba(0, 0, 0, 0.7);
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
    border-bottom:1px solid rgba(255, 255, 255, 0.47);

    font-family:'DM Sans', sans-serif;
    color:var(--text);
    -webkit-user-select:none;user-select:none;
}
.topbar-left{
    display:flex;
    align-items:center;
    gap:0;              /* remove flex gap completely */
    font-size:0;        /* removes inline-image whitespace issues */
  }

  .topbar-icon{
    width:52px;
    height:52px;
    object-fit:contain;
    margin-right:-2px;  /* tight nudge */
  }
  
  .topbar-logo{
    height:52px;
    width:auto;
    margin-left:-2px;   /* tight nudge */
  }

  .topbar-icon,
.topbar-logo{
  display:block;      /* IMPORTANT */
  margin:0;
  padding:0;
}
  
.topbar-menu{
    display:flex;align-items:center;gap:16px;
}
.topbar-menu-item{
    font-size:12.5px;
    color:var(--text-dim);
    cursor:default;
    transition:color .15s;
}
.topbar-menu-item:hover{ color:var(--text); }

.topbar-right{
    display:flex;align-items:center;gap:14px;flex-shrink:0;
}
.topbar-glyph{
    display:flex;align-items:center;justify-content:center;
    color:var(--text-dim);
    opacity:.85;
}
.topbar-glyph svg{ display:block; }
.topbar-glyph:not(.topbar-battery) svg{ width:15px;height:15px; }
.topbar-battery svg{ width:22px;height:12px; }
.topbar-clock{
    font-size:12px;
    color:var(--text-dim);
    white-space:nowrap;
}

@media (max-width: 720px){
    .topbar-menu{ display:none; }
}
  

.playlist-prompt{
    position:relative;
    margin:0 0 16px;
    padding:16px 18px;
    background:linear-gradient(160deg, #04414b, rgba(255,77,171,.04));
    border:1px solid #35ddfb;
    border-radius:10px;
    overflow:hidden;
}
.playlist-prompt::before{
    content:'';
    position:absolute;
    top:-30%;
    right:-20%;
    width:140px;
    height:140px;
    background:radial-gradient(circle, #fbe735, transparent 70%);
    pointer-events:none;
}
.playlist-prompt-emoji{
    display:block;
    font-size:22px;
    margin-bottom:4px;
    position:relative;
}
.playlist-prompt-question{
    margin:0 0 6px;
    font-family:"massilia",sans-serif;
    letter-spacing:.04em;
    font-size:22px;
    color:#fff;
    position:relative;
}
.playlist-prompt-sub{
    margin:0;
    font-family:'DM Sans', sans-serif;
    font-size:12.5px;
    line-height:1.45;
    color:var(--text-dim);
    position:relative;
}