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

:root {
  --red: #e50914;
  --red-dark: #b0060f;
  --red-glow: rgba(229, 9, 20, 0.4);
  --bg: #141414;
  --bg2: #1a1a1a;
  --bg3: #222;
  --surface: #1f1f1f;
  --surface2: #2a2a2a;
  --text: #e5e5e5;
  --text-dim: #aaa;
  --text-muted: #777;
  --white: #fff;
  --gold: #f5c518;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --card-w: 220px;
  --card-h: 130px;
  --radius: 6px;
  --shadow: 0 8px 32px rgba(0,0,0,0.7);
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  cursor: none;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
.cursor {
  position: fixed;
  width: 12px; height: 12px;
  background: var(--white);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  top: 0; left: 0;
  will-change: transform;
  transition: width 0.15s, height 0.15s, background 0.15s, opacity 0.15s;
}

.cursor-trail {
  position: fixed;
  width: 36px; height: 36px;
  border: 2px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  top: 0; left: 0;
  will-change: transform;
  transition: width 0.2s, height 0.2s, border-color 0.2s;
}

body.cursor-clicking .cursor { width: 8px; height: 8px; background: var(--red); }
body.cursor-hovering .cursor { width: 20px; height: 20px; background: var(--red); }
body.cursor-hovering .cursor-trail { width: 50px; height: 50px; border-color: var(--red-glow); }

/* ============================================================
   LOADER
   ============================================================ */
#loader {
  position: fixed; inset: 0;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  z-index: 100000;
  transition: opacity 0.6s ease, visibility 0.6s;
}

#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-logo { display: flex; flex-direction: column; align-items: center; gap: 24px; }

.logo-text {
  font-size: 80px;
  font-weight: 900;
  color: var(--red);
  letter-spacing: -2px;
  text-shadow: 0 0 40px var(--red-glow);
  animation: logoAppear 0.6s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

@keyframes logoAppear {
  from { transform: scale(0.3) rotateY(90deg); opacity: 0; }
  to   { transform: scale(1) rotateY(0deg); opacity: 1; }
}

.loader-bar {
  width: 200px; height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px; overflow: hidden;
}

.loader-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--red-dark), var(--red), #ff4444);
  border-radius: 2px;
  animation: loaderFill 1.8s cubic-bezier(0.4,0,0.2,1) forwards;
  box-shadow: 0 0 12px var(--red-glow);
}

@keyframes loaderFill { from { width: 0; } to { width: 100%; } }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 52px;
  height: 68px;
  z-index: 1000;
  transition: background 0.4s ease, box-shadow 0.4s;
}

.navbar.scrolled {
  background: rgba(14,14,14,0.97);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05), 0 8px 32px rgba(0,0,0,0.7);
}

.nav-left { display: flex; align-items: center; gap: 36px; }

.nav-logo {
  font-size: 26px;
  font-weight: 900;
  color: var(--red);
  letter-spacing: -1px;
  text-shadow: 0 0 20px var(--red-glow);
  user-select: none;
}

.nav-links { display: flex; gap: 24px; list-style: none; }

.nav-link {
  font-size: 14px; font-weight: 500;
  color: var(--text-dim);
  position: relative; transition: color var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--red);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--transition);
}

.nav-link:hover, .nav-link.active { color: var(--white); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }

.nav-right { display: flex; align-items: center; gap: 20px; }

.search-box {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 6px 14px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.search-box:focus-within {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.05);
}

.search-icon { color: var(--text-dim); width: 16px; height: 16px; flex-shrink: 0; }

.search-input {
  background: none; border: none; outline: none;
  color: var(--white); font-size: 14px; width: 200px;
  font-family: var(--font);
}

.search-input::placeholder { color: var(--text-muted); }

.nav-notifications { position: relative; color: var(--text-dim); transition: color 0.2s; }
.nav-notifications:hover { color: var(--white); }

.notif-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
}

.nav-avatar { position: relative; display: flex; align-items: center; gap: 6px; }

.avatar-img {
  width: 36px; height: 36px; border-radius: 6px;
  background: linear-gradient(135deg, var(--red), #ff6b6b);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; color: #fff;
  transition: transform 0.2s; user-select: none;
}

.nav-avatar:hover .avatar-img { transform: scale(1.05); }

.avatar-arrow { color: var(--text-dim); transition: transform 0.3s; }
.nav-avatar:hover .avatar-arrow { transform: rotate(180deg); }

.avatar-dropdown {
  position: absolute; top: calc(100% + 12px); right: 0;
  background: #1c1c1c;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  min-width: 180px;
  padding: 8px 0;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  box-shadow: var(--shadow);
}

.nav-avatar:hover .avatar-dropdown {
  opacity: 1; visibility: visible; pointer-events: all;
  transform: translateY(0);
}

.avatar-dropdown a {
  display: block; padding: 10px 18px;
  font-size: 14px; color: var(--text-dim);
  transition: color 0.2s, background 0.2s;
}

.avatar-dropdown a:hover { color: var(--white); background: rgba(255,255,255,0.06); }
.avatar-dropdown hr { border: none; border-top: 1px solid rgba(255,255,255,0.1); margin: 4px 0; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; height: 100vh;
  display: flex; align-items: flex-end;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #0a0a1a 0%, #1a0a1a 30%, #0f1a0a 60%, #1a0f00 100%);
  overflow: hidden;
  will-change: transform;
}

.hero-bg::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(120,0,60,0.3) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 30% 60%, rgba(0,40,120,0.2) 0%, transparent 50%);
  animation: heroAmbient 8s ease-in-out infinite alternate;
}

@keyframes heroAmbient {
  from { opacity: 0.6; }
  to   { opacity: 1;   }
}

/* Simulated movie scene background */
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255,255,255,0.01) 2px,
      rgba(255,255,255,0.01) 4px
    );
  pointer-events: none;
}

.hero-gradient {
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(20,20,20,0.85) 40%, transparent 80%),
    linear-gradient(to top, rgba(20,20,20,1) 0%, rgba(20,20,20,0.5) 30%, transparent 60%);
}

