@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@300;400;500;600;700;800;900&family=Barlow+Condensed:wght@500;600;700;800&display=swap');

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

:root {
  --black:    #000;
  --dark:     #0a0a0a;
  --dark2:    #111;
  --dark3:    #161616;
  --dark4:    #1e1e1e;
  --dark5:    #252525;
  --red:      #e50914;
  --red2:     #b20710;
  --red-dim:  rgba(229,9,20,.12);
  --red-glow: rgba(229,9,20,.35);
  --text:     #fff;
  --text2:    rgba(255,255,255,.72);
  --text3:    rgba(255,255,255,.42);
  --text4:    rgba(255,255,255,.2);
  --border:   rgba(255,255,255,.07);
  --border2:  rgba(255,255,255,.14);
  --radius:   6px;
  --radius-lg:10px;
  --radius-xl:16px;
  --nav-h:    64px;
  --sidebar-w:220px;
  --font:     'Barlow', system-ui, sans-serif;
  --font-cond:'Barlow Condensed', system-ui, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
  --trans:    0.18s cubic-bezier(0.4,0,0.2,1);
}

/* ─── BASE ───────────────────────────────────────────────────── */
html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  touch-action: pan-y;
}
body {
  background: var(--black);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Prevent layout shift from scrollbar appearing */
  scrollbar-gutter: stable;
}
img  { max-width: 100%; display: block; }
a    { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; }
svg  { flex-shrink: 0; display: block; }

/* Remove 300ms click delay on mobile */
a, button, [role="button"] { touch-action: manipulation; }

/* Scrollbar */
::-webkit-scrollbar       { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 2px; }

/* ─── PAGE TRANSITION ────────────────────────────────────────── */
#sm-page {
  animation: smFadeIn .22s ease both;
}
@keyframes smFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Slide transition for page swap */
.sm-slide-out {
  animation: smSlideOut .18s ease forwards;
}
@keyframes smSlideOut {
  to { opacity: 0; transform: translateY(-6px); }
}

/* ─── LOADING BAR (top of screen like YouTube) ───────────────── */
#sm-loader {
  position: fixed; top: 0; left: 0; z-index: 9999;
  height: 2.5px; background: var(--red);
  width: 0%; transition: width .3s ease;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px var(--red-glow);
  pointer-events: none;
}
#sm-loader.done {
  width: 100% !important;
  opacity: 0;
  transition: width .2s ease, opacity .3s ease .1s;
}

/* ─── TOUCH RIPPLE ───────────────────────────────────────────── */
.sm-ripple {
  position: relative; overflow: hidden;
}
.sm-ripple::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  transform: scale(0);
  animation: smRipple .5s ease-out;
  pointer-events: none;
}
@keyframes smRipple {
  to { transform: scale(4); opacity: 0; }
}

/* ─── SKELETON LOADER ────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    var(--dark3) 25%, var(--dark4) 50%, var(--dark3) 75%);
  background-size: 400% 100%;
  animation: skshimmer 1.4s ease infinite;
  border-radius: var(--radius);
}
@keyframes skshimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.skeleton-card {
  flex: 0 0 auto; width: 130px; border-radius: var(--radius);
  scroll-snap-align: start;
}
.skeleton-card .sk-poster {
  aspect-ratio: 2/3; border-radius: var(--radius);
}
.skeleton-card .sk-line {
  height: 10px; border-radius: 4px; margin-top: 6px;
}
.skeleton-card .sk-line-sm {
  height: 8px; border-radius: 4px; margin-top: 4px; width: 60%;
}
@media (min-width: 480px)  { .skeleton-card { width: 145px; } }
@media (min-width: 768px)  { .skeleton-card { width: 170px; } }
@media (min-width: 1200px) { .skeleton-card { width: 200px; } }

/* ─── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .45rem; padding: .62rem 1.4rem;
  border-radius: var(--radius); border: none;
  font-family: var(--font); font-size: .82rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background var(--trans), transform var(--trans), box-shadow var(--trans);
  line-height: 1;
  /* Instant tap response */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: scale(.97); }

