/* ══════════════════════════════════════════════════════
   style.css  –  Fluxio
   ══════════════════════════════════════════════════════ */

/* ── CSS variables ── */
:root {
  --accent:       #ff5c00;
  --accent-d:     #cc4900;
  --accent-glow:  rgba(255,92,0,0.25);
  --bg:           #0e0e0e;
  --sidebar-bg:   #111111;
  --surface:      #181818;
  --card:         #1e1e1e;
  --card-h:       #252525;
  --t1:           #ffffff;
  --t2:           #aaaaaa;
  --t3:           #555555;
  --border:       rgba(255,255,255,0.07);
  --player-bg:    #111111;
  --chip-bg:      #222222;
  --modal-bg:     rgba(0,0,0,0.85);
  --toast-bg:     #1e1e1e;
  --scrollbar:    #333;
  --r:            10px;
  --sidebar-w:    230px;
  --player-h:     86px;
  --bottom-nav-h: 0px; /* overridden on mobile */
}

[data-theme="light"] {
  --bg:        #f5f5f5;
  --sidebar-bg:#ebebeb;
  --surface:   #ffffff;
  --card:      #f0f0f0;
  --card-h:    #e8e8e8;
  --t1:        #111111;
  --t2:        #555555;
  --t3:        #aaaaaa;
  --border:    rgba(0,0,0,0.08);
  --player-bg: #e8e8e8;
  --chip-bg:   #e0e0e0;
  --modal-bg:  rgba(0,0,0,0.6);
  --toast-bg:  #333333;
  --scrollbar: #ccc;
}

/* ── Reset ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html, body { height:100%; overflow:hidden; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--t1);
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: 1fr var(--player-h);
  grid-template-areas: "sidebar main" "player player";
  transition: background .3s, color .3s;
}
::-webkit-scrollbar { width:5px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--scrollbar); border-radius:3px; }
button { font-family: 'Inter', sans-serif; cursor:pointer; }
input  { font-family: 'Inter', sans-serif; }

/* ══════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════ */
#sidebar {
  grid-area: sidebar;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--border);
  transition: background .3s;
}
.logo-wrap {
  padding: 14px 20px 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.logo-mark {
  width: 160px; height: 48px;
  background: transparent;
  border-radius: 0;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-mark img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.logo-text { font-size: 17px; font-weight: 800; letter-spacing: -0.3px; color: var(--t1); }
.logo-text span { color: var(--accent); }
.sb-nav { padding: 4px 0 8px; flex-shrink:0; }
.sb-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px;
  color: var(--t2); font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: color .15s, background .15s;
  border-radius: 6px; margin: 1px 8px;
  user-select: none;
}
.sb-item:hover { color: var(--t1); background: var(--border); }
.sb-item.active { color: var(--t1); }
.sb-item svg { width:18px; height:18px; fill:currentColor; flex-shrink:0; }
.sb-divider { height:1px; background:var(--border); margin:8px 16px; }
.sb-section-label {
  padding: 4px 20px 6px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--t3);
}
.sb-library { flex:1; overflow-y:auto; padding-bottom:12px; }
.sb-playlist {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px; cursor: pointer;
  border-radius: 6px; margin: 1px 8px;
  transition: background .12s;
}
.sb-playlist:hover { background: var(--border); }
.sb-playlist.active { background: rgba(255,92,0,0.12); }
.sb-playlist-art {
  width:38px; height:38px; border-radius:5px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-size:17px;
}
.sb-playlist-info { min-width:0; }
.sb-playlist-name {
  font-size:13px; font-weight:600;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color: var(--t1);
}
.sb-playlist-meta { font-size:11px; color:var(--t2); margin-top:1px; }

/* ══════════════════════════════════════════
   MAIN
   ══════════════════════════════════════════ */