/* Particle field in hero */
.hero-particles {
  position: absolute; inset: 0; pointer-events: none;
}

.hero-content {
  position: relative; z-index: 2;
  padding: 0 52px 120px;
  max-width: 620px;
  animation: heroFadeUp 1s ease 2.2s both;
}

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(229,9,20,0.15);
  border: 1px solid rgba(229,9,20,0.4);
  color: #ff6666;
  font-size: 13px; font-weight: 600;
  padding: 6px 14px; border-radius: 20px;
  margin-bottom: 20px;
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.65; }
}

.badge-icon { font-size: 10px; }

.hero-title {
  font-size: clamp(42px, 7vw, 72px);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 18px;
  color: var(--white);
  text-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.hero-description {
  font-size: 16px; font-weight: 400;
  line-height: 1.6; color: var(--text);
  margin-bottom: 20px;
  max-width: 500px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.hero-meta {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 28px; flex-wrap: wrap;
}

.hero-meta > span {
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.6);
}

.hero-rating { color: var(--gold) !important; font-weight: 700 !important; }

.hero-age {
  border: 1px solid var(--text-muted);
  border-radius: 3px; padding: 2px 6px;
  font-size: 12px !important;
}

.hero-genre {
  background: rgba(255,255,255,0.08);
  padding: 3px 10px; border-radius: 12px;
}

.hero-buttons { display: flex; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px;
  border: none; border-radius: 5px;
  font-size: 16px; font-weight: 700;
  font-family: var(--font);
  cursor: none;
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
  position: relative; overflow: hidden;
  white-space: nowrap;
}

.btn::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.15s;
}

.btn:hover::after { background: rgba(255,255,255,0.1); }

.btn:active { transform: scale(0.97); }

.btn-play {
  background: var(--white); color: #000;
}

.btn-play:hover {
  background: #ddd;
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(255,255,255,0.2);
}

.btn-info {
  background: rgba(109,109,110,0.45);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.08);
}

.btn-info:hover {
  background: rgba(109,109,110,0.65);
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.hero-scroll-indicator {
  position: absolute; bottom: 40px; right: 52px;
  z-index: 3; animation: heroFadeUp 1s ease 3s both;
}

.scroll-dot {
  width: 8px; height: 30px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 4px; margin: 0 auto;
  position: relative; overflow: hidden;
}

.scroll-dot::after {
  content: '';
  position: absolute; top: 4px; left: 50%;
  transform: translateX(-50%);
  width: 3px; height: 8px;
  background: var(--white); border-radius: 2px;
  animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
  0%   { top: 4px; opacity: 1; }
  80%  { top: 16px; opacity: 0; }
  81%  { top: 4px; opacity: 0; }
  100% { top: 4px; opacity: 1; }
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  position: relative; z-index: 1;
  padding: 0 0 60px;
  background: var(--bg);
}

/* ============================================================
   MOVIE ROWS
   ============================================================ */
.movie-row {
  padding: 28px 0 0;
  margin-bottom: 4px;
  content-visibility: auto;
  contain-intrinsic-size: 0 220px;
}

.row-header { padding: 0 52px; margin-bottom: 12px; }

.row-title {
  font-size: 20px; font-weight: 700;
  color: var(--text);
  display: flex; align-items: center; gap: 14px;
}

.row-explore {
  font-size: 13px; font-weight: 500;
  color: var(--red);
  opacity: 0; transform: translateX(-8px);
  transition: opacity 0.3s, transform 0.3s;
  cursor: none;
}

.row-explore span { display: inline-block; transition: transform 0.2s; }

.movie-row:hover .row-explore { opacity: 1; transform: translateX(0); }
.row-explore:hover span { transform: translateX(4px); }

.row-wrapper {
  position: relative;
  padding: 0 52px;
}

.row-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: linear-gradient(to right, rgba(14,14,14,0.9), rgba(20,20,20,0.7));
  border: none; color: var(--white);
  width: 52px; height: calc(100% + 0px);
  font-size: 28px; font-weight: 300;
  cursor: none; z-index: 10;
  opacity: 0; transition: opacity 0.25s, background 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.row-arrow-left  { background: linear-gradient(to right, rgba(14,14,14,0.95), transparent); }
.row-arrow-right { background: linear-gradient(to left,  rgba(14,14,14,0.95), transparent); }

.row-wrapper:hover .row-arrow { opacity: 1; }
.row-arrow:hover { background: rgba(20,20,20,0.9); }
.row-arrow-left { left: 0; border-radius: 0 4px 4px 0; }
.row-arrow-right { right: 0; border-radius: 4px 0 0 4px; }

.row-track {
  display: flex; gap: 6px;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}

/* ============================================================
   MOVIE CARD
   ============================================================ */
.movie-card {
  position: relative;
  flex: 0 0 var(--card-w);
  height: var(--card-h);
  border-radius: var(--radius);
  overflow: visible;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), z-index 0s 0.35s;
  cursor: none;
}

.movie-card:hover {
  transform: scale(1.28) translateY(-12px);
  z-index: 50;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), z-index 0s;
}

/* Scale down neighbours — applied via JS class to avoid :has() recalculation cost */
.row-track.has-hover .movie-card:not(:hover) {
  transform: scale(0.97);
}

.card-thumb {
  width: 100%; height: var(--card-h);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  transition: box-shadow 0.35s;
}

.movie-card:hover .card-thumb {
  box-shadow: 0 20px 48px rgba(0,0,0,0.9), 0 0 0 1px rgba(255,255,255,0.06);
  border-radius: var(--radius) var(--radius) 0 0;
}

.card-img-bg {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  transition: transform 0.4s ease;
}

.movie-card:hover .card-img-bg { transform: scale(1.05); }

.card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.3s;
}

.movie-card:hover .card-overlay { opacity: 1; }

.card-play-btn {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 46px; height: 46px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: none;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), background 0.2s;
}

