/* =============================================================
   LAYE MOVIES — Cinematic Dark Interface
   TikTok-inspired reels · Netflix-style cards · Mobile-first
   ============================================================= */

/* ── FONTS ───────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ── CUSTOM PROPERTIES ───────────────────────────────────── */
:root {
  --gold:       #c9a84c;
  --gold-light: #e8c97a;
  --gold-dim:   #7a6530;
  --ink:        #080808;
  --ink-2:      #111111;
  --ink-3:      #1a1a1a;
  --ink-4:      #242424;
  --surface:    #161616;
  --surface-2:  #1e1e1e;
  --text:       #f0ede6;
  --text-dim:   #9e9a91;
  --text-ghost: #4a4740;
  --accent:     #e63946;
  --green:      #2ec4b6;

  --font-display: 'Bebas Neue', 'Impact', sans-serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;

  --shadow-card: 0 8px 32px rgba(0,0,0,.7);
  --shadow-glow: 0 0 40px rgba(201,168,76,.15);

  --nav-h:   60px;
  --header-h: 60px;
  --ease:    cubic-bezier(.22,.68,0,1.2);
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select { font-family: inherit; }

/* ── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 99px; }

/* ── APP ROOT ────────────────────────────────────────────── */
#app {
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}

/* ── BOTTOM NAV ──────────────────────────────────────────── */
#bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(8,8,8,.96);
  backdrop-filter: blur(20px) saturate(1.6);
  border-top: 1px solid rgba(201,168,76,.12);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 900;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-ghost);
  font-size: 11px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  transition: color .2s, transform .15s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.nav-btn.active { color: var(--gold); }
.nav-btn:active { transform: scale(.9); }
.nav-icon { font-size: 20px; line-height: 1; }
.nav-label { text-transform: uppercase; letter-spacing: .05em; font-size: 9px; font-weight: 500; }

/* ── ICON BUTTON ─────────────────────────────────────────── */
.icon-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  font-size: 18px;
  color: var(--text);
  transition: background .2s, transform .15s;
}
.icon-btn:hover { background: rgba(255,255,255,.12); }
.icon-btn:active { transform: scale(.9); }

/* ── BACK BUTTON ─────────────────────────────────────────── */
.back-btn {
  position: absolute;
  top: 16px; left: 16px;
  z-index: 10;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(8px);
  font-size: 20px;
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .15s;
}
.back-btn:hover { background: rgba(0,0,0,.85); }
.back-btn:active { transform: scale(.9); }

/* ── PRIMARY BUTTON ──────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: .06em;
  padding: 10px 22px;
  border-radius: var(--radius-xl);
  transition: background .2s, transform .15s var(--ease), box-shadow .2s;
}
.btn-primary:hover { background: var(--gold-light); box-shadow: 0 4px 20px rgba(201,168,76,.35); }
.btn-primary:active { transform: scale(.96); }
.btn-primary.large { font-size: 19px; padding: 13px 28px; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-size: 14px;
  padding: 9px 16px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,.12);
  transition: background .2s, border-color .2s, color .2s, transform .15s;
}
.btn-ghost.active { border-color: var(--gold); color: var(--gold); }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-ghost:active { transform: scale(.96); }

/* ── HOME VIEW ───────────────────────────────────────────── */
.home-view { padding-top: 0; }

.home-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: linear-gradient(180deg, rgba(8,8,8,.9) 0%, transparent 100%);
  backdrop-filter: blur(12px);
  z-index: 100;
}
.header-logo { display: flex; align-items: center; gap: 8px; }
.logo-mark {
  width: 34px; height: 34px;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
}
.logo-text {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: .12em;
  color: var(--text);
}
.header-actions { display: flex; gap: 8px; }

/* ── HERO ────────────────────────────────────────────────── */
.hero-section {
  position: relative;
  width: 100%;
  height: 70dvh;
  min-height: 460px;
  background-size: cover;
  background-position: center top;
  background-color: var(--ink-2);
  display: flex; align-items: flex-end;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    rgba(8,8,8,.2) 0%,
    rgba(8,8,8,.5) 55%,
    rgba(8,8,8,.97) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 24px 20px;
  width: 100%;
}
.hero-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  padding: 3px 10px;
  border-radius: 99px;
  margin-bottom: 10px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 8vw, 60px);
  letter-spacing: .04em;
  line-height: 1;
  color: var(--text);
  margin-bottom: 8px;
  text-shadow: 0 2px 20px rgba(0,0,0,.8);
}
.hero-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.dot { opacity: .4; }
.hero-desc {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 16px;
  max-width: 320px;
  line-height: 1.5;
}
.hero-actions {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}