.btn-primary   { background: var(--red); color: #fff; }
.btn-primary:hover  { background: var(--red2); box-shadow: 0 6px 20px var(--red-glow); }
.btn-primary:active { background: var(--red2); }
.btn-secondary { background: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(8px); }
.btn-secondary:hover { background: rgba(255,255,255,.28); }
.btn-outline   { background: transparent; color: var(--text2); border: 1.5px solid var(--border2); }
.btn-outline:hover { border-color: rgba(255,255,255,.4); color: #fff; }
.btn-ghost     { background: rgba(255,255,255,.06); color: var(--text2); }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-full  { width: 100%; }
.btn-sm    { padding: .38rem .85rem; font-size: .73rem; }
.btn-lg    { padding: .85rem 2rem; font-size: .9rem; }
.btn-icon  { width: 38px; height: 38px; padding: 0; border-radius: 50%; }

/* ─── FORMS ──────────────────────────────────────────────────── */
.form-group   { margin-bottom: 1.1rem; }
.form-label   { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text3); margin-bottom: .4rem; }
.form-label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
.form-link    { font-size: .78rem; color: var(--red); font-weight: 600; }
.form-control {
  width: 100%; padding: .72rem 1rem;
  background: var(--dark3); border: 1.5px solid var(--border);
  border-radius: var(--radius); color: #fff;
  font-family: var(--font); font-size: .88rem;
  outline: none; transition: border-color var(--trans);
  -webkit-appearance: none; appearance: none;
  /* Prevent iOS zoom on focus */
  font-size: max(.88rem, 16px);
}
.form-control:focus   { border-color: var(--red); }
.form-control::placeholder { color: var(--text4); }
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.35)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
}
textarea.form-control { resize: vertical; min-height: 90px; font-size: .88rem; }
.form-hint    { font-size: .72rem; color: var(--text4); margin-top: .3rem; }
.form-row-2   { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.password-wrap { position: relative; }
.password-wrap .form-control { padding-right: 44px; }
.pw-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text4); cursor: pointer;
  padding: 4px; display: flex; align-items: center;
}
.pw-toggle svg { width: 17px; height: 17px; }
.checkbox-wrap {
  display: flex; align-items: center; gap: .6rem;
  font-size: .83rem; color: var(--text3);
  cursor: pointer; margin-bottom: 1rem; user-select: none;
}
.checkbox-wrap input { accent-color: var(--red); width: 16px; height: 16px; }

/* ─── ALERTS ─────────────────────────────────────────────────── */
.alert         { padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: .82rem; font-weight: 500; }
.alert-success { background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.2); color: #86efac; }
.alert-error   { background: rgba(229,9,20,.08);  border: 1px solid rgba(229,9,20,.2);  color: #fca5a5; }
.alert-info    { background: rgba(59,130,246,.08); border: 1px solid rgba(59,130,246,.2); color: #93c5fd; }

/* ─── LAYOUT ─────────────────────────────────────────────────── */
.container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px)  { .container { padding: 0 40px; } }
@media (min-width: 1200px) { .container { padding: 0 60px; } }

/* ─── APP HEADER ─────────────────────────────────────────────── */
.app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: linear-gradient(to bottom, rgba(0,0,0,.95) 0%, rgba(0,0,0,.5) 70%, transparent 100%);
  display: flex; align-items: center; padding: 0 20px; gap: 1.5rem;
  transition: background .3s;
  padding-top: var(--safe-top);
  /* Hardware accelerate the header */
  will-change: transform;
  transform: translateZ(0);
}
.app-header.solid {
  background: rgba(10,10,10,.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

/* ─── SIDEBAR (desktop) ──────────────────────────────────────── */
.sidebar { display: none; }
@media (min-width: 1200px) {
  .sidebar {
    display: flex; flex-direction: column;
    position: fixed; left: 0; top: 0; bottom: 0;
    width: var(--sidebar-w); z-index: 90;
    background: linear-gradient(to right, rgba(0,0,0,.98), rgba(0,0,0,.7));
    border-right: 1px solid var(--border);
    padding-top: calc(var(--nav-h) + 20px);
    overflow-y: auto;
  }
  .app-main { padding-left: var(--sidebar-w); }
}
.sidebar-link {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem 1.2rem; color: var(--text3);
  font-size: .81rem; font-weight: 600;
  text-decoration: none; white-space: nowrap;
  border-left: 2px solid transparent;
  transition: color var(--trans), background var(--trans);
  touch-action: manipulation;
}
.sidebar-link svg { width: 17px; height: 17px; }
.sidebar-link:hover  { color: #fff; background: rgba(255,255,255,.04); }
.sidebar-link.active { color: #fff; border-left-color: var(--red); background: rgba(229,9,20,.07); }
.sidebar-section { padding: .6rem 1.4rem .3rem; font-size: .65rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--text4); }

/* ─── BOTTOM NAV ─────────────────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: rgba(8,8,8,.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  padding-bottom: var(--safe-bot);
  /* Hardware accelerate */
  will-change: transform;
  transform: translateZ(0);
}
@media (min-width: 1200px) { .bottom-nav { display: none; } }
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px; padding: 8px 4px 6px;
  color: rgba(255,255,255,.35); font-size: .56rem;
  font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none;
  transition: color var(--trans);
  border-top: 2px solid transparent;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav svg { width: 21px; height: 21px; }
.bottom-nav a.active { color: var(--red); border-top-color: var(--red); }

/* ─── MAIN CONTENT ───────────────────────────────────────────── */
.app-main {
  padding-top: var(--nav-h);
  padding-bottom: calc(68px + var(--safe-bot));
  min-height: 100vh;
}
@media (min-width: 1200px) { .app-main { padding-bottom: 40px; } }

/* ─── HERO BANNER ────────────────────────────────────────────── */
.hero-banner {
  position: relative; width: 100%;
  /* Fixed height prevents layout shift */
  height: 56vw; min-height: 280px; max-height: 620px;
  overflow: hidden; background: var(--dark3);
  /* Reserve space immediately */
  contain: layout style;
}
@media (min-width: 768px)  { .hero-banner { height: 44vw; } }
@media (min-width: 1200px) { .hero-banner { height: 38vw; } }

.hero-banner-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  /* Prevent layout shift — image fills reserved space */
  will-change: opacity;
}
.hero-banner-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,.6) 30%, rgba(0,0,0,.15) 60%, transparent 100%),
    linear-gradient(to right, rgba(0,0,0,.85) 0%, rgba(0,0,0,.25) 40%, transparent 70%);
}
.hero-banner-content {
  position: absolute; bottom: 0; left: 0;
  padding: 2rem 20px 1.5rem; max-width: 620px; z-index: 2; width: 100%;
}
@media (min-width: 768px)  { .hero-banner-content { padding: 3rem 40px 2.5rem; max-width: 680px; } }
@media (min-width: 1200px) { .hero-banner-content { padding: 4rem 60px 3rem; padding-left: calc(var(--sidebar-w) + 60px); max-width: 800px; } }