.movie-card:hover .card-play-btn { transform: translate(-50%, -50%) scale(1); }
.card-play-btn:hover { background: #fff; }
.card-play-btn svg { color: #000; margin-left: 2px; }

/* CARD INFO PANEL */
.card-info {
  position: absolute; top: var(--card-h); left: 0; right: 0;
  background: #181818;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 12px 12px 14px;
  opacity: 0; transform: translateY(-4px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
  box-shadow: 0 20px 40px rgba(0,0,0,0.8);
  z-index: 51;
  border: 1px solid rgba(255,255,255,0.04);
  border-top: none;
}

.movie-card:hover .card-info {
  opacity: 1; transform: translateY(0);
  pointer-events: all;
}

.card-info-actions {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}

.card-action-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.55);
  background: rgba(42,42,42,0.6);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  cursor: none; transition: border-color 0.15s, transform 0.15s, background 0.15s;
  flex-shrink: 0;
}

.card-action-btn:hover {
  border-color: var(--white);
  background: rgba(60,60,60,0.8);
  transform: scale(1.1);
}

.card-action-btn.play-small {
  background: var(--white); border-color: var(--white); color: #000;
}
.card-action-btn.play-small:hover {
  background: rgba(255,255,255,0.85); transform: scale(1.1);
}

.card-action-btn.add-list.added { border-color: var(--red); color: var(--red); }

.card-action-btn.add-list.added svg { stroke: var(--red); }

.like-btn-wrapper { margin-left: auto; }

.card-info-title {
  font-size: 13px; font-weight: 700;
  color: var(--white); margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.card-info-meta {
  display: flex; gap: 8px; align-items: center;
  font-size: 11px; flex-wrap: wrap;
}

.meta-match { color: #46d369; font-weight: 600; }
.meta-age {
  border: 1px solid rgba(255,255,255,0.3);
  padding: 1px 5px; border-radius: 2px;
  font-size: 10px;
}
.meta-hd {
  border: 1px solid rgba(255,255,255,0.3);
  padding: 1px 5px; border-radius: 2px;
  font-size: 10px; color: var(--text-dim);
}

.card-info-genres {
  margin-top: 8px;
  display: flex; gap: 6px; flex-wrap: wrap;
}

.card-genre-tag {
  font-size: 10px; color: var(--text-dim);
}

.card-genre-tag:not(:last-child)::after { content: '•'; margin-left: 6px; }

/* ============================================================
   TOP 10 CARDS
   ============================================================ */
.top10-track { gap: 0; }

.top10-card {
  position: relative;
  flex: 0 0 220px;
  display: flex; align-items: flex-end;
  cursor: none;
}

.top10-number {
  font-size: 140px;
  font-weight: 900;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 4px rgba(255,255,255,0.12);
  letter-spacing: -8px;
  margin-right: -20px;
  flex-shrink: 0;
  user-select: none;
  transition: -webkit-text-stroke 0.3s;
  z-index: 1;
}

.top10-card:hover .top10-number { -webkit-text-stroke-color: rgba(229,9,20,0.3); }

.top10-card .movie-card {
  flex: 0 0 160px;
  z-index: 2;
}

/* ============================================================
   PROGRESS BAR (continue watching)
   ============================================================ */
.card-progress {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: rgba(255,255,255,0.2);
  border-radius: 0 0 var(--radius) var(--radius);
}

.card-progress-fill {
  height: 100%; background: var(--red);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.3s;
  padding: 40px;
}

.modal-overlay.open {
  opacity: 1; visibility: visible; pointer-events: all;
}

.modal {
  background: #181818;
  border-radius: 12px;
  width: 100%; max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  transform: scale(0.9) translateY(32px);
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 32px 80px rgba(0,0,0,0.9);
}

.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px;
  background: rgba(42,42,42,0.9); border: none;
  color: var(--white); font-size: 18px;
  border-radius: 50%; cursor: none; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.2s;
}

.modal-close:hover { background: rgba(70,70,70,0.9); transform: scale(1.1); }

.modal-hero {
  height: 400px; position: relative;
  overflow: hidden;
}

.modal-hero-bg {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 80px;
}

.modal-hero-gradient {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 60%;
  background: linear-gradient(to top, var(--bg2), transparent);
}

.modal-hero-info {
  position: absolute; bottom: 28px; left: 36px; right: 36px;
  z-index: 2;
}

.modal-title {
  font-size: 36px; font-weight: 900;
  color: var(--white); margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.modal-buttons {
  display: flex; gap: 10px; margin-bottom: 16px;
}

.modal-body {
  padding: 24px 36px 36px;
  display: grid; grid-template-columns: 1.6fr 1fr;
  gap: 32px;
  align-items: start;
}

.modal-description {
  font-size: 15px; line-height: 1.7;
  color: var(--text);
}

.modal-meta-grid { display: flex; flex-direction: column; gap: 12px; }

.modal-meta-item { font-size: 13px; color: var(--text-dim); }
.modal-meta-item strong { color: var(--white); }

.modal-meta-rating {
  font-size: 22px; font-weight: 800;
  color: var(--gold);
}

.modal-genres { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.modal-genre-badge {
  padding: 4px 12px; border-radius: 20px;
  background: rgba(255,255,255,0.08);
  font-size: 12px; color: var(--text-dim);
  border: 1px solid rgba(255,255,255,0.1);
}

/* ============================================================
   VIDEO PLAYER — PROFESSIONAL
   ============================================================ */
.player-overlay {
  position: fixed; inset: 0;
  background: #000; z-index: 3000;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.35s ease;
}
.player-overlay.open { opacity: 1; visibility: visible; pointer-events: all; }

.player-scene { width: 100%; height: 100%; position: relative; overflow: hidden; }

/* VIDEO AREA */
.player-video-area {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: #000;
}

/* CLICK OVERLAY */
.player-click-overlay {
  position: absolute; inset: 0; z-index: 1; cursor: none;
}

/* BUFFERING */
.player-buffering {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  opacity: 0; transition: opacity 0.3s;
}
.player-buffering.active { opacity: 1; }

.player-spinner-ring {
  width: 60px; height: 60px;
  border: 4px solid rgba(255,255,255,0.12);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* SKIP FLASH */
.player-skip-flash {
  position: absolute; top: 0; bottom: 0; z-index: 3;
  width: 30%; display: flex; align-items: center;
  justify-content: center; pointer-events: none;
  opacity: 0;
}
.player-skip-flash.left  { left: 0;  border-radius: 0 50% 50% 0; }
.player-skip-flash.right { right: 0; border-radius: 50% 0 0 50%; }
.player-skip-flash.flash { animation: skipFlash 0.55s ease forwards; }

@keyframes skipFlash {
  0%   { opacity: 0; background: rgba(255,255,255,0); }
  25%  { opacity: 1; background: rgba(255,255,255,0.08); }
  100% { opacity: 0; background: rgba(255,255,255,0); }
}

.skip-flash-inner {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: #fff;
}
.skip-flash-inner span { font-size: 13px; font-weight: 700; }

/* PLAY/PAUSE CENTER FLASH */
.player-center-flash {
  position: absolute; inset: 0; z-index: 4;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; opacity: 0;
}
.player-center-flash.flash { animation: centerFlash 0.5s ease forwards; }
@keyframes centerFlash {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  100% { opacity: 0; }
}
.center-flash-icon {
  width: 80px; height: 80px;
  background: rgba(0,0,0,0.55);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transform: scale(0.8);
  animation: none;
}
.player-center-flash.flash .center-flash-icon { animation: flashScale 0.5s ease forwards; }
@keyframes flashScale {
  0%   { transform: scale(0.7); }
  40%  { transform: scale(1.1); }
  100% { transform: scale(0.9); opacity: 0; }
}

/* ── CHROME (controls visibility) ─────────────────────────── */
.player-top-bar,
.player-controls {
  position: absolute; left: 0; right: 0; z-index: 10;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.player-scene.hide-chrome .player-top-bar,
.player-scene.hide-chrome .player-controls {
  opacity: 0; pointer-events: none;
}
.player-scene.hide-chrome { cursor: none; }

/* TOP BAR */
.player-top-bar {
  top: 0;
  padding: 24px 36px 48px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.75) 0%, transparent 100%);
  display: flex; align-items: flex-start; gap: 16px;
}

.player-back-btn {
  display: flex; align-items: center; gap: 10px;
  background: none; border: none;
  color: var(--white); font-size: 15px; font-weight: 600;
  font-family: var(--font); cursor: none; flex-shrink: 0;
  padding: 6px 0; transition: opacity 0.2s;
  opacity: 0.85;
}
.player-back-btn:hover { opacity: 1; }

.player-top-info { flex: 1; }
.player-top-title {
  font-size: 18px; font-weight: 700; color: var(--white);
  line-height: 1.2;
}
.player-top-subtitle {
  font-size: 13px; color: rgba(255,255,255,0.6);
  margin-top: 3px;
}

.player-top-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* BOTTOM CONTROLS */
.player-controls {
  bottom: 0;
  padding: 60px 36px 28px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
}

/* PROGRESS WRAP */
.player-progress-wrap {
  position: relative; margin-bottom: 14px;
  padding: 8px 0; /* larger hit area */
  cursor: none;
}

.player-progress-bar {
  width: 100%; height: 4px;
  background: rgba(255,255,255,0.25);
  border-radius: 2px; position: relative;
  transition: height 0.18s ease;
}
.player-progress-wrap:hover .player-progress-bar { height: 6px; }

.player-progress-buffer {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.35);
  border-radius: 2px;
  width: 0; transition: width 0.5s ease;
}

.player-progress-fill {
  position: absolute; inset: 0;
  background: var(--red); border-radius: 2px;
  width: 0;
}

.player-progress-thumb {
  position: absolute; top: 50%;
  width: 14px; height: 14px;
  background: var(--white); border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.18s ease;
  left: 0;
  box-shadow: 0 0 6px rgba(0,0,0,0.5);
}
.player-progress-wrap:hover .player-progress-thumb { transform: translate(-50%, -50%) scale(1); }

/* TIME TOOLTIP */
.player-time-tooltip {
  position: absolute; bottom: calc(100% + 10px);
  transform: translateX(-50%);
  background: rgba(20,20,20,0.95);
  color: #fff; font-size: 12px; font-weight: 600;
  padding: 4px 8px; border-radius: 4px;
  pointer-events: none;
  opacity: 0; transition: opacity 0.15s;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.player-progress-wrap:hover .player-time-tooltip { opacity: 1; }
.player-time-tooltip::after {
  content: '';
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: rgba(20,20,20,0.95);
}

/* CONTROLS ROW */
.player-controls-row {
  display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
}

.player-controls-left,
.player-controls-right {
  display: flex; align-items: center; gap: 6px;
}

/* ICON BUTTON */
.player-icon-btn {
  background: none; border: none;
  color: rgba(255,255,255,0.9);
  display: flex; align-items: center; justify-content: center;
  cursor: none; padding: 8px;
  border-radius: 50%;
  transition: color 0.15s, transform 0.15s, background 0.15s;
  flex-shrink: 0;
}
.player-icon-btn:hover {
  color: #fff; transform: scale(1.12);
  background: rgba(255,255,255,0.08);
}
.player-icon-btn:active { transform: scale(0.95); }

.player-icon-btn.active { color: var(--red); }

/* TEXT BUTTON (speed/quality) */
.player-text-btn {
  font-family: var(--font);
  font-size: 14px; font-weight: 700;
  border-radius: 4px; padding: 6px 10px;
}
.player-text-btn #speed-label { font-size: 14px; }

/* PLAY/PAUSE - bigger */
.player-play-pause { padding: 8px; }
.player-play-pause:hover { transform: scale(1.15); }

/* VOLUME */
.player-volume-wrap { display: flex; align-items: center; gap: 4px; }

.player-volume-slider-wrap {
  display: flex; align-items: center;
  overflow: hidden;
  width: 0; transition: width 0.25s ease;
}
.player-volume-wrap:hover .player-volume-slider-wrap { width: 90px; }

.player-volume-slider {
  width: 80px; height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px; position: relative;
  cursor: none; margin: 0 8px;
}
.player-volume-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--white); border-radius: 2px;
  width: 80%;
}
.player-volume-thumb {
  position: absolute; top: 50%;
  width: 12px; height: 12px;
  background: #fff; border-radius: 50%;
  transform: translate(-50%, -50%);
  left: 80%;
  box-shadow: 0 0 4px rgba(0,0,0,0.4);
  transition: left 0s;
}

/* TIME DISPLAY */
.player-time-display {
  font-size: 14px; font-weight: 500;
  color: rgba(255,255,255,0.85);
  white-space: nowrap; margin-left: 8px;
  letter-spacing: 0.5px;
}
.player-time-sep { color: rgba(255,255,255,0.4); }

/* SUB BUTTON ACTIVE */
.player-sub-btn.active { color: var(--red); }

/* POPUP MENUS */
.player-popup-wrap { position: relative; }

.player-popup {
  position: absolute; bottom: calc(100% + 12px); right: 0;
  background: rgba(16,16,16,0.97);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px; min-width: 200px;
  padding: 8px 0;
  box-shadow: 0 12px 40px rgba(0,0,0,0.8);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.player-popup-wrap.open .player-popup {
  opacity: 1; visibility: visible; pointer-events: all;
  transform: translateY(0);
}

.popup-title {
  font-size: 11px; font-weight: 700;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase; letter-spacing: 1px;
  padding: 6px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 4px;
}

.popup-list { list-style: none; }
.popup-list li {
  padding: 10px 16px;
  font-size: 14px; color: rgba(255,255,255,0.75);
  cursor: none; transition: background 0.15s, color 0.15s;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.popup-list li:hover { background: rgba(255,255,255,0.07); color: #fff; }
.popup-list li.active { color: var(--red); font-weight: 600; }
.popup-list li.active::before {
  content: '✓';
  font-size: 12px; margin-right: 4px;
}

.q-tag {
  font-size: 10px; padding: 2px 6px; border-radius: 3px;
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.5);
}
.q-tag--ultra { background: rgba(229,9,20,0.2); color: var(--red); font-weight: 700; }

/* FULLSCREEN ICON STATE */
.player-overlay:fullscreen #fs-icon path:nth-child(1) {
  d: path("M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z");
}

/* KEYBOARD SHORTCUT HINT */
.player-key-hint {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.7);
  color: #fff; font-size: 15px; font-weight: 600;
  padding: 10px 20px; border-radius: 6px;
  pointer-events: none;
  opacity: 0; z-index: 20;
  white-space: nowrap;
}
.player-key-hint.show { animation: hintShow 1.2s ease forwards; }
@keyframes hintShow {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  15%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  70%  { opacity: 1; }
  100% { opacity: 0; }
}

/* NEXT EPISODE CARD */
.player-next-episode {
  position: absolute; bottom: 120px; right: 36px;
  width: 300px; background: rgba(24,24,24,0.97);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 20px;
  z-index: 15;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.4s, transform 0.4s, visibility 0.4s;
}
.player-next-episode.visible {
  opacity: 1; visibility: visible; pointer-events: all;
  transform: translateY(0);
}

.next-ep-label {
  font-size: 12px; color: rgba(255,255,255,0.5);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 8px; font-weight: 700;
}
.next-ep-info {
  font-size: 15px; font-weight: 600; color: #fff;
  margin-bottom: 14px; line-height: 1.4;
}
.next-ep-actions { display: flex; align-items: center; gap: 10px; }
.next-ep-play { font-size: 13px; padding: 10px 16px; }
.next-ep-dismiss {
  font-size: 13px; color: rgba(255,255,255,0.6);
  background: none; border: none; font-family: var(--font);
  cursor: none; padding: 4px;
  transition: color 0.15s;
}
.next-ep-dismiss:hover { color: #fff; }

.next-ep-progress-bar {
  height: 3px; background: rgba(255,255,255,0.15);
  border-radius: 2px; margin-top: 16px; overflow: hidden;
}
.next-ep-progress-fill {
  height: 100%; background: var(--red);
  width: 0; border-radius: 2px;
  transition: width 0.1s linear;
}

/* SUBTITLES */
.player-subtitles {
  position: absolute; bottom: 100px; left: 50%;
  transform: translateX(-50%);
  z-index: 12; pointer-events: none;
  text-align: center; max-width: 70%;
  font-size: 22px; font-weight: 500;
  color: #fff;
  text-shadow:
    0 1px 4px rgba(0,0,0,1),
    0 0 20px rgba(0,0,0,0.8);
  line-height: 1.5;
  transition: opacity 0.3s;
}

/* LOADING SCREEN (inside player) */
.player-loading-screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 24px; z-index: 8;
  background: #000;
}
.player-loading-emoji { font-size: 100px; filter: drop-shadow(0 8px 32px rgba(0,0,0,0.8)); }
.player-loading-title { font-size: 20px; font-weight: 700; color: rgba(255,255,255,0.8); }
.player-loading-sub   { font-size: 13px; color: rgba(255,255,255,0.4); }

/* ============================================================
   TOAST
   ============================================================ */
.toast-container {
  position: fixed; bottom: 32px; left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
}

.toast {
  background: rgba(35,35,35,0.97);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--white);
  padding: 12px 22px;
  border-radius: 6px;
  font-size: 14px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  animation: toastIn 0.35s cubic-bezier(0.34,1.56,0.64,1) forwards;
  display: flex; align-items: center; gap: 10px;
}

.toast.removing { animation: toastOut 0.3s ease forwards; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(8px) scale(0.95); }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 48px 52px 32px;
}