/* ── HOME SECTIONS ───────────────────────────────────────── */
.home-sections { padding: 0 0 20px; }

.movie-row-section { padding: 24px 0 0; overflow: hidden; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: .08em;
  color: var(--text);
}
.see-all-btn {
  font-size: 18px;
  color: var(--gold);
  padding: 4px 8px;
  transition: transform .15s;
}
.see-all-btn:hover { transform: translateX(3px); }

.movie-row {
  display: flex;
  gap: 12px;
  padding: 0 16px 4px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.movie-row::-webkit-scrollbar { display: none; }

/* ── MOVIE CARD ──────────────────────────────────────────── */
.movie-card {
  flex: 0 0 140px;
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform .25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.movie-card:hover { transform: scale(1.04) translateY(-4px); }
.movie-card:active { transform: scale(.97); }

.card-poster {
  position: relative;
  width: 140px;
  height: 210px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--ink-3);
  box-shadow: var(--shadow-card);
}
.card-poster img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: filter .3s;
}
.movie-card:hover .card-poster img { filter: brightness(1.1); }

.card-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .25s;
}
.movie-card:hover .card-overlay { opacity: 1; }

.card-play {
  width: 46px; height: 46px;
  background: var(--gold);
  color: var(--ink);
  border-radius: 50%;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s var(--ease);
}
.card-play:hover { transform: scale(1.1); }

.card-fav {
  position: absolute;
  top: 8px; right: 8px;
  font-size: 18px;
  color: rgba(255,255,255,.6);
  transition: color .2s, transform .15s;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.card-fav.active { color: var(--accent); }
.card-fav:hover { transform: scale(1.2); }

.card-badge {
  position: absolute;
  top: 8px; left: 8px;
  background: rgba(201,168,76,.9);
  color: var(--ink);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 2px 6px;
  border-radius: 4px;
}

.card-info { padding: 8px 2px 0; }
.card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 136px;
}
.card-meta { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.card-rating { margin-top: 3px; }
.stars { font-size: 11px; color: var(--gold); letter-spacing: .05em; }

/* ── MOVIE GRID ──────────────────────────────────────────── */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  padding: 0 16px;
}
.movie-grid .movie-card { flex: none; width: 100%; }
.movie-grid .card-poster { width: 100%; }

/* ── GENRE SECTION ───────────────────────────────────────── */
.genre-section { padding: 24px 0 0; }
.genre-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px;
}
.genre-chip {
  display: flex; align-items: center; gap: 6px;
  background: var(--ink-3);
  border: 1px solid rgba(255,255,255,.07);
  color: var(--text);
  font-size: 13px;
  padding: 8px 14px;
  border-radius: var(--radius-xl);
  transition: background .2s, border-color .2s, transform .15s;
}
.genre-chip:hover { background: var(--ink-4); border-color: var(--gold-dim); }
.genre-chip:active { transform: scale(.96); }
.genre-icon { font-size: 16px; }

/* ── HOME FOOTER ─────────────────────────────────────────── */
.home-footer {
  text-align: center;
  padding: 32px 16px 16px;
  font-size: 12px;
  color: var(--text-ghost);
  line-height: 1.8;
}

/* ── REELS ───────────────────────────────────────────────── */
.reels-container {
  position: fixed; inset: 0;
  z-index: 500;
  background: var(--ink);
  overflow: hidden;
}

.reels-track {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  transition: transform .45s cubic-bezier(.3,.85,.25,1);
  will-change: transform;
}

.reel-card {
  position: relative;
  flex: 0 0 100dvh;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  display: flex; align-items: flex-end;
}

.reel-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--ink-2);
  filter: blur(2px) brightness(.4);
  transform: scale(1.05);
}

.reel-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(8,8,8,.1) 30%,
    rgba(8,8,8,.75) 65%,
    rgba(8,8,8,.98) 100%
  );
  z-index: 1;
}

.reel-embed-wrapper {
  position: absolute; inset: 0;
  z-index: 0;
  display: flex; align-items: center; justify-content: center;
}