.hero-tag { display: inline-flex; align-items: center; gap: .35rem; font-family: var(--font-cond); font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--red); margin-bottom: .6rem; }
.hero-tag-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); flex-shrink: 0; }
.hero-title { font-family: var(--font-cond); font-size: clamp(1.8rem, 5vw, 4rem); font-weight: 800; line-height: 1; letter-spacing: -.01em; margin-bottom: .6rem; text-shadow: 0 2px 20px rgba(0,0,0,.8); }
.hero-meta { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; font-size: .78rem; color: var(--text3); }
.hero-meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text4); }
.hero-rating { display: inline-flex; align-items: center; border: 1px solid var(--border2); padding: .12rem .4rem; border-radius: 3px; font-size: .68rem; font-weight: 700; letter-spacing: .06em; color: var(--text2); }
.hero-desc { font-size: .85rem; color: var(--text2); line-height: 1.65; margin-bottom: 1.2rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 768px) { .hero-desc { -webkit-line-clamp: 3; } }
.hero-btns { display: flex; gap: .6rem; flex-wrap: wrap; }
.hero-indicators { position: absolute; bottom: 1rem; right: 1.2rem; display: flex; gap: .4rem; z-index: 3; }
.hero-dot { width: 24px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.3); cursor: pointer; transition: background var(--trans), width var(--trans); touch-action: manipulation; }
.hero-dot.active { background: var(--red); width: 32px; }

/* ─── SECTION ROWS ───────────────────────────────────────────── */
.content-section { padding: .25rem 0 .5rem; }
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 20px; margin-bottom: .75rem;
}
@media (min-width: 768px)  { .section-header { padding: 0 40px; } }
@media (min-width: 1200px) { .section-header { padding: 0 60px; padding-left: calc(var(--sidebar-w) + 60px); } }

.section-title { font-family: var(--font-cond); font-size: 1.05rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: #fff; }
@media (min-width: 768px) { .section-title { font-size: 1.15rem; } }
.section-more { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text4); display: flex; align-items: center; gap: .25rem; transition: color var(--trans); touch-action: manipulation; }
.section-more svg { width: 12px; height: 12px; }
.section-more:hover { color: var(--red); }