.footer-content { max-width: 960px; }

.footer-logo {
  font-size: 22px; font-weight: 900;
  color: var(--red); margin-bottom: 20px;
  letter-spacing: -1px;
}

.footer-links {
  display: flex; gap: 24px; flex-wrap: wrap;
  margin-bottom: 20px;
}

.footer-links a {
  font-size: 13px; color: var(--text-muted);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--text); }

.footer-copy { font-size: 12px; color: var(--text-muted); }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: slideUp 0.6s ease forwards;
}

/* Hold ripple effect */
.ripple {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transform: scale(0);
  animation: rippleAnim 0.6s linear;
  pointer-events: none;
}

@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

/* ============================================================
   MODAL BODY — IMPROVED
   ============================================================ */
.modal-left { }

.modal-meta-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; flex-wrap: wrap;
}

.modal-match { font-weight: 700; font-size: 15px; }
.modal-year  { font-size: 14px; color: var(--text-dim); }

.modal-age-badge {
  border: 1px solid rgba(255,255,255,0.4);
  padding: 2px 7px; border-radius: 3px;
  font-size: 12px; color: var(--text-dim);
}

.modal-quality-badge {
  border: 1px solid rgba(255,255,255,0.3);
  padding: 2px 6px; border-radius: 3px;
  font-size: 10px; color: rgba(255,255,255,0.5);
  font-weight: 700; letter-spacing: 0.5px;
}