.reel-iframe {
  width: 100%;
  height: 100%;
  border: none;
  object-fit: cover;
}

.reel-poster-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.reel-poster-fallback img {
  max-height: 80%;
  max-width: 60%;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0,0,0,.8);
}

.reel-info {
  position: relative;
  z-index: 2;
  padding: 0 80px 80px 20px;
  max-width: 340px;
}
.reel-badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: rgba(201,168,76,.18);
  color: var(--gold);
  border: 1px solid rgba(201,168,76,.35);
  padding: 2px 8px;
  border-radius: 99px;
  margin-bottom: 10px;
}
.reel-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 7vw, 46px);
  letter-spacing: .04em;
  color: var(--text);
  line-height: 1;
  margin-bottom: 8px;
  text-shadow: 0 2px 16px rgba(0,0,0,.8);
}
.reel-meta { font-size: 12px; color: var(--text-dim); margin-bottom: 8px; }
.reel-genres {
  display: flex; gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.genre-tag {
  background: rgba(255,255,255,.1);
  font-size: 11px;
  color: var(--text-dim);
  padding: 3px 8px;
  border-radius: 99px;
}
.reel-desc { font-size: 12px; color: var(--text-dim); line-height: 1.5; margin-bottom: 14px; }
.reel-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.reel-btn-primary {
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: .08em;
  padding: 9px 18px;
  border-radius: var(--radius-xl);
  transition: background .2s, transform .15s;
}
.reel-btn-primary:active { transform: scale(.96); }
.reel-btn-info {
  background: rgba(255,255,255,.1);
  color: var(--text);
  font-size: 13px;
  padding: 9px 16px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,.15);
}

/* Reel side actions */
.reel-side-actions {
  position: absolute;
  right: 14px;
  bottom: 100px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.side-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text);
  transition: transform .15s, color .2s;
}
.side-btn.active .side-icon { color: var(--accent); }
.side-btn:active { transform: scale(.88); }
.side-icon { font-size: 26px; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.side-label { font-size: 10px; color: var(--text-dim); }
.side-rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--gold);
}

/* Reels overlay UI */
.reels-overlay-ui {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  padding: 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.reel-close {
  width: 38px; height: 38px;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  font-size: 16px;
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.reel-progress-bar {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,.15);
  border-radius: 99px;
  margin: 0 12px;
  overflow: hidden;
}
.reel-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 99px;
  width: 0%;
  transition: width .4s ease;
}

/* Swipe hint */
.swipe-hint {
  position: fixed;
  bottom: 80px; left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  font-size: 12px;
  color: rgba(255,255,255,.5);
  letter-spacing: .08em;
  text-transform: uppercase;
  animation: bounce 2s ease-in-out infinite;
  transition: opacity .4s;
  pointer-events: none;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}

/* ── MOVIE PAGE ───────────────────────────────────────────── */
.movie-page { position: relative; }

.movie-hero {
  position: relative;
  width: 100%;
  min-height: 380px;
  background-size: cover;
  background-position: center;
  background-color: var(--ink-2);
}
.movie-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    rgba(8,8,8,.3) 0%,
    rgba(8,8,8,.6) 50%,
    rgba(8,8,8,.99) 100%
  );
}
.movie-hero-content {
  position: relative; z-index: 1;
  padding: 60px 16px 24px;
  display: flex;
  gap: 16px;
  align-items: flex-end;
}
.movie-poster {
  width: 100px;
  height: 150px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 30px rgba(0,0,0,.8);
  flex-shrink: 0;
}
.movie-hero-info { flex: 1; min-width: 0; }
.movie-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 6vw, 40px);
  letter-spacing: .04em;
  color: var(--text);
  line-height: 1.05;
  margin-bottom: 10px;
}
.movie-meta-row {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 10px;
}
.meta-badge {
  background: rgba(255,255,255,.08);
  color: var(--text-dim);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
}
.license-badge { background: rgba(201,168,76,.15); color: var(--gold); }
.movie-rating {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
}
.rating-num { font-size: 13px; color: var(--text-dim); }
.movie-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Movie details */
.movie-details { padding: 0 16px 24px; }

