/* ==========================================================================
   BoredFlix clone — design system
   Dark theme, amber/orange accent, Inter + Outfit type, glassmorphism chrome.
   ========================================================================== */

:root {
  --bg: #080808;
  --surface: #0b0b0b;
  --surface-2: #1c1c1e;
  --card-bg: #111111;

  --text: #ffffff;
  --text-90: rgba(255, 255, 255, 0.9);
  --text-muted: rgba(255, 255, 255, 0.5);
  --text-dim: rgba(255, 255, 255, 0.3);

  --amber-300: #fcd34d;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --orange-400: #fb923c;
  --orange-600: #ea580c;
  --violet-400: #a78bfa;
  --cyan-400: #22d3ee;
  --pink-400: #f472b6;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --green-600: #16a34a;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --red-700: #b91c1c;
  --rose-600: #e11d48;
  --yellow-500: #eab308;

  --netflix: #e50914;
  --max: #002be7;
  --disney: #1a3fc4;
  --disney-tile: #0c1c5b;
  --prime: #00a8e0;

  --border-soft: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;

  --rail-w: 68px;

  --font-body: "Inter", "Inter Fallback", Arial, sans-serif;
  --font-display: "Outfit", "Outfit Fallback", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 999px; }

.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { scrollbar-width: none; -ms-overflow-style: none; }

button:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- app shell ---------- */
.app-shell {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  min-height: 100vh;
}
@media (max-width: 760px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- left icon rail ---------- */
.icon-rail {
  position: sticky; top: 0; height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border-soft);
  display: flex; flex-direction: column; align-items: center;
  padding: 18px 0;
  gap: 6px;
  z-index: 40;
  overflow: hidden;
  transition: width .18s ease;
  width: var(--rail-w);
}
.icon-rail:hover { width: 208px; align-items: stretch; }
.rail-logo {
  display: flex; align-items: center; justify-content: center;
  height: 40px; margin-bottom: 18px; flex-shrink: 0;
  overflow: hidden;
}
.icon-rail:hover .rail-logo { justify-content: flex-start; padding-left: 18px; }
.rail-logo .logo-word { display: none; }
.icon-rail:hover .rail-logo .logo-word { display: inline; }
.rail-nav { display: flex; flex-direction: column; gap: 2px; width: 100%; flex: 1; }
.rail-section-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-dim); padding: 14px 0 6px 22px; white-space: nowrap;
  opacity: 0; transition: opacity .15s ease;
}
.icon-rail:hover .rail-section-label { opacity: 1; }
.rail-item {
  display: flex; align-items: center; gap: 14px;
  height: 44px; padding: 0 22px;
  color: rgba(255,255,255,0.5);
  border-radius: var(--radius-md);
  margin: 0 8px; white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.icon-rail:hover .rail-item { margin: 0 8px; }
.rail-item svg { flex-shrink: 0; width: 20px; height: 20px; }
.rail-item span { font-size: 13px; font-weight: 500; opacity: 0; transition: opacity .15s ease; }
.icon-rail:hover .rail-item span { opacity: 1; }
.rail-item:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.rail-item.active { color: var(--amber-300); background: rgba(245,158,11,0.16); }
.rail-item.active svg { color: var(--amber-400); }

.rail-provider .tile {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 800; color: #fff;
}
.rail-provider[data-p="netflix"] .tile { background: #000; color: var(--netflix); border: 1px solid rgba(255,255,255,.1); }
.rail-provider[data-p="max"] .tile { background: var(--max); }
.rail-provider[data-p="disney"] .tile { background: var(--disney-tile); }
.rail-provider[data-p="prime"] .tile { background: var(--prime); color: #04202b; }
.rail-provider span { color: var(--text-muted); }
.rail-provider:hover span { color: var(--text); }

/* ---------- top search bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 20px;
  padding: 16px 24px;
  background: linear-gradient(to bottom, rgba(8,8,8,.85), rgba(8,8,8,0));
  pointer-events: none;
}
.topbar.solid { background: rgba(8,8,8,.86); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border-soft); pointer-events: auto; }
.topbar .logo-mark { flex-shrink: 0; pointer-events: auto; }
@media (max-width: 760px) { .topbar .logo-mark { display: none; } }
.topbar-search-wrap { flex: 1; display: flex; justify-content: center; min-width: 0; }
.search-shell { pointer-events: auto; width: 100%; max-width: 480px; position: relative; }
.search-input-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  background: linear-gradient(140deg, rgba(18,18,22,.9), rgba(10,10,12,.82));
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(20px);
}
.search-input-wrap:focus-within { border-color: rgba(252,211,77,.35); box-shadow: 0 0 0 3px rgba(252,211,77,.12); }
.search-input-wrap svg { color: var(--text-muted); flex-shrink: 0; width: 17px; height: 17px; }
.search-input-wrap input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-size: 14px;
}
.search-input-wrap input::placeholder { color: var(--text-dim); }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: #121214; border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,.5);
  display: none; max-height: 420px; overflow-y: auto;
}
.search-results.open { display: block; }
.search-result-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; border-bottom: 1px solid var(--border-soft);
}
.search-result-row:last-child { border-bottom: none; }
.search-result-row:hover { background: rgba(255,255,255,0.04); }
.search-result-row img { width: 36px; height: 54px; object-fit: cover; border-radius: 4px; background: #1a1a1a; }
.search-result-meta { min-width: 0; }
.search-result-meta .t { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-meta .y { font-size: 11px; color: var(--text-muted); }
.search-empty { padding: 24px 16px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ---------- mobile chrome ---------- */
.mobile-header, .mobile-tabbar { display: none; }
@media (max-width: 760px) {
  .mobile-header {
    display: flex; align-items: center; justify-content: space-between;
    position: fixed; top: 10px; left: 10px; right: 10px; z-index: 50;
    background: rgba(28,28,30,0.95); backdrop-filter: blur(24px);
    border: 1px solid var(--border-soft); border-radius: var(--radius-full);
    padding: 8px 14px;
  }
  .mobile-tabbar {
    display: flex; justify-content: space-around; align-items: center;
    position: fixed; bottom: 10px; left: 10px; right: 10px; z-index: 50;
    background: rgba(28,28,30,0.95); backdrop-filter: blur(24px);
    border: 1px solid var(--border-soft); border-radius: var(--radius-full);
    padding: 8px 6px;
  }
  .mtab { display: flex; flex-direction: column; align-items: center; gap: 3px; color: rgba(255,255,255,.4); background: none; border: none; padding: 4px 8px; }
  .mtab svg { width: 19px; height: 19px; }
  .mtab span { font-size: 9.5px; font-weight: 600; }
  .mtab.active { color: var(--amber-300); }
  .content-col { padding-top: 74px !important; padding-bottom: 84px !important; }
}
.mobile-header-left { display: flex; align-items: center; gap: 8px; }

/* ---------- main content column ---------- */
.content-col { min-width: 0; }
.page-pad { padding: 0 28px 60px; }
@media (max-width: 640px) { .page-pad { padding: 0 14px 60px; } }

/* ---------- hero ---------- */
.hero-shell { position: relative; height: 62vh; min-height: 420px; overflow: hidden; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease;
  pointer-events: none;
}
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-slide img.backdrop { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.hero-scrim-v { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.25) 45%, transparent 80%); }
.hero-scrim-h { position: absolute; inset: 0; background: linear-gradient(to right, rgba(0,0,0,.5) 0%, rgba(0,0,0,.12) 45%, transparent 80%); }
.hero-fade-bottom { position: absolute; left: 0; right: 0; bottom: -1px; height: 120px; background: linear-gradient(to top, var(--bg), transparent); }
.hero-content { position: absolute; left: 0; right: 0; bottom: 48px; padding: 0 40px; max-width: 640px; z-index: 2; }
@media (max-width: 640px) { .hero-content { padding: 0 18px; bottom: 30px; } }
.hero-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 5vw, 44px); letter-spacing: -0.02em; margin: 0 0 10px; text-shadow: 0 4px 20px rgba(0,0,0,.5); }
.hero-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.rating-pill { background: var(--yellow-500); color: #1a1400; font-weight: 700; font-size: 12.5px; padding: 3px 9px; border-radius: var(--radius-full); display: inline-flex; align-items: center; gap: 4px; }
.hero-meta .year { color: #d1d5db; font-size: 13px; }
.hero-meta .genres { color: var(--text-muted); font-size: 13px; }
.hero-overview { color: rgba(255,255,255,.82); font-size: 14.5px; line-height: 1.55; margin: 0 0 18px; max-width: 560px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-actions { display: flex; align-items: center; gap: 10px; }
.btn-watch { background: var(--red-600); color: #fff; font-weight: 600; font-size: 14px; padding: 11px 22px; border-radius: var(--radius-md); border: none; display: inline-flex; align-items: center; gap: 8px; }
.btn-watch:hover { background: var(--red-700); }
.btn-icon { width: 42px; height: 42px; border-radius: var(--radius-md); background: rgba(31,31,35,.7); border: 1px solid var(--border-soft); display: flex; align-items: center; justify-content: center; color: #fff; }
.btn-icon.saved { color: var(--amber-400); border-color: rgba(251,191,36,.4); }
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 38px; height: 38px; border-radius: 999px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.15); color: #fff; display: flex; align-items: center; justify-content: center; opacity: .0; transition: opacity .2s ease, background .2s ease; }
.hero-shell:hover .hero-arrow { opacity: .85; }
.hero-arrow:hover { background: rgba(0,0,0,.6); }
.hero-arrow.prev { left: 16px; } .hero-arrow.next { right: 16px; }
.hero-dots { position: absolute; bottom: 18px; right: 24px; display: flex; gap: 6px; z-index: 3; }
.hero-dot { width: 6px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.3); border: none; padding: 0; }
.hero-dot.active { background: var(--amber-400); width: 18px; transition: width .2s ease; }

/* ---------- content rows ---------- */
.row-section { padding: 26px 0 4px; }
.row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 12px; }
.row-title-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row-accent { width: 4px; height: 18px; border-radius: 999px; flex-shrink: 0; }
.row-title { font-size: 17px; font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-toggle { display: flex; gap: 2px; background: rgba(255,255,255,.05); border-radius: 999px; padding: 3px; flex-shrink: 0; }
.row-toggle button { border: none; background: transparent; color: rgba(255,255,255,.5); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 6px 12px; border-radius: 999px; }
.row-toggle button.active { color: #0a0a0a; }
.row-scroll-wrap { position: relative; }
.row-scroll { display: flex; gap: 12px; overflow-x: auto; scroll-behavior: smooth; padding: 2px 2px 10px; }
.row-scroll-arrow { position: absolute; left: 0; top: 0; bottom: 10px; width: 44px; display: flex; align-items: center; justify-content: center; background: linear-gradient(to right, var(--bg), transparent); border: none; color: #fff; opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 2; }
.row-scroll-wrap:hover .row-scroll-arrow { opacity: 1; pointer-events: auto; }
.row-scroll-arrow.right { right: 0; left: auto; background: linear-gradient(to left, var(--bg), transparent); }
/* at a scroll boundary the corresponding arrow can't do anything — hide it so it
   never sits on top of (and swallows clicks meant for) the edge card underneath */
.row-scroll-wrap.at-start .row-scroll-arrow.left,
.row-scroll-wrap.at-end .row-scroll-arrow.right { opacity: 0 !important; pointer-events: none !important; }

/* ---------- homepage about/content section ---------- */
.about-section { padding: 54px 40px 64px; border-top: 1px solid var(--border-soft); margin-top: 30px; }
@media (max-width: 640px) { .about-section { padding: 40px 18px 50px; } }
.about-intro { max-width: 880px; margin-bottom: 32px; }
.about-section h2 { font-family: var(--font-display); font-size: 26px; font-weight: 700; margin: 0 0 14px; letter-spacing: -0.01em; }
.about-section p { color: rgba(255,255,255,.72); font-size: 14.5px; line-height: 1.75; margin: 0; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.about-card { background: rgba(255,255,255,.03); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 22px; }
.about-icon { width: 36px; height: 36px; border-radius: 10px; background: rgba(245,158,11,.14); color: var(--amber-400); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.about-icon svg { width: 18px; height: 18px; }
.about-card h3 { font-size: 15px; font-weight: 600; margin: 0 0 8px; color: var(--text-90); }
.about-card p { font-size: 13.5px; line-height: 1.65; }
.about-closing { max-width: 880px; margin-top: 30px !important; }

/* ---------- policy / info page content (About, Privacy, Disclaimer, Contact) ---------- */
.policy-layout { display: flex; gap: 60px; align-items: flex-start; }
@media (max-width: 900px) { .policy-layout { display: block; } }
.policy-content { max-width: 760px; flex: 1 1 auto; min-width: 0; padding-bottom: 50px; }
.policy-content .updated { color: var(--text-dim); font-size: 12.5px; margin: -8px 0 24px; }
.policy-content h2 { font-size: 18px; font-weight: 700; color: var(--text-90); margin: 30px 0 10px; scroll-margin-top: 90px; }
.policy-content h2:first-of-type { margin-top: 4px; }
.policy-content p { color: rgba(255,255,255,.72); font-size: 14.5px; line-height: 1.75; margin: 0 0 10px; }
.policy-content a { color: var(--amber-300); }
.policy-content a:hover { text-decoration: underline; }

.policy-toc { width: 220px; flex-shrink: 0; position: sticky; top: 90px; }
@media (max-width: 900px) { .policy-toc { display: none; } }
.policy-toc-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); margin: 0 0 12px; }
.policy-toc nav { display: flex; flex-direction: column; border-left: 2px solid var(--border-soft); }
.policy-toc a { padding: 7px 0 7px 16px; margin-left: -2px; font-size: 13px; color: var(--text-muted); border-left: 2px solid transparent; }
.policy-toc a:hover { color: var(--text-90); }
.policy-toc a.active { color: var(--amber-300); border-left-color: var(--amber-400); }

/* ---------- contact form ---------- */
.contact-form { max-width: 560px; display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: 13px; font-weight: 600; color: var(--text-90); }
.form-row input, .form-row textarea {
  background: rgba(255,255,255,.04); border: 1px solid var(--border-soft); border-radius: var(--radius-md);
  padding: 10px 12px; color: var(--text); font-size: 14px; font-family: inherit;
}
.form-row input:focus, .form-row textarea:focus {
  outline: none; border-color: rgba(252,211,77,.4); box-shadow: 0 0 0 3px rgba(252,211,77,.12);
}
.form-row textarea { resize: vertical; }
.contact-form .btn-watch { align-self: flex-start; }
.form-status { font-size: 13px; color: var(--text-muted); margin: 4px 0 0; min-height: 18px; }
.form-status.shown { color: var(--amber-300); }

/* ---------- cards ---------- */
.card { flex: none; width: 128px; text-decoration: none; display: block; position: relative; }
@media (min-width: 640px) { .card { width: 140px; } }
.card-poster-wrap { position: relative; aspect-ratio: 2/3; border-radius: var(--radius-md); overflow: hidden; background: #111; box-shadow: 0 2px 6px rgba(0,0,0,.4); transition: transform .18s ease; }
.card:hover .card-poster-wrap { transform: scale(1.035); }
.card-poster-wrap img { width: 100%; height: 100%; object-fit: cover; }
.card-rating { position: absolute; top: 6px; right: 6px; font-size: 9px; font-weight: 800; color: #fff; padding: 2px 6px; border-radius: 999px; z-index: 2; }
.card-rating.good { background: linear-gradient(to right, var(--emerald-500), var(--green-600)); }
.card-rating.mid { background: linear-gradient(to right, var(--amber-500), var(--orange-600)); }
.card-rating.low { background: linear-gradient(to right, var(--red-500), var(--rose-600)); }
.card-add {
  position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; border-radius: 999px;
  background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.2); color: #fff;
  display: flex; align-items: center; justify-content: center; z-index: 2;
}
.card-add.saved { background: var(--amber-400); color: #1a1200; border-color: var(--amber-400); }
.card-overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 7px; background: linear-gradient(to top, rgba(0,0,0,.92), transparent); }
.card-overlay .ct { font-size: 11.5px; font-weight: 600; color: rgba(255,255,255,.92); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-overlay .cy { font-size: 10px; color: rgba(255,255,255,.5); }

/* ---------- grid (browse pages) ---------- */
.grid-header { padding: 40px 0 20px; }
.grid-title { font-family: var(--font-display); font-size: 30px; font-weight: 700; margin: 0 0 6px; }
.grid-sub { color: var(--text-muted); font-size: 14px; margin: 0; }
.grid-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 18px 0 22px; }
.pill-group { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-btn { background: rgba(255,255,255,.05); border: 1px solid var(--border-soft); color: var(--text-muted); font-size: 12.5px; font-weight: 600; padding: 7px 14px; border-radius: 999px; }
.pill-btn.active { background: var(--amber-500); border-color: var(--amber-500); color: #1a1200; }
.select-sort { background: rgba(255,255,255,.05); border: 1px solid var(--border-soft); color: var(--text); font-size: 12.5px; padding: 8px 12px; border-radius: var(--radius-md); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px 14px; padding-bottom: 60px; }
.card-grid .card { width: auto; }
.grid-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }

/* ---------- provider hero strip ---------- */
.provider-strip { display: flex; align-items: center; gap: 14px; padding: 46px 0 10px; }
.provider-tile { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.provider-strip[data-p="netflix"] .provider-tile { background: #000; color: var(--netflix); border: 1px solid var(--border-strong); }
.provider-strip[data-p="max"] .provider-tile { background: var(--max); color: #fff; }
.provider-strip[data-p="disney"] .provider-tile { background: var(--disney-tile); color: #fff; }
.provider-strip[data-p="prime"] .provider-tile { background: var(--prime); color: #04202b; }
.provider-strip h1 { font-family: var(--font-display); font-size: 26px; margin: 0; }
.provider-strip p { margin: 4px 0 0; color: var(--text-muted); font-size: 13.5px; }

/* ---------- detail page ---------- */
.detail-hero { position: relative; min-height: 46vh; overflow: hidden; }
.detail-hero img.backdrop { width: 100%; height: 100%; object-fit: cover; object-position: top; position: absolute; inset: 0; }
.detail-hero-scrim { position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 4%, rgba(8,8,8,.55) 45%, rgba(8,8,8,.25) 100%); }
.detail-body { position: relative; z-index: 2; display: flex; gap: 28px; padding: 40px 40px 0; margin-top: -120px; }
@media (max-width: 760px) { .detail-body { flex-direction: column; padding: 30px 18px 0; margin-top: -80px; } }
.detail-poster { width: 220px; flex-shrink: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.6); background: #111; }
.detail-poster img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
@media (max-width: 760px) { .detail-poster { width: 150px; } }
.detail-info { min-width: 0; padding-top: 8px; }
.detail-title { font-family: var(--font-display); font-size: clamp(24px, 4vw, 36px); font-weight: 700; margin: 0 0 10px; letter-spacing: -0.01em; }
.detail-meta-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.badge-type { background: rgba(255,255,255,.08); color: var(--text-90); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 4px 10px; border-radius: 999px; }
.genre-pill { background: rgba(255,255,255,.06); border: 1px solid var(--border-soft); color: var(--text-muted); font-size: 12px; padding: 5px 12px; border-radius: 999px; }
.genre-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.detail-overview { color: rgba(255,255,255,.82); font-size: 15px; line-height: 1.65; max-width: 680px; margin: 0 0 22px; }
.detail-actions { display: flex; gap: 10px; margin-bottom: 8px; }
.btn-save-lg {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1.5px solid var(--amber-400); color: var(--amber-300);
  font-weight: 600; font-size: 14px; padding: 11px 20px; border-radius: var(--radius-md);
}
.btn-save-lg.saved { background: var(--amber-400); color: #1a1200; }
.btn-save-lg svg { width: 17px; height: 17px; }

.related-section { padding: 10px 0 40px; }

/* ---------- library page ---------- */
.lib-page-tabs { display: flex; gap: 8px; margin: 8px 0 26px; }
.lib-page-tabs button { background: rgba(255,255,255,.05); border: 1px solid var(--border-soft); color: var(--text-muted); font-size: 13px; font-weight: 600; padding: 9px 18px; border-radius: 999px; }
.lib-page-tabs button.active { background: var(--amber-500); border-color: var(--amber-500); color: #1a1200; }
.empty-state { text-align: center; padding: 100px 20px; color: var(--text-muted); }
.empty-state svg { color: var(--text-dim); margin-bottom: 16px; }
.empty-state h3 { color: var(--text-90); font-size: 18px; margin: 0 0 6px; }
.empty-state a { display: inline-block; margin-top: 16px; }

/* ---------- mobile search overlay ---------- */
.mobile-search-overlay {
  display: none; position: fixed; inset: 0; z-index: 70;
  background: rgba(8,8,8,.97); backdrop-filter: blur(10px);
  padding: 18px;
}
.mobile-search-overlay.open { display: block; }
.mso-inner { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.mso-inner .search-shell { flex: 1; max-width: none; }
.mso-close { background: rgba(255,255,255,.06); border: 1px solid var(--border-soft); color: #fff; width: 40px; height: 40px; border-radius: 999px; font-size: 20px; line-height: 1; flex-shrink: 0; }

/* ---------- mobile nav drawer ---------- */
.mobile-nav-drawer {
  display: none; position: fixed; inset: 0; z-index: 70;
  background: rgba(8,8,8,.97); backdrop-filter: blur(10px);
  padding: 18px; overflow-y: auto;
}
.mobile-nav-drawer.open { display: block; }
.mnd-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.mnd-links { display: flex; flex-direction: column; gap: 2px; }
.mnd-links a { padding: 13px 10px; font-size: 15px; font-weight: 600; color: var(--text-90); border-radius: var(--radius-md); }
.mnd-links a:hover { background: rgba(255,255,255,.05); }
.mnd-links a.active { color: var(--amber-300); background: rgba(245,158,11,.14); }
.mnd-links.secondary a { font-size: 13.5px; font-weight: 500; color: var(--text-muted); padding: 11px 10px; }
.mnd-divider { height: 1px; background: var(--border-soft); margin: 16px 4px; }

/* ---------- library sidebar saved grid ---------- */
.lib-panel-body { min-height: 40px; }

/* ---------- site footer ---------- */
.site-footer { border-top: 1px solid var(--border-soft); padding: 26px 40px; margin-top: 30px; }
@media (max-width: 640px) { .site-footer { padding: 20px 18px; } }
.footer-menu { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.footer-menu a { color: var(--text-muted); font-size: 13px; font-weight: 500; }
.footer-menu a:hover { color: var(--text); }

/* ---------- misc ---------- */

.logo-mark { display: flex; align-items: center; gap: 8px; }
.logo-mark svg { flex-shrink: 0; }
.logo-word { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; white-space: nowrap; }
.logo-word .b1 { color: #f5f5f4; }
.logo-word .b2 { color: #e2c78a; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ---------- responsive chrome overrides (kept last so it wins the cascade
   over .icon-rail's own unconditional `display` declaration above) ---------- */
@media (max-width: 760px) {
  .icon-rail { display: none; }
}