.modal-duration { font-size: 13px; color: var(--text-dim); }

.modal-right {
  display: flex; flex-direction: column; gap: 10px;
}

.modal-label { color: var(--text-muted); font-size: 13px; }
.modal-rating-score { color: var(--gold); font-weight: 700; font-size: 16px; }

/* ============================================================
   HERO — POSTER & CAST
   ============================================================ */
.hero-poster-wrap {
  position: absolute; right: 6vw; bottom: 80px;
  z-index: 2;
  animation: posterFloat 1s ease 2.5s both;
}

@keyframes posterFloat {
  from { opacity: 0; transform: translateY(30px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

.hero-poster {
  width: 180px; height: 260px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1a0533 0%, #4a1580 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 72px;
  position: relative; overflow: hidden;
  box-shadow:
    0 32px 64px rgba(0,0,0,0.7),
    0 0 0 1px rgba(255,255,255,0.08),
    inset 0 1px 0 rgba(255,255,255,0.12);
  will-change: transform;
  animation: posterRocking 6s ease-in-out infinite;
  transform-origin: bottom center;
}

@keyframes posterRocking {
  0%, 100% { transform: rotate(-1.5deg) translateZ(0); }
  50%       { transform: rotate(1.5deg)  translateZ(0); }
}

.hero-poster-shine {
  position: absolute; inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.12) 0%,
    transparent 50%,
    rgba(0,0,0,0.2) 100%
  );
  pointer-events: none;
}

.hero-poster-glow {
  position: absolute; bottom: -20px; left: 50%;
  transform: translateX(-50%);
  width: 120px; height: 40px;
  background: rgba(120,0,200,0.4);
  filter: blur(20px);
  border-radius: 50%;
}

@media (max-width: 1100px) {
  .hero-poster-wrap { display: none; }
}

/* Hero meta improvements */
.hero-dot { color: rgba(255,255,255,0.25); font-size: 18px; line-height: 1; }

.hero-cast {
  margin-top: 16px;
  font-size: 13px; color: rgba(255,255,255,0.45);
  line-height: 1.6;
}
.hero-cast-label { color: rgba(255,255,255,0.3); }

/* ============================================================
   CARD — EXTRA POLISH
   ============================================================ */
.card-top-badge {
  position: absolute; top: 8px; left: 8px;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.75);
  font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 3px;
  letter-spacing: 0.3px;
  z-index: 2;
  opacity: 0; transition: opacity 0.25s;
}
.movie-card:hover .card-top-badge { opacity: 1; }