.detail-section { padding: 20px 0; border-top: 1px solid rgba(255,255,255,.06); }
.detail-section:first-child { border-top: none; }
.detail-heading {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: .08em;
  color: var(--gold);
  margin-bottom: 12px;
}
.movie-description { font-size: 14px; color: var(--text-dim); line-height: 1.7; }

.detail-grid { display: grid; gap: 10px; }
.detail-row { display: flex; gap: 12px; align-items: baseline; }
.detail-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-ghost);
  flex: 0 0 88px;
}
.detail-value { font-size: 14px; color: var(--text); flex: 1; }

.tags-row { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-chip {
  background: var(--ink-4);
  color: var(--text-dim);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid rgba(255,255,255,.07);
}

/* Player */
.player-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--ink-2);
  box-shadow: var(--shadow-card);
}
.movie-player {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: none;
  border-radius: var(--radius-md);
}
.player-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-ghost);
}

/* Similar row */
.similar-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.similar-row::-webkit-scrollbar { display: none; }

/* ── SEARCH ───────────────────────────────────────────────── */
.search-view { min-height: 100dvh; }

.search-header {
  position: sticky;
  top: 0; z-index: 50;
  background: rgba(8,8,8,.96);
  backdrop-filter: blur(20px);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.search-input-wrap {
  flex: 1;
  position: relative;
  display: flex; align-items: center;
}
.search-icon {
  position: absolute; left: 12px;
  font-size: 18px;
  color: var(--text-ghost);
  pointer-events: none;
}
.search-input {
  width: 100%;
  background: var(--ink-3);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-xl);
  color: var(--text);
  font-size: 15px;
  padding: 10px 16px 10px 40px;
  outline: none;
  transition: border-color .2s;
  -webkit-appearance: none;
  appearance: none;
}
.search-input:focus { border-color: var(--gold); }
.search-input::placeholder { color: var(--text-ghost); }

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(8,8,8,.8);
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-select {
  background: var(--ink-3);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--text);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: var(--radius-xl);
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s;
}
.filter-select:focus { border-color: var(--gold); }
.clear-filters-btn {
  flex-shrink: 0;
  background: rgba(255,255,255,.06);
  color: var(--text-dim);
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.clear-filters-btn:hover { background: rgba(255,255,255,.12); }

.search-results-info {
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text-ghost);
  letter-spacing: .05em;
}
.search-results { padding: 8px 0; }

.no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--text-ghost);
  text-align: center;
}
.no-results span { font-size: 48px; }

/* ── FAVORITES ───────────────────────────────────────────── */
.favorites-view { padding: 0 0 24px; }

.page-header {
  position: relative;
  padding: 16px 16px 0;
  min-height: 70px;
  display: flex; align-items: center;
}
.page-title {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: .1em;
  color: var(--text);
  padding-top: 8px;
}

.fav-section { padding: 20px 0; }
.fav-section .section-title { padding: 0 16px 14px; font-size: 18px; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 60px 24px;
  text-align: center;
}
.empty-icon { font-size: 56px; color: var(--text-ghost); }
.empty-state p { color: var(--text-dim); font-size: 14px; max-width: 240px; }

/* ── DISCOVER ─────────────────────────────────────────────── */
.discover-view { padding: 0 0 24px; }
.discover-section { padding: 24px 0 0; }
.discover-section .section-title { padding: 0 16px 14px; font-size: 20px; }

/* Era tabs */
.era-tabs {
  display: flex; gap: 8px;
  padding: 0 16px 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.era-tabs::-webkit-scrollbar { display: none; }
.era-tab {
  flex-shrink: 0;
  background: var(--ink-3);
  border: 1px solid rgba(255,255,255,.07);
  color: var(--text-dim);
  font-size: 13px;
  padding: 7px 14px;
  border-radius: var(--radius-xl);
  transition: background .2s, border-color .2s, color .2s;
}
.era-tab.active, .era-tab:hover { background: var(--ink-4); border-color: var(--gold-dim); color: var(--gold); }
.era-movies { padding: 0; }

/* Country grid */
.country-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 0 16px;
}
.country-chip {
  background: var(--ink-3);
  border: 1px solid rgba(255,255,255,.07);
  color: var(--text);
  font-size: 13px;
  padding: 7px 14px;
  border-radius: var(--radius-xl);
  transition: background .2s, transform .15s;
}
.country-chip:hover { background: var(--ink-4); }
.country-chip:active { transform: scale(.96); }