#main {
  grid-area: main; overflow-y: auto;
  background: var(--bg); position: relative;
  transition: background .3s;
}
.topbar {
  position: sticky; top: 0; z-index: 50;
  padding: 12px 24px;
  background: rgba(14,14,14,0.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  transition: background .3s;
}
[data-theme="light"] .topbar { background: rgba(245,245,245,0.92); }
.search-wrap { position:relative; flex:1; max-width:360px; }
.search-icon { position:absolute; left:12px; top:50%; transform:translateY(-50%); color:var(--t3); pointer-events:none; font-size:15px; }
#search-input {
  width:100%; padding:9px 12px 9px 36px;
  background:var(--card); border:1px solid transparent; border-radius:20px;
  color:var(--t1); font-size:14px; font-weight:500; outline:none;
  transition: border-color .15s, background .15s;
}
#search-input:focus { border-color: var(--accent); background:var(--surface); }
#search-input::placeholder { color:var(--t3); }
.topbar-actions { display:flex; align-items:center; gap:8px; margin-left:auto; }
.icon-btn {
  width:36px; height:36px; border:none;
  background:var(--card); border-radius:50%; color:var(--t2);
  display:flex; align-items:center; justify-content:center;
  transition:color .15s, background .15s, transform .1s; flex-shrink:0;
}
.icon-btn:hover { color:var(--t1); background:var(--card-h); transform:scale(1.05); }
.icon-btn svg { width:16px; height:16px; fill:currentColor; }
.random-btn {
  padding:0 14px; height:36px;
  background:var(--accent); border:none; border-radius:18px;
  color:#fff; font-size:13px; font-weight:700;
  display:flex; align-items:center; gap:6px;
  transition:background .15s, transform .1s;
  white-space: nowrap;
}
.random-btn:hover { background:var(--accent-d); transform:scale(1.03); }
.random-btn svg { width:14px; height:14px; fill:#fff; flex-shrink:0; }
.random-btn .btn-label { display:inline; }
.chips-row {
  display:flex; gap:8px; flex-wrap:wrap;
  padding:12px 24px 0;
  position:sticky; top:57px; z-index:49;
  background:var(--bg); padding-bottom:12px;
  border-bottom:1px solid var(--border);
  transition:background .3s;
}
[data-theme="light"] .chips-row { background: #f5f5f5; }
.chip {
  padding:6px 16px; border-radius:20px; border:none;
  background:var(--chip-bg); color:var(--t2);
  font-size:13px; font-weight:600; cursor:pointer;
  transition:all .15s; white-space:nowrap;
}
.chip:hover { background:var(--card-h); color:var(--t1); }
.chip.active { background:var(--t1); color:var(--bg); }

/* ══════════════════════════════════════════
   CONTENT AREAS
   ══════════════════════════════════════════ */
.content { padding:24px; }
#continue-bar {
  background:linear-gradient(90deg, rgba(255,92,0,0.15) 0%, transparent 100%);
  border:1px solid rgba(255,92,0,0.25); border-radius:var(--r);
  padding:14px 18px; margin-bottom:28px;
  display:flex; align-items:center; gap:14px;
  cursor:pointer; transition:background .15s;
}
#continue-bar:hover { background:linear-gradient(90deg, rgba(255,92,0,0.22) 0%, transparent 100%); }
#continue-bar.hidden { display:none !important; }
.continue-art { width:44px; height:44px; border-radius:6px; display:flex; align-items:center; justify-content:center; font-size:22px; flex-shrink:0; }
.continue-text { flex:1; min-width:0; }
.continue-label { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.08em; color:var(--accent); }
.continue-name  { font-size:15px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.continue-play-btn {
  width:40px; height:40px; border-radius:50%;
  background:var(--accent); border:none; color:#fff;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
  transition:transform .12s;
}
.continue-play-btn:hover { transform:scale(1.08); }
.continue-play-btn svg { width:16px; height:16px; fill:#fff; margin-left:2px; }
.sec-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; margin-top:8px; }
.sec-title { font-size:20px; font-weight:800; }
.sec-link {
  font-size:12px; font-weight:700; letter-spacing:0.08em; text-transform:uppercase;
  color:var(--t2); background:none; border:none; cursor:pointer; transition:color .15s;
}
.sec-link:hover { color:var(--t1); }
.sec-sep { margin-bottom:32px; }

/* ── Mood cards ── */
.mood-row { display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:10px; margin-bottom:32px; }
.mood-card {
  border-radius:var(--r); padding:18px 14px; cursor:pointer;
  position:relative; overflow:hidden;
  transition:filter .15s, transform .15s; user-select:none; min-height:90px;
}
.mood-card:hover { filter:brightness(1.12); transform:translateY(-2px); }
.mood-card.active-mood { outline:2px solid var(--t1); outline-offset:2px; }
.mood-name { font-size:15px; font-weight:800; position:relative; z-index:1; }
.mood-desc { font-size:11px; opacity:.7; margin-top:3px; position:relative; z-index:1; }
.mood-emoji { position:absolute; bottom:-4px; right:-2px; font-size:48px; opacity:.3; transform:rotate(8deg); }

/* ── Category tiles ── */
.cat-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:10px; margin-bottom:32px; }
.cat-tile {
  border-radius:var(--r); padding:18px 14px; cursor:pointer;
  position:relative; overflow:hidden;
  transition:filter .15s, transform .15s; min-height:90px; user-select:none;
}
.cat-tile:hover { filter:brightness(1.1); transform:translateY(-2px); }
.cat-tile.active-cat { outline:2px solid var(--t1); outline-offset:2px; }
.cat-tile-name  { font-size:15px; font-weight:800; position:relative; z-index:1; }
.cat-tile-count { font-size:11px; opacity:.7; margin-top:3px; position:relative; z-index:1; }
.cat-tile-emoji { position:absolute; bottom:-4px; right:-2px; font-size:48px; opacity:.3; transform:rotate(8deg); }

/* ── Station cards ── */
.stations-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(165px,1fr)); gap:10px; margin-bottom:12px; }
.station-card {
  background:var(--surface); border-radius:var(--r); padding:14px;
  cursor:pointer; position:relative; transition:background .15s; overflow:hidden;
}
.station-card:hover { background:var(--card-h); }
.station-card.active { background:var(--card); }
.station-art {
  width:100%; aspect-ratio:1; border-radius:6px; margin-bottom:12px;
  display:flex; align-items:center; justify-content:center; font-size:30px;
  position:relative; overflow:hidden; box-shadow:0 8px 24px rgba(0,0,0,0.4);
}
.station-play-btn {
  position:absolute; bottom:8px; right:8px;
  width:40px; height:40px; border-radius:50%;
  background:var(--accent); border:none; color:#fff;
  display:flex; align-items:center; justify-content:center;
  opacity:0; transform:translateY(6px);
  transition:opacity .18s, transform .18s;
  box-shadow:0 4px 12px rgba(0,0,0,0.4); flex-shrink:0;
}
.station-play-btn svg { width:16px; height:16px; fill:#fff; margin-left:2px; }
.station-card:hover .station-play-btn,
.station-card.active .station-play-btn { opacity:1; transform:translateY(0); }
.station-fav-btn {
  position:absolute; top:10px; right:10px;
  background:rgba(0,0,0,0.45); border:none; border-radius:50%;
  width:28px; height:28px;
  display:flex; align-items:center; justify-content:center;
  font-size:14px; opacity:0; transition:opacity .15s; cursor:pointer;
  backdrop-filter:blur(4px); color:var(--t2); z-index:2;
}
.station-card:hover .station-fav-btn { opacity:1; }
.station-fav-btn.faved { opacity:1; color:#ff5c00; }
.station-card-name { font-size:13px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-bottom:3px; }
.station-card-sub { font-size:12px; color:var(--t2); }

/* ── Live badge ── */
.live-badge { display:inline-flex; align-items:center; gap:4px; font-size:10px; font-weight:700; letter-spacing:0.05em; color:var(--accent); }
.live-dot { width:6px; height:6px; border-radius:50%; background:var(--accent); animation:livepulse 1.6s infinite; }
@keyframes livepulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.4;transform:scale(1.5)} }