.card-stars {
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 1px;
  margin: 3px 0;
  line-height: 1;
}

.meta-duration {
  font-size: 11px; color: rgba(255,255,255,0.4);
}

/* ============================================================
   MODAL — EXTRA POLISH
   ============================================================ */
.modal-close {
  /* make it more Netflix-like */
  backdrop-filter: none;
}

.modal-overlay {
  /* backdrop-filter removed — too expensive */
}

/* RESPONSIVE
   ============================================================ */

/* Large screens — keep as-is but clamp padding */
@media (min-width: 1400px) {
  :root { --card-w: 240px; --card-h: 140px; }
  .navbar { padding: 0 72px; }
  .row-header { padding: 0 72px; }
  .row-wrapper { padding: 0 72px; }
  .hero-content { padding: 0 72px 140px; }
}

/* Medium screens */
@media (max-width: 1100px) {
  :root { --card-w: 190px; --card-h: 112px; }
  .navbar { padding: 0 36px; }
  .row-header { padding: 0 36px; }
  .row-wrapper { padding: 0 36px; }
  .hero-content { padding: 0 36px 100px; }
  .nav-links { gap: 16px; }
  .hero-title { font-size: clamp(32px, 5vw, 56px); }
  .player-controls { padding: 50px 24px 20px; }
  .player-top-bar  { padding: 18px 24px 40px; }
}

/* Tablet */
@media (max-width: 860px) {
  :root { --card-w: 160px; --card-h: 95px; }
  .nav-links { display: none; }
  .navbar { padding: 0 24px; height: 58px; }
  .row-header { padding: 0 24px; }
  .row-wrapper { padding: 0 24px; }
  .hero-content { padding: 0 24px 90px; max-width: 100%; }
  .hero-description { font-size: 14px; }
  .hero-cast { display: none; }
  .modal-body { grid-template-columns: 1fr; }
  .modal-hero { height: 280px; }
  .modal-title { font-size: 26px; }
  .player-controls { padding: 40px 16px 16px; }
  .player-top-bar  { padding: 14px 16px 32px; }
  .player-top-info { display: none; }
  .player-time-display { font-size: 12px; }
  .player-controls-row { gap: 4px; }
  .player-icon-btn { padding: 6px; }
  .next-ep-info, .next-ep-label { font-size: 13px; }
  .player-next-episode { right: 16px; width: 260px; }
}

/* Mobile */
@media (max-width: 580px) {
  :root { --card-w: 130px; --card-h: 78px; }
  .nav-logo { font-size: 20px; }
  .row-title { font-size: 16px; }
  .hero-title { font-size: clamp(28px, 8vw, 44px); letter-spacing: -1px; }
  .hero-meta { gap: 8px; }
  .hero-buttons .btn { padding: 11px 18px; font-size: 14px; }
  .search-input { width: 120px; }
  .btn-info span { display: none; }
  .top10-number { font-size: 100px; }
  .modal-overlay { padding: 0; }
  .modal { border-radius: 0; max-height: 100dvh; }
  .player-controls-left .player-time-display { display: none; }
  .player-volume-wrap { display: none; }
  .footer { padding: 32px 24px 24px; }
  .footer-links { gap: 14px; }
}

