/* ==========================================================================
   MovieWithTea — Design System
   ========================================================================== */

:root {
  --bg: #07070b;
  --bg-soft: #0d0d14;
  --surface: #12121c;
  --surface-2: #191926;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --text: #f4f4f8;
  --muted: #9a9aae;
  --dim: #6c6c82;

  --tea: #ff5f2e;
  --tea-2: #ffb03a;
  --mint: #2ee6a8;
  --grad: linear-gradient(115deg, #ff5f2e 0%, #ffb03a 100%);
  --grad-soft: linear-gradient(115deg, rgba(255, 95, 46, .18), rgba(255, 176, 58, .12));

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  --shadow: 0 18px 50px rgba(0, 0, 0, .55);
  --nav-h: 68px;
  --ease: cubic-bezier(.22, .8, .3, 1);
  --wrap: 1400px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll { overflow: hidden; }

/* Ambient background glow */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(255, 95, 46, .16), transparent 60%),
    radial-gradient(700px 460px at 88% 6%, rgba(46, 230, 168, .09), transparent 62%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

:focus-visible { outline: 2px solid var(--tea-2); outline-offset: 3px; border-radius: 6px; }

::selection { background: var(--tea); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: #2c2c3d; border-radius: 20px; border: 2px solid var(--bg-soft); }
::-webkit-scrollbar-thumb:hover { background: #3d3d55; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(16px, 4vw, 48px); }
.page { position: relative; z-index: 1; padding-top: calc(var(--nav-h) + 26px); padding-bottom: 90px; min-height: 70vh; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ============================ Navbar ============================ */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 200;
  display: flex;
  align-items: center;
  transition: background .35s var(--ease), backdrop-filter .35s var(--ease), border-color .35s;
  border-bottom: 1px solid transparent;
  background: linear-gradient(to bottom, rgba(7, 7, 11, .92), rgba(7, 7, 11, 0));
}

.site-nav.is-stuck {
  background: rgba(9, 9, 14, .82);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom-color: var(--line);
}

.nav-inner { display: flex; align-items: center; gap: 22px; width: 100%; }

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: var(--grad);
  display: grid; place-items: center;
  font-size: 1.05rem;
  box-shadow: 0 6px 20px rgba(255, 95, 46, .38);
}
.brand-text { font-weight: 800; font-size: 1.22rem; letter-spacing: -.4px; white-space: nowrap; }
.brand-text span {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links { display: flex; align-items: center; gap: 4px; margin-inline: auto; }
.nav-links a {
  padding: 9px 15px;
  border-radius: var(--r-pill);
  font-size: .94rem;
  font-weight: 500;
  color: var(--muted);
  transition: color .2s, background .2s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav-links a.active { color: var(--text); background: var(--grad-soft); box-shadow: inset 0 0 0 1px rgba(255, 143, 74, .28); }

.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  transition: all .2s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255, 255, 255, .1); transform: translateY(-1px); }

.nav-burger { display: none; }

/* Mobile slide-down menu */
#mobile-panel {
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  z-index: 199;
  background: rgba(10, 10, 16, .97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  padding: 10px clamp(16px, 4vw, 48px) 18px;
  display: flex; flex-direction: column;
  transform: translateY(-14px);
  opacity: 0; visibility: hidden;
  transition: opacity .28s var(--ease), transform .28s var(--ease), visibility .28s;
}
#mobile-panel.open { opacity: 1; visibility: visible; transform: none; }
#mobile-panel a {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 6px;
  font-size: 1.02rem; font-weight: 500;
  border-bottom: 1px solid var(--line);
}
#mobile-panel a:last-child { border-bottom: 0; }
#mobile-panel a i { color: var(--tea); width: 22px; text-align: center; font-size: .95rem; }

/* ============================ Buttons ============================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 24px;
  border-radius: var(--r-pill);
  font-weight: 600; font-size: .95rem;
  border: 1px solid transparent;
  transition: transform .2s var(--ease), box-shadow .25s, background .25s, border-color .25s;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--grad); color: #14060a; box-shadow: 0 10px 30px rgba(255, 95, 46, .34); }
.btn-primary:hover { box-shadow: 0 16px 40px rgba(255, 95, 46, .5); }
.btn-ghost { background: rgba(255, 255, 255, .07); border-color: var(--line-strong); color: var(--text); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255, 255, 255, .14); }
.btn-sm { padding: 9px 17px; font-size: .86rem; }

/* ============================ Search overlay ============================ */
.search-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(4, 4, 8, .8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0; visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s;
  padding-top: 12vh;
}
.search-overlay.open { opacity: 1; visibility: visible; }
.search-box { width: min(760px, 92vw); margin-inline: auto; }
.search-field {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  padding: 6px 8px 6px 22px;
  box-shadow: var(--shadow);
}
.search-field i { color: var(--tea); font-size: 1.05rem; }
.search-field input {
  flex: 1; background: none; border: 0; outline: none;
  font-size: 1.06rem; padding: 15px 0; min-width: 0;
}
.search-field input::placeholder { color: var(--dim); }

.suggest-list { margin-top: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.suggest-item {
  display: flex; align-items: center; gap: 13px;
  width: 100%; text-align: left;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  transition: background .18s;
}
.suggest-item:last-child { border-bottom: 0; }
.suggest-item:hover, .suggest-item.hl { background: rgba(255, 95, 46, .12); }
.suggest-item i { color: var(--dim); font-size: .85rem; }
.suggest-item strong { font-weight: 500; font-size: .97rem; }
.search-hint { text-align: center; color: var(--dim); font-size: .84rem; margin-top: 18px; }
.search-hint kbd {
  background: rgba(255, 255, 255, .08); border: 1px solid var(--line);
  border-radius: 5px; padding: 2px 7px; font-size: .78rem; font-family: inherit;
}

/* ============================ Hero ============================ */
.hero {
  position: relative;
  height: min(88vh, 780px);
  min-height: 540px;
  overflow: hidden;
  z-index: 1;
}
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1s var(--ease);
  pointer-events: none;
}
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center 22%;
  transform: scale(1.06);
  animation: heroDrift 20s ease-in-out infinite alternate;
}
@keyframes heroDrift { from { transform: scale(1.04) translateX(0); } to { transform: scale(1.13) translateX(-1.4%); } }
.hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--bg) 2%, rgba(7, 7, 11, .72) 34%, rgba(7, 7, 11, .18) 66%, rgba(7, 7, 11, .5) 100%),
    linear-gradient(to right, rgba(7, 7, 11, .95) 0%, rgba(7, 7, 11, .55) 46%, transparent 78%);
}
.hero-body {
  position: relative; z-index: 2;
  height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: clamp(60px, 9vh, 108px);
  max-width: 660px;
}
.hero-badges { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.hero-title {
  font-size: clamp(2.1rem, 6vw, 4.1rem);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -1.8px;
  margin-bottom: 14px;
  text-shadow: 0 6px 40px rgba(0, 0, 0, .6);
}
.hero-desc {
  color: #cfcfdd;
  font-size: clamp(.95rem, 1.5vw, 1.06rem);
  margin-bottom: 26px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  max-width: 560px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-dots { position: absolute; bottom: 30px; right: clamp(16px, 4vw, 48px); z-index: 3; display: flex; gap: 9px; }
.hero-dots button {
  width: 26px; height: 4px; border-radius: 4px;
  background: rgba(255, 255, 255, .26);
  transition: all .3s var(--ease);
}
.hero-dots button.on { background: var(--grad); width: 44px; }

/* ============================ Chips / badges ============================ */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: .78rem; font-weight: 600;
  background: rgba(255, 255, 255, .09);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  white-space: nowrap;
}
.chip-imdb { background: rgba(245, 197, 24, .16); border-color: rgba(245, 197, 24, .4); color: #f5c518; }
.chip-hot { background: var(--grad); border-color: transparent; color: #180a05; }
.chip-mint { background: rgba(46, 230, 168, .14); border-color: rgba(46, 230, 168, .34); color: var(--mint); }

/* ============================ Section head ============================ */
.section { margin-top: clamp(38px, 6vw, 62px); position: relative; z-index: 1; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; margin-bottom: 20px;
}
.section-title { font-size: clamp(1.2rem, 2.4vw, 1.62rem); font-weight: 700; letter-spacing: -.6px; display: flex; align-items: center; gap: 11px; }
.section-title::before {
  content: ''; width: 5px; height: 1.05em;
  border-radius: 4px; background: var(--grad); flex-shrink: 0;
}
.section-sub { color: var(--dim); font-size: .88rem; margin-top: 3px; }
.rail-nav { display: flex; gap: 8px; flex-shrink: 0; }

/* ============================ Rail ============================ */
.rail-viewport { position: relative; }
.rail {
  display: flex; gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 6px 4px 20px;
  margin-inline: -4px;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; flex: 0 0 auto; width: clamp(148px, 20vw, 198px); }

/* ============================ Poster card ============================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 18vw, 186px), 1fr));
  gap: clamp(14px, 2vw, 22px);
}

.card { position: relative; display: block; }
.card-art {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface-2) center/cover no-repeat;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
  transition: transform .38s var(--ease), box-shadow .38s var(--ease);
}
.card-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .4s; }
.card:hover .card-art { transform: translateY(-7px) scale(1.022); box-shadow: 0 22px 48px rgba(0, 0, 0, .62); }
.card:hover .card-art img { transform: scale(1.09); filter: brightness(.72); }

.card-shade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(4, 4, 8, .92) 0%, rgba(4, 4, 8, .25) 38%, transparent 62%);
  opacity: 0; transition: opacity .35s var(--ease);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 14px;
  gap: 8px;
}
.card:hover .card-shade { opacity: 1; }
.card-play {
  position: absolute; top: 50%; left: 50%;
  width: 52px; height: 52px;
  margin: -26px 0 0 -26px;
  border-radius: 50%;
  background: var(--grad);
  display: grid; place-items: center;
  color: #14060a; font-size: 1.05rem;
  transform: scale(.6); opacity: 0;
  transition: all .35s var(--ease);
  box-shadow: 0 8px 26px rgba(255, 95, 46, .5);
}
.card:hover .card-play { transform: scale(1); opacity: 1; }

.card-corner {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  padding: 4px 9px; border-radius: 7px;
  font-size: .7rem; font-weight: 700;
  background: rgba(4, 4, 8, .72);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
}
.card-corner.hot { background: var(--grad); color: #180a05; border-color: transparent; }

.card-rate {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  display: flex; align-items: center; gap: 4px;
  padding: 4px 8px; border-radius: 7px;
  font-size: .72rem; font-weight: 700;
  background: rgba(4, 4, 8, .72);
  backdrop-filter: blur(8px);
  color: #f5c518;
  border: 1px solid rgba(245, 197, 24, .28);
}

.card-fav {
  position: absolute; bottom: 10px; right: 10px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(4, 4, 8, .7);
  border: 1px solid var(--line-strong);
  color: #fff; font-size: .8rem;
  opacity: 0; transform: translateY(6px);
  transition: all .3s var(--ease);
  backdrop-filter: blur(8px);
}
.card:hover .card-fav { opacity: 1; transform: translateY(0); }
.card-fav:hover { background: var(--tea); border-color: var(--tea); }
.card-fav.on { color: var(--tea); opacity: 1; transform: translateY(0); }
.card-fav.on:hover { color: #fff; }

.card-meta { padding: 11px 3px 0; }
.card-name {
  font-size: .93rem; font-weight: 600; line-height: 1.32;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-sub { color: var(--dim); font-size: .78rem; margin-top: 3px; display: flex; align-items: center; gap: 7px; }

/* Progress bar (continue watching) */
.card-prog { position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: rgba(255, 255, 255, .18); z-index: 2; }
.card-prog span { display: block; height: 100%; background: var(--grad); }

/* ============================ Detail page ============================ */
.detail-hero { position: relative; padding-top: calc(var(--nav-h) + 30px); overflow: hidden; z-index: 1; }
.detail-bg {
  position: absolute; inset: 0; height: 620px;
  background-size: cover; background-position: center 18%;
  filter: blur(2px);
  transform: scale(1.05);
}
.detail-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 4%, rgba(7, 7, 11, .86) 42%, rgba(7, 7, 11, .6) 100%);
}
.detail-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 268px) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 44px);
  padding: clamp(24px, 5vh, 56px) 0 10px;
  align-items: start;
}
.detail-poster {
  aspect-ratio: 2/3; border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow); background: var(--surface-2);
  border: 1px solid var(--line);
}
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-title { font-size: clamp(1.75rem, 4.4vw, 3.05rem); font-weight: 800; letter-spacing: -1.4px; line-height: 1.06; margin-bottom: 12px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 18px; }
.detail-overview { color: #c8c8d8; max-width: 780px; margin-bottom: 22px; font-size: 1rem; }
.detail-cta { display: flex; gap: 11px; flex-wrap: wrap; margin-bottom: 26px; }
.fact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; max-width: 720px; }
.fact {
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 15px;
}
.fact dt { color: var(--dim); font-size: .74rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.fact dd { font-size: .93rem; font-weight: 500; }

/* Episode picker */
.ep-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.select {
  appearance: none;
  background: var(--surface-2) ;
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: var(--r-pill);
  padding: 10px 40px 10px 18px;
  font-size: .9rem; font-weight: 500;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a9aae' stroke-width='2.5'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 15px;
}
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; }
.ep-btn {
  padding: 12px 6px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--line);
  font-weight: 600; font-size: .9rem;
  transition: all .22s var(--ease);
}
.ep-btn:hover { border-color: var(--tea); color: var(--tea-2); transform: translateY(-2px); }
.ep-btn.on { background: var(--grad); color: #14060a; border-color: transparent; }

/* ============================ Player ============================ */
.player-shell { padding-top: calc(var(--nav-h) + 18px); position: relative; z-index: 1; }
.player-frame {
  position: relative;
  background: #000;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  aspect-ratio: 16/9;
}
.player-frame video { width: 100%; height: 100%; display: block; background: #000; }
.player-msg {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center; gap: 14px;
  text-align: center; padding: 26px;
  background: radial-gradient(circle at 50% 40%, #16161f, #07070b);
}
.player-msg i { font-size: 2.3rem; color: var(--tea); }
.player-msg p { color: var(--muted); max-width: 460px; }

.player-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 16px; padding: 14px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
}
.quality-row { display: flex; gap: 8px; flex-wrap: wrap; }
.q-btn {
  padding: 7px 15px; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: .84rem; font-weight: 600;
  transition: all .2s var(--ease);
}
.q-btn:hover { border-color: var(--line-strong); }
.q-btn.on { background: var(--grad); color: #14060a; border-color: transparent; }

/* ============================ Toolbar (catalog) ============================ */
.page-head { margin-bottom: 26px; }
.page-title { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -1.2px; }
.page-desc { color: var(--muted); margin-top: 7px; }

.toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; margin-bottom: 26px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
}
.toolbar-label { color: var(--dim); font-size: .84rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.tab-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  padding: 8px 16px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line);
  font-size: .87rem; font-weight: 600; color: var(--muted);
  transition: all .2s var(--ease);
}
.tab:hover { color: var(--text); border-color: var(--line-strong); }
.tab.on { background: var(--grad); color: #14060a; border-color: transparent; }

.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 44px; }
.pager-info { color: var(--muted); font-size: .9rem; min-width: 108px; text-align: center; }

/* ============================ States ============================ */
.skel-art {
  aspect-ratio: 2/3; border-radius: var(--r);
  background: linear-gradient(100deg, #14141e 28%, #1e1e2c 48%, #14141e 68%);
  background-size: 220% 100%;
  animation: shimmer 1.4s infinite linear;
}
.skel-line {
  height: 11px; border-radius: 6px; margin-top: 11px;
  background: linear-gradient(100deg, #14141e 28%, #1e1e2c 48%, #14141e 68%);
  background-size: 220% 100%;
  animation: shimmer 1.4s infinite linear;
}
.skel-line.short { width: 55%; }
@keyframes shimmer { from { background-position: 180% 0; } to { background-position: -60% 0; } }

.empty {
  text-align: center; padding: 66px 22px;
  border: 1px dashed var(--line-strong); border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .02);
}
.empty i { font-size: 2.4rem; color: var(--dim); margin-bottom: 16px; display: block; }
.empty h3 { font-size: 1.16rem; margin-bottom: 8px; }
.empty p { color: var(--muted); max-width: 480px; margin: 0 auto 18px; font-size: .94rem; }

.toast-stack { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 600; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 22px; border-radius: var(--r-pill);
  background: rgba(20, 20, 30, .95);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  font-size: .92rem; font-weight: 500;
  animation: toastIn .35s var(--ease);
  backdrop-filter: blur(12px);
}
.toast i { color: var(--mint); }
.toast.err i { color: #ff6b5f; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ============================ Setup banner ============================ */
.api-banner {
  position: relative; z-index: 5;
  margin: 0 auto;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 20px;
  background: linear-gradient(100deg, rgba(255, 95, 46, .14), rgba(255, 176, 58, .07));
  border: 1px solid rgba(255, 143, 74, .3);
  border-radius: var(--r);
  font-size: .92rem;
}
.api-banner i { color: var(--tea-2); font-size: 1.1rem; }
.api-banner p { flex: 1; min-width: 220px; color: #e4e4ef; }

/* ============================ Footer ============================ */
.site-foot {
  position: relative; z-index: 1;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 50px 0 30px;
  margin-top: 70px;
}
.foot-grid { display: grid; grid-template-columns: 1.5fr repeat(auto-fit, minmax(140px, 1fr)); gap: 34px; margin-bottom: 34px; }
.foot-about p { color: var(--muted); font-size: .9rem; margin-top: 14px; max-width: 330px; }
.foot-col h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: 1.4px; color: var(--dim); margin-bottom: 14px; }
.foot-col a { display: block; color: var(--muted); font-size: .91rem; padding: 5px 0; transition: color .2s; }
.foot-col a:hover { color: var(--tea-2); }
.foot-bottom {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  color: var(--dim); font-size: .85rem;
}

/* ============================ Modal (settings) ============================ */
.modal {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(4, 4, 8, .74);
  backdrop-filter: blur(10px);
  display: grid; place-items: center;
  padding: 22px;
  opacity: 0; visibility: hidden;
  transition: opacity .28s var(--ease), visibility .28s;
}
.modal.open { opacity: 1; visibility: visible; }
.modal-card {
  width: min(540px, 100%);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  transform: translateY(14px) scale(.98);
  transition: transform .3s var(--ease);
  max-height: 86vh; overflow-y: auto;
}
.modal.open .modal-card { transform: none; }
.modal-card h3 { font-size: 1.24rem; margin-bottom: 8px; }
.modal-card > p { color: var(--muted); font-size: .92rem; margin-bottom: 20px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .84rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.field input {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 13px 16px;
  outline: none;
  transition: border-color .2s;
  font-size: .95rem;
}
.field input:focus { border-color: var(--tea); }
.field small { display: block; color: var(--dim); font-size: .8rem; margin-top: 7px; line-height: 1.5; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 22px; }

.code-line {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 11px 14px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .82rem; color: var(--tea-2);
  overflow-x: auto; white-space: nowrap;
  margin-bottom: 10px;
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============================ Responsive ============================ */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-burger { display: grid; }
  .detail-grid { grid-template-columns: minmax(0, 210px) minmax(0, 1fr); }
}

@media (max-width: 720px) {
  :root { --nav-h: 60px; }
  .brand-mark { width: 34px; height: 34px; font-size: .95rem; }
  .brand-text { font-size: 1.08rem; }

  .hero { height: auto; min-height: 0; padding-top: calc(var(--nav-h) + 8px); }
  .hero-slide { position: relative; display: none; }
  .hero-slide.active { display: block; }
  .hero-bg { position: absolute; inset: 0 0 auto 0; height: 100%; animation: none; transform: none; }
  .hero-veil {
    background:
      linear-gradient(to top, var(--bg) 6%, rgba(7, 7, 11, .78) 40%, rgba(7, 7, 11, .3) 100%);
  }
  .hero-body { max-width: none; padding-top: 34vh; padding-bottom: 34px; }
  .hero-title { letter-spacing: -1px; }
  .hero-desc { -webkit-line-clamp: 3; font-size: .93rem; }
  .hero-cta .btn { flex: 1 1 auto; }
  .hero-dots { position: static; justify-content: center; margin-top: 4px; padding-bottom: 8px; }

  .rail > * { width: 43vw; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 13px; }

  .detail-grid { grid-template-columns: 1fr; }
  .detail-poster { width: min(190px, 46vw); }
  .detail-bg { height: 420px; }

  .card:hover .card-art { transform: none; }
  .card-fav { opacity: 1; transform: none; }

  .toolbar { padding: 12px 14px; }
  .search-overlay { padding-top: 8vh; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .foot-about { grid-column: 1 / -1; }
  .player-bar { padding: 12px 14px; }
}

@media (max-width: 420px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .rail > * { width: 47vw; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