/* ── Empty states ── */
.empty-state { padding:60px 20px; text-align:center; color:var(--t2); }
.empty-state .big { font-size:48px; margin-bottom:12px; }
.empty-state p { font-size:15px; }

/* ══════════════════════════════════════════
   PLAYER
   ══════════════════════════════════════════ */
#player {
  grid-area: player; background: var(--player-bg);
  border-top: 2px solid var(--accent);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  position: relative; z-index: 100; transition: background .3s;
}

.np-wrap {
  flex: 1;
  display: flex; align-items: center; gap: 12px; min-width: 0;
}

.transport-wrap {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  top: 50%;
  transform: translate(-50%, -41%);  /* centres both horizontally AND vertically */
}

.vol-wrap {
  margin-left: auto;
  display: flex; align-items: center; gap: 10px;
}
.np-wrap { display:flex; align-items:center; gap:12px; min-width:0; }
.np-art {
  width:52px; height:52px; border-radius:6px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-size:24px;
  box-shadow:0 4px 14px rgba(0,0,0,0.5); cursor:pointer; transition:transform .15s;
}
.np-art:hover { transform:scale(1.04); }
.np-text { min-width:0; }
.np-name {
  font-size:14px; font-weight:700;
  min-width:0; overflow:hidden; position:relative;
}
.np-name-text {
  display:inline-block; white-space:nowrap;
}
.np-name-inner {
  display:inline-flex; align-items:center;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation: none;
}
.np-name.marquee .np-name-inner {
  animation-name: np-name-scroll;
}
@keyframes np-name-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-1 * var(--np-name-scroll-width, 0px))); }
}
.np-name-clone {
  margin-left: 24px;
  display: none;
}
.np-name.marquee .np-name-clone {
  display: inline-block;
}
.np-status { font-size:12px; color:var(--t2); margin-top:2px; display:flex; align-items:center; gap:5px; }
.np-fav { background:none; border:none; font-size:16px; cursor:pointer; padding:4px; flex-shrink:0; transition:transform .15s; line-height:1; }
.np-fav:hover { transform:scale(1.2); }
.transport-btns { display:flex; align-items:center; gap:14px; }
.t-btn { background:none; border:none; color:var(--t2); display:flex; align-items:center; justify-content:center; padding:4px; border-radius:50%; transition:color .15s, transform .1s; }
.t-btn:hover { color:var(--t1); transform:scale(1.08); }
.t-btn svg { width:18px; height:18px; fill:currentColor; }
.t-btn.sm svg { width:14px; height:14px; }
#play-pause-btn {
  width:40px; height:40px; border-radius:50%;
  background:var(--t1); color:var(--bg); border:none;
  display:flex; align-items:center; justify-content:center;
  transition:transform .12s, background .15s; flex-shrink:0;
}
#play-pause-btn:hover { transform:scale(1.08); }
#play-pause-btn svg {
  display:block;
  width:16px; height:16px; fill:currentColor;
}
#visualizer { width:140px; height:28px; flex-shrink:0; opacity:1; transition:opacity .6s; }
#visualizer.active { opacity:1; }
.safari-no-vis #visualizer {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
}
.safari-no-vis .transport-btns {
  gap: 10px;
  justify-content: center;
}
.safari-no-vis .transport-wrap {
  gap: 0;
}
.progress-row { display:flex; align-items:center; gap:8px; width:100%; max-width:380px; }
.prog-time { font-size:11px; color:var(--t2); width:30px; text-align:center; }
.prog-track { flex:1; height:4px; background:var(--card); border-radius:2px; overflow:hidden; position:relative; }
.prog-fill { height:100%; border-radius:2px; background:var(--t3); width:40%; transition:background .2s; }
.prog-fill.playing { background:var(--accent); animation:shimmer 2s ease-in-out infinite; }
@keyframes shimmer { 0%,100%{opacity:1} 50%{opacity:0.65} }
.spin-wrap { position:absolute; width:40px; height:40px; border-radius:50%; display:none; align-items:center; justify-content:center; pointer-events:none; }
.spin-wrap.show { display:flex; }
.spinner { width:24px; height:24px; border:2px solid var(--border); border-top-color:var(--accent); border-radius:50%; animation:spin .7s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.vol-wrap { display:flex; align-items:center; justify-content:flex-end; gap:10px; }
.vol-btn { background:none; border:none; color:var(--t2); display:flex; align-items:center; justify-content:center; padding:4px; cursor:pointer; transition:color .15s; }
.vol-btn:hover { color:var(--t1); }
.vol-btn svg { width:16px; height:16px; fill:currentColor; }
#vol-slider { appearance:none; -webkit-appearance:none; width:90px; height:4px; background:var(--card); border-radius:2px; outline:none; cursor:pointer; }
#vol-slider::-webkit-slider-thumb { appearance:none; -webkit-appearance:none; width:12px; height:12px; border-radius:50%; background:var(--t1); cursor:pointer; }
#vol-slider:hover::-webkit-slider-thumb { background:var(--accent); }

/* ══════════════════════════════════════════
   BOTTOM NAV  (mobile only)
   ══════════════════════════════════════════ */
   #bottom-nav {
  display: none;
  grid-area: bottom-nav;
  background: var(--sidebar-bg);
  border-top: 1px solid var(--border);
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  z-index: 200;
}
.bnav-items { display:flex; height:100%; }
.bnav-item {
  flex:1; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:4px;
  background:none; border:none; color:var(--t3);
  font-size:10px; font-weight:700; letter-spacing:0.04em;
  cursor:pointer; transition:color .15s;
  padding: 0 8px;
  -webkit-tap-highlight-color: transparent;
}
.bnav-item.active { color: var(--accent); }
.bnav-item svg { width:22px; height:22px; fill:currentColor; }