/* ============================================================
   PROFILE SELECTOR
   ============================================================ */
.profile-selector {
  position: fixed; inset: 0;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  z-index: 99000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.5s ease;
}
.profile-selector.ps-visible  { opacity: 1; pointer-events: all; }
.profile-selector.ps-exit     { opacity: 0; pointer-events: none; }

.profile-sel-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 40px; padding: 24px;
  animation: profileSelIn 0.7s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes profileSelIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.profile-sel-logo {
  font-size: 28px; font-weight: 900; color: var(--red);
  letter-spacing: -1px;
}

.profile-sel-title {
  font-size: clamp(22px, 4vw, 48px);
  font-weight: 400; color: var(--white);
  text-align: center; letter-spacing: -0.5px;
}

.profile-sel-grid {
  display: flex; gap: clamp(16px, 3vw, 28px);
  flex-wrap: wrap; justify-content: center;
  max-width: 820px;
}

.profile-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  cursor: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.profile-avatar {
  position: relative;
  width: clamp(96px, 13vw, 160px);
  height: clamp(96px, 13vw, 160px);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(32px, 5.5vw, 60px);
  font-weight: 700; color: var(--white);
  border: 3px solid transparent;
  overflow: hidden;
  user-select: none;
  transition: border-color 0.22s ease, transform 0.22s ease;
}

.profile-card:hover .profile-avatar {
  border-color: var(--white);
  transform: scale(1.06);
}
.profile-card.ps-selected .profile-avatar {
  border-color: var(--white);
  transform: scale(1.1);
}

.profile-avatar-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.6);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.profile-sel-grid.edit-mode .profile-avatar-overlay { opacity: 1; }

.profile-name {
  font-size: clamp(12px, 1.8vw, 16px);
  color: var(--text-dim);
  transition: color 0.2s;
  text-align: center;
}
.profile-card:hover .profile-name { color: var(--white); }

.profile-kids-badge {
  font-size: 10px; font-weight: 700;
  color: var(--red); letter-spacing: 1px;
  margin-top: -6px;
}

.profile-avatar--add {
  background: transparent !important;
  border: 3px solid rgba(255,255,255,0.2) !important;
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 200; color: rgba(255,255,255,0.35);
  transition: border-color 0.22s, color 0.22s, transform 0.22s;
}
.profile-card--add:hover .profile-avatar--add {
  border-color: rgba(255,255,255,0.8) !important;
  color: rgba(255,255,255,0.8);
  transform: scale(1.06);
}
.profile-card--add:hover .profile-name { color: var(--white); }