/* ── CATEGORY ─────────────────────────────────────────────── */
.category-view { padding-bottom: 24px; }
.category-view .page-header { padding: 50px 16px 0; }
.category-view .movie-grid { padding-top: 16px; }

/* ── PLAYER MODAL ─────────────────────────────────────────── */
#player-modal {
  position: fixed; inset: 0;
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
#player-modal.visible { opacity: 1; pointer-events: all; }

.player-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.92);
  backdrop-filter: blur(12px);
}
.player-modal-content {
  position: relative;
  z-index: 1;
  width: min(92vw, 700px);
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.06);
  animation: slideUp .3s var(--ease);
}
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.player-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: var(--ink-2);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.player-modal-header h2 {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: .06em;
  color: var(--text);
}
.player-close-btn {
  width: 32px; height: 32px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
  font-size: 14px;
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.player-close-btn:hover { background: rgba(255,255,255,.15); }
.player-modal-body {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}
.modal-player-iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: none;
}
.player-modal-footer {
  padding: 10px 18px;
  font-size: 12px;
  color: var(--text-ghost);
  background: var(--ink-2);
  border-top: 1px solid rgba(255,255,255,.05);
}

/* ── LANGUAGE PICKER ─────────────────────────────────────── */
#lang-picker {
  position: fixed; inset: 0;
  z-index: 2000;
  display: flex; align-items: flex-end; justify-content: center;
}
.lang-picker-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(8px);
}
.lang-picker-sheet {
  position: relative; z-index: 1;
  background: var(--surface-2);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 20px 20px 40px;
  width: 100%;
  max-width: 480px;
  border-top: 1px solid rgba(255,255,255,.08);
  animation: slideUp .25s var(--ease);
}
.lang-picker-sheet h3 {
  font-size: 13px;
  color: var(--text-ghost);
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: .06em;
}
.lang-option {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  font-size: 16px;
  color: var(--text);
  border-radius: var(--radius-md);
  transition: background .2s;
  margin-bottom: 4px;
}
.lang-option:hover { background: rgba(255,255,255,.07); }
.lang-option.active { color: var(--gold); background: rgba(201,168,76,.08); }

/* ── TOAST ───────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(30,30,30,.97);
  color: var(--text);
  font-size: 13px;
  padding: 10px 18px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,.08);
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s var(--ease);
  white-space: nowrap;
  box-shadow: 0 8px 30px rgba(0,0,0,.5);
}
#toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── SKELETON LOADER ─────────────────────────────────────── */
@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position:  200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--ink-3) 25%, var(--ink-4) 50%, var(--ink-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ── RTL SUPPORT ─────────────────────────────────────────── */
[dir="rtl"] .back-btn { left: auto; right: 16px; }
[dir="rtl"] .reel-info { padding: 0 20px 80px 80px; }
[dir="rtl"] .reel-side-actions { right: auto; left: 14px; }
[dir="rtl"] .detail-row { flex-direction: row-reverse; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (min-width: 640px) {
  .movie-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .card-poster { height: 240px; }
  .hero-section { height: 75dvh; }
  .hero-title { font-size: 52px; }
  .reel-info { padding: 0 100px 100px 32px; max-width: 420px; }
  .reel-title { font-size: 48px; }
}

@media (min-width: 768px) {
  .movie-hero-content { padding: 80px 24px 32px; gap: 20px; }
  .movie-poster { width: 130px; height: 195px; }
  .movie-details { padding: 0 24px 32px; }
  .movie-grid { grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); }
}

@media (min-width: 1024px) {
  .movie-card { flex: 0 0 160px; }
  .card-poster { width: 160px; height: 240px; }
  #bottom-nav { left: 50%; transform: translateX(-50%); width: min(520px, 100%); border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
  .home-header { max-width: 900px; left: 50%; transform: translateX(-50%); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
  .search-header { max-width: 900px; left: 50%; transform: translateX(-50%); }
}

/* ── FOCUS VISIBLE ───────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ── REDUCED MOTION ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── PWA STATUS BAR ──────────────────────────────────────── */
@supports (padding: env(safe-area-inset-top)) {
  .home-header { padding-top: env(safe-area-inset-top); height: calc(var(--header-h) + env(safe-area-inset-top)); }
}