/* ─── CONTENT ROW ────────────────────────────────────────────── */
.content-row-wrap { position: relative; }
.content-row {
  display: flex; gap: .5rem;
  overflow-x: auto; padding: 4px 20px 12px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  /* Smooth momentum scrolling on iOS */
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.content-row::-webkit-scrollbar { display: none; }
@media (min-width: 768px)  { .content-row { gap: .65rem; padding: 4px 40px 12px; } }
@media (min-width: 1200px) { .content-row { gap: .75rem; padding: 4px 60px 16px; padding-left: calc(var(--sidebar-w) + 60px); } }

.row-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 56px;
  background: rgba(0,0,0,.8); border: 1px solid var(--border2); border-radius: var(--radius);
  display: none; align-items: center; justify-content: center;
  cursor: pointer; z-index: 10; color: var(--text2);
  transition: background var(--trans);
}
.row-arrow svg { width: 18px; height: 18px; }
.row-arrow:hover { background: rgba(229,9,20,.9); color: #fff; }
@media (min-width: 900px) { .row-arrow { display: flex; } }
.row-arrow-left  { left: 20px; }
.row-arrow-right { right: 20px; }
@media (min-width: 768px) { .row-arrow-left { left: 40px; } .row-arrow-right { right: 40px; } }

/* ─── MOVIE CARD ─────────────────────────────────────────────── */
.movie-card {
  flex: 0 0 auto; width: 130px;
  border-radius: var(--radius); overflow: hidden;
  cursor: pointer; background: var(--dark3);
  position: relative; scroll-snap-align: start;
  text-decoration: none; display: block;
  /* Hardware accelerate cards */
  will-change: transform;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
@media (min-width: 480px)  { .movie-card { width: 145px; } }
@media (min-width: 768px)  { .movie-card { width: 170px; } }
@media (min-width: 1200px) { .movie-card { width: 200px; } }
/* Only scale on non-touch devices */
@media (hover: hover) {
  .movie-card:hover { transform: scale(1.06) translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.7), 0 0 0 1.5px var(--red); }
  .movie-card:hover .movie-card-poster img { transform: scale(1.08); filter: brightness(.55); }
  .movie-card:hover .movie-card-hover { opacity: 1; }
  .movie-card:hover .movie-card-play-btn { transform: scale(1.1); }
}
/* Touch devices — subtle scale on active */
.movie-card:active { transform: scale(.97); }

.movie-card.wide { width: 220px; }
@media (min-width: 480px)  { .movie-card.wide { width: 250px; } }
@media (min-width: 768px)  { .movie-card.wide { width: 290px; } }
@media (min-width: 1200px) { .movie-card.wide { width: 320px; } }

/* Fixed aspect ratio prevents layout shift */
.movie-card-poster {
  aspect-ratio: 2/3; position: relative; overflow: hidden;
  background: var(--dark4);
  /* Reserve space before image loads */
  contain: layout style;
}
.movie-card.wide .movie-card-poster { aspect-ratio: 16/9; }
.movie-card-poster img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s, filter .3s;
}
.movie-card-hover {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.95) 0%, rgba(0,0,0,.25) 60%, transparent 100%);
  opacity: 0; transition: opacity .25s;
  display: flex; flex-direction: column; justify-content: flex-end; padding: .65rem;
}
.movie-card-play-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--red); display: flex; align-items: center; justify-content: center;
  margin-bottom: .45rem; flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(229,9,20,.5); transition: transform .2s;
}
.movie-card-play-btn svg { width: 14px; height: 14px; }
.movie-card-hover-title { font-size: .7rem; font-weight: 700; color: #fff; line-height: 1.3; margin-bottom: .2rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.movie-card-hover-meta  { font-size: .62rem; color: var(--text3); }
.movie-card-badge { position: absolute; top: .4rem; left: .4rem; z-index: 2; font-family: var(--font-cond); font-size: .6rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: .15rem .45rem; border-radius: 3px; line-height: 1.4; }
.badge-red   { background: var(--red); color: #fff; }
.badge-green { background: #16a34a; color: #fff; }
.badge-gold  { background: #ca8a04; color: #fff; }
.badge-dark  { background: rgba(0,0,0,.75); color: var(--text2); border: 1px solid var(--border2); }
.movie-card-progress      { height: 3px; background: var(--dark5); overflow: hidden; }
.movie-card-progress-fill { height: 100%; background: var(--red); border-radius: 2px; }
.movie-card-info  { padding: .45rem .5rem .55rem; }
.movie-card-title { font-size: .72rem; font-weight: 600; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.movie-card-meta  { font-size: .62rem; color: var(--text4); margin-top: .15rem; }
.movie-card-placeholder { background: var(--dark4); display: flex; align-items: center; justify-content: center; aspect-ratio: 2/3; }
.movie-card-placeholder svg { width: 28px; height: 28px; opacity: .2; }

/* ─── AUTH ───────────────────────────────────────────────────── */
.auth-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; background: var(--dark); position: relative; overflow: hidden; }
.auth-body::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 50%, rgba(229,9,20,.08) 0%, transparent 60%); pointer-events: none; }
.auth-wrap   { width: 100%; max-width: 420px; position: relative; z-index: 1; }
.auth-brand  { text-align: center; margin-bottom: 2rem; }
.auth-brand img { height: 36px; margin: 0 auto; }
.auth-card   { background: var(--dark2); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 2rem; }
@media (min-width: 480px) { .auth-card { padding: 2.2rem 2.4rem; } }
.auth-title  { font-family: var(--font-cond); font-size: 1.6rem; font-weight: 800; margin-bottom: .25rem; }
.auth-sub    { color: var(--text3); font-size: .83rem; margin-bottom: 1.6rem; }
.auth-switch { text-align: center; font-size: .82rem; color: var(--text3); margin-top: 1.4rem; }
.auth-switch a { color: var(--red); font-weight: 700; }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: .72rem; color: var(--text4); }
.auth-footer a:hover { color: var(--red); }

/* ─── PLANS ──────────────────────────────────────────────────── */
.plans-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 2rem; }
@media (min-width: 600px) { .plans-grid { grid-template-columns: repeat(3, 1fr); } }
.plan-card { background: var(--dark2); border: 1.5px solid var(--border); border-radius: var(--radius-xl); padding: 1.6rem 1.4rem; position: relative; transition: border-color .25s, transform .25s; }
.plan-card:hover   { border-color: rgba(229,9,20,.3); transform: translateY(-2px); }
.plan-featured     { border-color: var(--red); }
.plan-badge        { position: absolute; top: -1px; left: 50%; transform: translateX(-50%); background: var(--red); color: #fff; font-family: var(--font-cond); font-size: .6rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: .2rem .8rem; border-radius: 0 0 6px 6px; }
.plan-name         { font-family: var(--font-cond); font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text3); margin-bottom: .5rem; }
.plan-price        { display: flex; align-items: baseline; gap: .12rem; margin-bottom: 1rem; }
.plan-currency     { font-size: 1.1rem; font-weight: 700; color: var(--text2); }
.plan-amount       { font-family: var(--font-cond); font-size: 2.6rem; font-weight: 800; line-height: 1; color: #fff; }
.plan-cycle        { font-size: .75rem; color: var(--text4); margin-left: .1rem; }
.plan-features     { list-style: none; display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.4rem; }
.plan-features li  { display: flex; align-items: flex-start; gap: .5rem; font-size: .8rem; color: var(--text2); }
.plan-features li svg { flex-shrink: 0; margin-top: .1rem; }
.gateway-btns      { display: flex; flex-direction: column; gap: .4rem; }
.coupon-section    { background: var(--dark2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.4rem; max-width: 480px; margin: 0 auto; text-align: center; }
.coupon-title      { font-family: var(--font-cond); font-size: .9rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: .9rem; color: var(--text2); }
.coupon-form       { display: flex; gap: .5rem; }
.coupon-input      { flex: 1; }

/* ─── PLAYER ─────────────────────────────────────────────────── */
.player-wrap { background: #000; position: relative; width: 100%; aspect-ratio: 16/9; max-height: 82vh; overflow: hidden; }
.quality-selector { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; padding: .6rem 20px; border-bottom: 1px solid var(--border); }
.quality-btn { padding: .3rem .7rem; background: var(--dark3); border: 1px solid var(--border); border-radius: 4px; font-family: var(--font-cond); font-size: .7rem; font-weight: 700; letter-spacing: .06em; color: var(--text3); cursor: pointer; transition: all var(--trans); touch-action: manipulation; }
.quality-btn.active { background: var(--red); border-color: var(--red); color: #fff; }
.quality-btn:hover:not(.active) { border-color: var(--border2); color: var(--text); }

/* ─── NO PLAN BAR ────────────────────────────────────────────── */
.no-plan-bar { background: linear-gradient(135deg, rgba(229,9,20,.12), rgba(229,9,20,.06)); border: 1px solid rgba(229,9,20,.2); border-radius: var(--radius); padding: .8rem 1rem; margin: 1rem 20px; font-size: .83rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
@media (min-width: 768px) { .no-plan-bar { margin: 1rem 40px; } }

/* ─── KIDS BAR ───────────────────────────────────────────────── */
.kids-bar  { background: rgba(59,130,246,.08); border: 1px solid rgba(59,130,246,.18); border-radius: var(--radius); padding: .6rem 1rem; margin: 1rem 20px; font-size: .8rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.kids-badge { display: inline-flex; align-items: center; gap: .25rem; background: rgba(59,130,246,.15); border: 1px solid rgba(59,130,246,.25); border-radius: 20px; padding: .18rem .6rem; font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #93c5fd; }

/* ─── SEARCH ─────────────────────────────────────────────────── */
.search-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .6rem; padding: 0 20px; }
@media (min-width: 480px)  { .search-grid { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); } }
@media (min-width: 768px)  { .search-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); padding: 0 40px; gap: .75rem; } }
@media (min-width: 1200px) { .search-grid { padding: 0 60px; padding-left: calc(var(--sidebar-w) + 60px); } }

/* ─── EMPTY STATE ────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text4); }
.empty-state svg { width: 48px; height: 48px; margin: 0 auto 1rem; opacity: .3; }
.empty-state h3  { font-family: var(--font-cond); font-size: 1.1rem; font-weight: 700; margin-bottom: .4rem; color: var(--text3); }
.empty-state p   { font-size: .83rem; line-height: 1.6; }

/* ─── PROFILE ────────────────────────────────────────────────── */
.profile-wrap    { max-width: 600px; margin: 0 auto; padding: 1.5rem 20px 3rem; }
.profile-header  { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1.8rem; }
.profile-avatar-lg { width: 72px; height: 72px; border-radius: 50%; background: var(--dark3); border: 2.5px solid var(--border2); overflow: hidden; flex-shrink: 0; }
.profile-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.plan-pill { display: inline-flex; align-items: center; gap: .3rem; background: var(--red-dim); border: 1px solid rgba(229,9,20,.25); border-radius: 20px; padding: .22rem .7rem; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--red); margin-top: .4rem; }
.profile-section { background: var(--dark2); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: .7rem; }
.profile-section summary { padding: .85rem 1.1rem; font-family: var(--font-cond); font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text3); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.profile-section summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid; border-bottom: 2px solid; border-color: var(--text4); transform: rotate(45deg); transition: transform var(--trans); flex-shrink: 0; }
.profile-section[open] summary::after { transform: rotate(-135deg); }
.profile-section-body { padding: 1.1rem; border-top: 1px solid var(--border); }

/* ─── ANIMATIONS ─────────────────────────────────────────────── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.fade-in-up { animation: fadeInUp .4s ease both; }
.delay-1 { animation-delay: .07s; }
.delay-2 { animation-delay: .14s; }
.delay-3 { animation-delay: .21s; }
.delay-4 { animation-delay: .28s; }

/* ─── MODAL ──────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.88); backdrop-filter: blur(6px); }
.modal-box     { background: var(--dark2); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 2rem; max-width: 440px; width: 90%; text-align: center; }
.modal-spinner { width: 34px; height: 34px; border: 2.5px solid var(--border); border-top-color: var(--red); border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto 1rem; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  .form-row-2  { grid-template-columns: 1fr; }
  .auth-card   { padding: 1.6rem 1.3rem; }
  .plans-grid  { grid-template-columns: 1fr; }
  .hero-btns   { gap: .4rem; }
  .hero-btns .btn { padding: .6rem 1.1rem; font-size: .78rem; }
}

/* ─── APP-SPECIFIC MOBILE TWEAKS ─────────────────────────────── */
/* When running as WebView APK */
@media (max-width: 768px) {
  /* Larger touch targets */
  .bottom-nav a { padding: 10px 4px 8px; }
  .btn-sm { padding: .45rem .95rem; }
  /* Prevent text selection on cards */
  .movie-card { user-select: none; -webkit-user-select: none; }
  /* Smooth carousel on mobile */
  .content-row { scroll-snap-type: x mandatory; }
}