.profile-sel-manage {
  padding: 10px 38px;
  border: 1px solid rgba(255,255,255,0.35);
  background: transparent; color: var(--text-dim);
  font-size: 14px; font-weight: 500;
  font-family: var(--font); letter-spacing: 1px;
  cursor: none; border-radius: 3px;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.profile-sel-manage:hover {
  border-color: var(--white); color: var(--white);
  background: rgba(255,255,255,0.06);
}

/* ============================================================
   ACCOUNT PAGE
   ============================================================ */
.account-overlay {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 9800;
  overflow-y: auto;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.account-overlay.acct-open { opacity: 1; pointer-events: all; }

.account-topbar {
  position: sticky; top: 0;
  display: flex; align-items: center; justify-content: center;
  height: 68px; padding: 0 52px;
  background: rgba(20,20,20,0.97);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.account-topbar-logo {
  font-size: 24px; font-weight: 900;
  color: var(--red); letter-spacing: -1px;
}

.account-topbar-close {
  position: absolute; right: 40px;
  background: none; border: none; cursor: none;
  color: var(--text-dim); padding: 8px; border-radius: 50%;
  display: flex; align-items: center;
  transition: color 0.2s, background 0.2s;
}
.account-topbar-close:hover {
  color: var(--white); background: rgba(255,255,255,0.08);
}

.account-content-wrap {
  max-width: 840px; margin: 0 auto;
  padding: 48px 40px 80px;
}

.account-page-header {
  display: flex; align-items: baseline;
  justify-content: space-between; flex-wrap: wrap; gap: 8px;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.account-page-title {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700; color: var(--white); letter-spacing: -1px;
}

.account-member-since {
  font-size: 13px; color: var(--text-muted);
}

/* Sections */
.acct-section {
  margin-bottom: 28px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; overflow: hidden;
}

.acct-section-head {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,0.025);
  padding: 13px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.acct-section-head h2 {
  font-size: 11px; font-weight: 700;
  color: var(--text-muted); letter-spacing: 1.5px;
}

.acct-row {
  display: flex; align-items: flex-start; gap: 24px;
  padding: 22px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.acct-row:last-child { border-bottom: none; }

.acct-row-left  { flex: 1; min-width: 0; }

.acct-row-right {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 10px; flex-shrink: 0;
}
.acct-row-right--inline {
  flex-direction: row; align-items: center; gap: 16px;
}

.acct-info-main {
  font-size: 14px; font-weight: 500; color: var(--text);
  margin-bottom: 4px; display: block;
}
.acct-info-sub {
  font-size: 13px; color: var(--text-muted);
  margin-top: 5px;
}

.acct-link {
  font-size: 13px; color: #4d9ef7; cursor: none;
  white-space: nowrap;
  transition: color 0.15s, text-decoration 0.15s;
}
.acct-link:hover { color: #80baff; text-decoration: underline; }
.acct-link--danger { color: #f74d4d; }
.acct-link--danger:hover { color: #ff8080; }
.acct-link--sm { font-size: 12px; }

/* Billing */
.acct-billing-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: #46d369; font-weight: 600;
  margin-bottom: 10px;
}
.acct-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #46d369;
  box-shadow: 0 0 8px rgba(70,211,105,0.7);
}
.acct-billing-next {
  font-size: 13px; color: var(--text-dim);
  margin-bottom: 12px; line-height: 1.5;
}
.acct-billing-next strong { color: var(--white); }

.acct-payment-method {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-dim);
}
.acct-card-badge {
  background: rgba(30,60,110,0.8);
  color: #6db5ff; font-size: 10px; font-weight: 800;
  padding: 3px 8px; border-radius: 4px; letter-spacing: 1px;
  border: 1px solid rgba(109,181,255,0.25);
}

/* Plan card */
.acct-plan-card { padding: 20px 20px 0; }

.acct-plan-header {
  display: flex; align-items: center; gap: 16px; margin-bottom: 20px;
}

.acct-plan-badge {
  background: linear-gradient(135deg, #92690a 0%, #f5c518 100%);
  color: #000; font-size: 11px; font-weight: 800;
  padding: 4px 12px; border-radius: 20px; letter-spacing: 0.5px;
}

.acct-plan-price {
  font-size: 22px; font-weight: 700; color: var(--white);
}
.acct-plan-price span { font-size: 14px; color: var(--text-muted); font-weight: 400; }

.acct-plan-features {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px; margin-bottom: 24px;
}

.acct-plan-feat {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; color: var(--text-dim); line-height: 1.4;
}
.acct-plan-feat svg { color: #46d369; flex-shrink: 0; margin-top: 1px; }
.acct-plan-feat strong { color: var(--text); }

/* Plan compare strip */
.acct-plan-compare {
  display: flex; gap: 8px;
  padding: 0 0 20px; flex-wrap: wrap;
}

.acct-plan-option {
  flex: 1; min-width: 120px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 14px 16px;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
  cursor: none;
}
.acct-plan-option:hover { border-color: rgba(255,255,255,0.25); }

.acct-plan-option.current {
  border-color: var(--red);
  background: rgba(229,9,20,0.06);
}

.acct-plan-option-name {
  font-size: 14px; font-weight: 600; color: var(--text-dim);
  margin-bottom: 5px;
}
.acct-plan-option.current .acct-plan-option-name { color: var(--red); }

.acct-plan-option-price { font-size: 12px; color: var(--text-muted); }

/* Profile rows in account */
.acct-profile-row {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.15s;
  cursor: none;
}
.acct-profile-row:last-child { border-bottom: none; }
.acct-profile-row:hover { background: rgba(255,255,255,0.025); }

.acct-profile-avatar {
  width: 44px; height: 44px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: var(--white);
  flex-shrink: 0;
}

.acct-profile-info { flex: 1; min-width: 0; }

.acct-profile-name {
  font-size: 14px; font-weight: 600; color: var(--text);
  margin-bottom: 3px;
}
.acct-profile-sub { font-size: 12px; color: var(--text-muted); }

.acct-profile-edit {
  background: none; border: none; cursor: none;
  color: var(--text-muted); padding: 6px;
  border-radius: 50%; display: flex; align-items: center;
  transition: color 0.15s, background 0.15s;
}
.acct-profile-edit:hover {
  color: var(--white); background: rgba(255,255,255,0.08);
}

/* Settings rows */
.acct-setting-row { padding: 16px 20px !important; align-items: center !important; }
.acct-setting-label { flex: 1; font-size: 13px; color: var(--text-dim); }
.acct-setting-val { font-size: 13px; color: var(--text); }

/* Sign out */
.acct-signout-section { text-align: center; padding: 32px 0 0; }

.acct-signout-btn {
  border: 1px solid rgba(255,255,255,0.18);
  background: transparent; color: var(--text-dim);
  font-size: 13px; font-family: var(--font);
  padding: 10px 28px; border-radius: 4px; cursor: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.acct-signout-btn:hover {
  border-color: var(--white); color: var(--white);
  background: rgba(255,255,255,0.04);
}

.acct-signout-hint {
  font-size: 11px; color: var(--text-muted); margin-top: 10px;
}

/* Account responsive */
@media (max-width: 860px) {
  .account-topbar { padding: 0 24px; }
  .account-topbar-close { right: 16px; }
  .account-content-wrap { padding: 28px 20px 60px; }
  .account-page-title { font-size: 28px; }
  .acct-row { flex-direction: column; gap: 14px; }
  .acct-row-right { align-items: flex-start; }
  .acct-plan-features { grid-template-columns: 1fr; }
}
@media (max-width: 580px) {
  .profile-sel-grid { gap: 14px; }
  .profile-sel-inner { gap: 28px; }
  .account-content-wrap { padding: 20px 16px 50px; }
  .acct-plan-compare { flex-direction: column; }
}

/* TMDB API Key & Custom Player Extra Styles */
#tmdb-api-key-input:focus {
  border-color: rgba(229, 9, 20, 0.6) !important;
  box-shadow: 0 0 8px rgba(229, 9, 20, 0.2);
}
#save-tmdb-key-btn {
  transition: background 0.25s, transform 0.2s;
}
#save-tmdb-key-btn:hover {
  background: #b80913 !important;
  transform: scale(1.03);
}
#save-tmdb-key-btn:active {
  transform: scale(0.97);
}
#player-toggle-mode {
  transition: background 0.2s, transform 0.2s;
}
#player-toggle-mode:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  transform: scale(1.03);
}
#player-toggle-mode:active {
  transform: scale(0.97);
}

#player-skip-intro {
  background: rgba(0, 0, 0, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  color: #fff !important;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  transition: all 0.2s ease !important;
  font-family: var(--font) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

#player-skip-intro:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: #fff !important;
  transform: scale(1.05) !important;
  box-shadow: 0 6px 18px rgba(0,0,0,0.7);
}

#player-skip-intro:active {
  transform: scale(0.95) !important;
}

/* Restore default browser cursor */
* {
  cursor: auto !important;
}
a, button, [role="button"], input, select, textarea, .movie-card, .row-arrow, .card-action-btn, .profile-card, .acct-profile-row, .acct-plan-option, .acct-link, .modal-close {
  cursor: pointer !important;
}
#cursor, #cursor-trail {
  display: none !important;
}