/* ══════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════ */
#toast {
  position:fixed; bottom:calc(var(--player-h) + 16px); left:50%; transform:translateX(-50%) translateY(10px);
  background:var(--toast-bg); color:#fff;
  padding:10px 18px; border-radius:8px;
  font-size:13px; font-weight:600;
  pointer-events:none; opacity:0;
  transition:opacity .25s, transform .25s;
  z-index:9999; white-space:nowrap;
  box-shadow:0 4px 20px rgba(0,0,0,0.4);
}
#toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

.fullscreen-modal {
  position:fixed;
  inset:0;
  z-index:10000;
  background:var(--bg);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:32px;
}
.fullscreen-close {
  position:absolute;
  top:20px;
  left:20px;
  color:var(--t1);
  font-size:28px;
  cursor:pointer;
  user-select:none;
}
.fullscreen-artwork {
  width:260px;
  height:260px;
  border-radius:32px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:120px;
  margin-bottom:32px;
  box-shadow:0 20px 60px rgba(0,0,0,0.5);
}
.fullscreen-title {
  font-size:32px;
  font-weight:800;
  text-align:center;
  margin-bottom:12px;
  max-width:90vw;
  color:var(--t1);
}
.fullscreen-category {
  font-size:18px;
  color:var(--t2);
  text-align:center;
  margin-bottom:36px;
}
.fullscreen-visualizer-wrap {
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:22px;
  padding:24px 18px 22px;
  width:min(380px, 88vw);
  border-radius:42px;
  background:rgba(255,255,255,0.06);
  box-shadow:0 22px 42px rgba(0,0,0,0.18);
  backdrop-filter:blur(12px);
  margin-bottom:28px;
  overflow:visible;
}
@keyframes quoteFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.fullscreen-visualizer-wrap::before,
.fullscreen-visualizer-wrap::after {
  display:none;
}

.fullscreen-controls {
  display:flex;
  gap:20px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:center;
}
.fullscreen-control-btn {
  width:56px;
  height:56px;
  border-radius:50%;
  background:var(--t1);
  color:var(--bg);
  border:none;
  font-size:24px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}
.fullscreen-pp-btn {
  width:80px;
  height:80px;
  font-size:32px;
  background:var(--accent);
  color:var(--bg);
  transition: transform .2s ease, box-shadow .2s ease;
}

.fullscreen-pp-btn {
  will-change: transform;
}

.play-pause-transition {
  animation: playPauseWobble .32s ease-in-out;
}

@keyframes playPauseWobble {
  0%   { transform: scale(1) rotate(0deg); }
  20%  { transform: scale(1.04) rotate(-6deg); }
  46%  { transform: scale(1.02) rotate(5deg); }
  72%  { transform: scale(1.00) rotate(-3deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* ══════════════════════════════════════════
   MODAL  (keyboard shortcuts)
   ══════════════════════════════════════════ */
#shortcuts-modal {
  position:fixed; inset:0; z-index:1000;
  background:var(--modal-bg); backdrop-filter:blur(8px);
  display:flex; align-items:center; justify-content:center;
  opacity:0; pointer-events:none; transition:opacity .2s;
}
#shortcuts-modal.open { opacity:1; pointer-events:auto; }
.modal-box {
  background:var(--surface); border:1px solid var(--border); border-radius:16px;
  padding:28px; width:360px; max-width:90vw;
  box-shadow:0 20px 60px rgba(0,0,0,0.5);
  max-height: 90vh; overflow-y: auto;
}
.modal-title { font-size:18px; font-weight:800; margin-bottom:20px; }
.shortcut-row { display:flex; align-items:center; justify-content:space-between; padding:9px 0; border-bottom:1px solid var(--border); }
.shortcut-row:last-child { border-bottom:none; }
.shortcut-desc { font-size:14px; color:var(--t2); }
.shortcut-key { display:inline-flex; gap:4px; }
.key { display:inline-block; background:var(--card); border:1px solid var(--border); border-radius:4px; padding:2px 7px; font-size:12px; font-weight:700; color:var(--t1); font-family:monospace; }
.modal-close { margin-top:20px; width:100%; padding:10px; background:var(--accent); border:none; border-radius:8px; color:#fff; font-size:14px; font-weight:700; cursor:pointer; transition:background .15s; }
.modal-close:hover { background:var(--accent-d); }

.quote-text,
.quote-author {
  transition: opacity 0.4s ease;
}

/* ══════════════════════════════════════════
   RESPONSIVE  –  tablet (641–900px)
   ══════════════════════════════════════════ */
@media (max-width:900px) and (min-width:641px) {
  :root { --sidebar-w: 64px; }
  .logo-text, .sb-item span:not(.sr-only), .sb-section-label,
  .sb-playlist-info { display:none; }
  .logo-wrap { justify-content:center; padding:16px 0; }
  .sb-item { justify-content:center; padding:12px 0; margin:2px 8px; }
  .sb-playlist { justify-content:center; padding:8px 0; }
  .sb-playlist-art { width:36px; height:36px; }
  .topbar { padding:10px 16px; }
  .content { padding:16px; }
  .chips-row { padding:10px 16px; }
  .random-btn .btn-label { display:none; }
  .random-btn { padding:0 10px; }
}

/* ══════════════════════════════════════════
   RESPONSIVE  –  mobile (≤640px)
   ══════════════════════════════════════════ */
@media (max-width:640px) {
  :root {
    --player-h: 70px;
    --bottom-nav-h: 60px;
  }
  body {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr var(--player-h);
    grid-template-areas: "main" "player";
    padding-bottom: var(--bottom-nav-h);
  }
  #sidebar { display: none; }
  #bottom-nav { display: block; }

  /* Topbar */
  .topbar { padding: 10px 12px; gap: 8px; }
  .search-wrap { max-width: none; }
  .topbar-actions .icon-btn:not(.mobile-show) { display: none; }
  .topbar-actions { gap: 6px; }
  .random-btn { padding: 0 10px; }
  .random-btn .btn-label { display: none; }
  .random-btn { width: 36px; height: 36px; padding: 0; border-radius: 50%; justify-content: center; }
  .random-btn svg { margin: 0; }

  /* Chips */
  .chips-row {
    padding: 10px 12px;
    top: 53px;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 6px;
    scrollbar-width: none;
  }
  .chips-row::-webkit-scrollbar { display: none; }
  .chip { padding: 8px 16px; font-size: 13px; }

  /* Content */
  .content { padding: 14px 12px; }
  .mood-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .cat-grid  { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stations-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  /* Always-visible touch targets */
  .station-fav-btn { opacity: 1; }
  .station-play-btn { opacity: 1; transform: translateY(0); }
  .station-play-btn { width: 36px; height: 36px; bottom: 6px; right: 6px; }

  /* Typography */
  .sec-title { font-size: 17px; }
  .genre-hero { padding: 20px 16px !important; }
  .genre-hero .emoji-big { font-size: 40px !important; }
  .genre-hero .title-big { font-size: 24px !important; }

  /* Player */
  #player { padding: 0 12px; gap: 8px; }
  .np-art { width: 44px; height: 44px; font-size: 20px; }
  .np-name { font-size: 13px; }
  .np-status { font-size: 11px; }
  .transport-btns { gap: 10px; }
  #play-pause-btn { width: 38px; height: 38px; }
  #play-pause-btn svg { width: 14px; height: 14px; }
  #visualizer { display: none; }
  .vol-wrap { display: none; }
  .progress-row { max-width: 200px; }
  .prog-time { display: none; }
  .np-fav { display: none; }

  #toast { bottom: calc(var(--player-h) + var(--bottom-nav-h) + 8px); }
  #continue-bar { padding: 12px 14px; margin-bottom: 20px; gap: 10px; }
  .continue-name { font-size: 14px; }
}

/* ══════════════════════════════════════════
   Very small screens (≤380px)
   ══════════════════════════════════════════ */
@media (max-width:380px) {
  .stations-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .station-card { padding: 10px; }
  .station-card-name { font-size: 12px; }
  .mood-row, .cat-grid { gap: 6px; }
  .mood-card, .cat-tile { padding: 14px 10px; min-height: 80px; }
  .mood-name, .cat-tile-name { font-size: 13px; }
}

/* ── Tap highlight suppress on touch ── */
@media (hover: none) {
  .station-card:active { background: var(--card-h); }
  .chip:active { background: var(--card-h); color: var(--t1); }
  .mood-card:active, .cat-tile:active { filter: brightness(1.12); }
}
