/*
 * UNLTD Premium UI Enhancement v2
 * Deep Black · Dark Emerald · Glass · Modern · Luxury
 * Compatible with the compiled Vite/React dist — CSS injection layer only.
 * Does NOT modify any JavaScript logic, routes, or component behaviour.
 */

/* ============================================================
   1. DESIGN TOKENS — Override Existing App Variables
   ============================================================ */

:root {
  /* ---- Emerald accent palette ---- */
  --green:           #00C853;
  --green-bright:    #00E676;
  --green-dim:       rgba(0, 200, 83, 0.14);
  --green-glow:      0 0 28px rgba(0, 200, 83, 0.38), 0 0 56px rgba(0, 200, 83, 0.12);
  --green-glow-sm:   0 0 14px rgba(0, 200, 83, 0.3);
  --green-border:    rgba(0, 200, 83, 0.38);
  --border-focus:    rgba(0, 200, 83, 0.65);

  /* ---- Deep-black surface scale ---- */
  --surface-0: #080808;
  --surface-1: #0e0e0e;
  --surface-2: #151515;
  --surface-3: #1b1b1b;
  --surface-4: #222222;

  /* ---- Glass utilities ---- */
  --glass-bg:        rgba(12, 12, 12, 0.75);
  --glass-bg-hover:  rgba(255, 255, 255, 0.06);
  --glass-border:    rgba(255, 255, 255, 0.07);

  /* ---- Border tokens ---- */
  --border:          rgba(255, 255, 255, 0.07);
  --border-subtle:   rgba(255, 255, 255, 0.04);
  --border-medium:   rgba(255, 255, 255, 0.11);

  /* ---- Text ---- */
  --text-primary:    #f2f2f2;
  --text-secondary:  rgba(242, 242, 242, 0.58);
  --text-tertiary:   rgba(242, 242, 242, 0.32);

  /* ---- Typography ---- */
  --font-display: 'Sora', 'Inter', system-ui, -apple-system, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  /* ---- Radius ---- */
  --radius-xs:   3px;
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --radius-xl:   20px;
  --radius-2xl:  28px;
  --radius-full: 9999px;

  /* ---- Shadows ---- */
  --shadow-card:    0 2px 12px rgba(0,0,0,0.55), 0 1px 3px rgba(0,0,0,0.4);
  --shadow-hover:   0 8px 36px rgba(0,0,0,0.8),  0 2px 8px rgba(0,0,0,0.5);
  --shadow-modal:   0 32px 96px rgba(0,0,0,0.96), 0 8px 24px rgba(0,0,0,0.65);
  --shadow-dropdown:0 16px 52px rgba(0,0,0,0.9),  0 2px 8px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);

  /* ---- Motion ---- */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout:  cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast:   0.15s var(--ease-inout);
  --t-base:   0.22s var(--ease-out);
  --t-slow:   0.44s var(--ease-out);
  --transition: var(--t-base);
  --transition-slow: var(--t-slow);

  /* ---- Layout ---- */
  --nav-h: 68px;
}

/* ============================================================
   2. GLOBAL RESETS & BASE
   ============================================================ */

html { background: var(--surface-0) !important; }

body {
  background: var(--surface-0) !important;
  font-family: var(--font-body) !important;
  color: var(--text-primary) !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

/* Scrollbar */
* { scrollbar-width: thin; scrollbar-color: rgba(0,200,83,0.18) transparent; }
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,200,83,0.22); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,200,83,0.42); }

/* Selection */
::selection { background: rgba(0,200,83,0.22) !important; color: var(--text-primary) !important; }

/* Focus ring */
*:focus-visible {
  outline: 2px solid var(--green-bright) !important;
  outline-offset: 3px !important;
  border-radius: var(--radius-xs) !important;
}

/* Tap highlight */
* { -webkit-tap-highlight-color: rgba(0,200,83,0.07) !important; }

/* ============================================================
   3. KEYFRAME ANIMATIONS
   ============================================================ */

@keyframes fadeIn    { from { opacity: 0 }                  to { opacity: 1 } }
@keyframes fadeUp    { from { opacity: 0; transform: translateY(18px) }  to { opacity: 1; transform: translateY(0) } }
@keyframes fadeDown  { from { opacity: 0; transform: translateY(-10px) } to { opacity: 1; transform: translateY(0) } }
@keyframes scaleIn   { from { opacity: 0; transform: scale(0.94) }        to { opacity: 1; transform: scale(1) } }
@keyframes expandIn  {
  0%  { opacity: 0; transform: translateY(-5px) scale(0.96) }
  65% { transform: translateY(1px)  scale(1.005) }
  to  { opacity: 1; transform: translateY(0)     scale(1) }
}
@keyframes shimmer {
  0%   { background-position: -800px 0 }
  100% { background-position:  800px 0 }
}
@keyframes heroFadeIn {
  0%   { opacity: 0; transform: scale(1.06) }
  to   { opacity: 1; transform: scale(1.02) }
}
@keyframes heroPan {
  0%   { transform: scale(1.06) }
  100% { transform: scale(1.0)  }
}
@keyframes liveWave {
  0%, 100% { opacity: 1; transform: scale(1) }
  50%       { opacity: 0.4; transform: scale(0.8) }
}
@keyframes glowPulse {
  0%, 100% { box-shadow: var(--green-glow-sm) }
  50%       { box-shadow: 0 0 6px rgba(0,200,83,0.12) }
}
@keyframes cardPop {
  0%  { opacity:0; transform:translate(-50%,-42%)scale(.88) }
  60% {             transform:translate(-50%,-42%)scale(1.01) }
  to  { opacity:1; transform:translate(-50%,-42%)scale(1) }
}

/* ============================================================
   4. SKELETON SHIMMER
   ============================================================ */

.skeleton {
  background: linear-gradient(
    105deg,
    var(--surface-2) 0%,
    var(--surface-2) 28%,
    var(--surface-3) 50%,
    var(--surface-2) 72%,
    var(--surface-2) 100%
  ) !important;
  background-size: 800px 100% !important;
  animation: shimmer 1.9s ease-in-out infinite !important;
  border-radius: var(--radius-md) !important;
}

/* ============================================================
   5. NAVBAR — Floating Glass
   ============================================================ */

nav {
  height: var(--nav-h) !important;
  font-family: var(--font-body) !important;
}

/* Scrolled state background is inline-applied by React — target via opacity */
/* We upgrade the non-scrolled (transparent top) gradient */
nav[style*="linear-gradient(180deg"] {
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.72) 0%,
    rgba(0,0,0,0.3) 60%,
    transparent 100%
  ) !important;
}

/* Scrolled state glass refinement */
nav[style*="rgba(15,15,15,0.97)"],
nav[style*="rgba(15, 15, 15, 0.97)"] {
  background: rgba(8,8,8,0.88) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) !important;
}

/* Logo wordmark */
nav a span[style*="fontWeight:900"],
nav a span[style*="font-weight: 900"] {
  font-family: var(--font-display) !important;
  font-size: 16px !important;
  letter-spacing: -0.045em !important;
  color: var(--text-primary) !important;
}

/* Nav links */
nav a[style*="textDecoration:\"none\""][style*="padding:\"6px"] {
  border-radius: var(--radius-sm) !important;
  transition: all var(--t-fast) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
}

/* Active nav link */
nav a[style*="rgba(255,255,255,0.1)"],
nav a[style*="rgba(255, 255, 255, 0.1)"] {
  background: var(--green-dim) !important;
  color: var(--green-bright) !important;
  border: 1px solid var(--green-border) !important;
  font-weight: 700 !important;
}

/* Search input container */
nav div[style*="border:\"1.5px solid rgba(29,185,84,0.55)\""],
nav div[style*='border:"1.5px solid rgba(29,185,84,0.55)"'] {
  background: rgba(255,255,255,0.05) !important;
  border: 1.5px solid var(--green-border) !important;
  border-radius: var(--radius-md) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

/* Search icon tint */
nav div[style*="border:\"1.5px solid rgba"] svg {
  color: var(--text-tertiary) !important;
}

/* Search input */
nav input[type="text"] {
  font-family: var(--font-body) !important;
  caret-color: var(--green-bright) !important;
}

/* Search button (magnifying glass) */
nav button[style*="width:36"][style*="height:36"][style*="background:\"none\""] {
  border-radius: var(--radius-md) !important;
  transition: all var(--t-fast) !important;
}

/* Sign In button */
nav button[style*="background:\"var(--green)\""],
nav button[style*='background:"var(--green)"'] {
  background: var(--green) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--green-glow-sm) !important;
  font-family: var(--font-body) !important;
  transition: all var(--t-base) !important;
}

/* User avatar button */
nav button[style*="borderRadius:6"][style*="gap:6"] {
  border-radius: var(--radius-md) !important;
}

/* User dropdown */
div[style*="width:200"][style*="top:\"calc(100% + 8px)\""],
div[style*='width:200'][style*='top:"calc(100% + 8px)"'] {
  background: var(--surface-2) !important;
  border: 1px solid var(--border-medium) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-dropdown) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  animation: expandIn 0.22s var(--ease-out) !important;
  overflow: hidden !important;
}

div[style*="width:200"][style*="top:\"calc(100% + 8px)\""] > div:first-child,
div[style*='width:200'][style*='top:"calc(100% + 8px)"'] > div:first-child {
  border-bottom: 1px solid var(--border) !important;
  padding: 14px 16px !important;
}

/* ============================================================
   6. HERO SECTION — Cinematic Immersive
   ============================================================ */

/* Desktop hero */
.hero-desktop {
  height: clamp(400px, 62vw, 780px) !important;
  overflow: hidden !important;
  position: relative !important;
  user-select: none !important;
}

/* Backdrop image — cinematic slow pan on load */
.hero-desktop img {
  animation: heroPan 12s ease-out forwards !important;
  will-change: transform !important;
  transform-origin: center top !important;
}

/* Left-to-center cinematic gradient */
.hero-desktop > div[style*="linear-gradient(105deg"] {
  background: linear-gradient(
    112deg,
    rgba(8,8,8,0.97) 0%,
    rgba(8,8,8,0.82) 32%,
    rgba(8,8,8,0.35) 62%,
    rgba(8,8,8,0.05) 100%
  ) !important;
}

/* Bottom vignette */
.hero-desktop > div[style*="linear-gradient(to top"] {
  background: linear-gradient(
    to top,
    #080808 0%,
    rgba(8,8,8,0.72) 24%,
    rgba(8,8,8,0.18) 52%,
    transparent 78%
  ) !important;
}

/* Hero content block */
.hero-desktop > div[style*="position:\"absolute\",bottom:0"],
.hero-desktop > div[style*='position:"absolute",bottom:0'] {
  padding: 0 5% clamp(52px, 8vw, 100px) !important;
  max-width: 740px !important;
}

/* Trending badge */
.hero-desktop .badge.badge-green {
  animation: fadeUp 0.6s var(--ease-out) 0.05s both !important;
}

/* Hero title */
.hero-desktop h1 {
  font-family: var(--font-display) !important;
  font-size: clamp(30px, 4.6vw, 66px) !important;
  font-weight: 900 !important;
  letter-spacing: -0.035em !important;
  line-height: 1.0 !important;
  text-shadow: 0 2px 20px rgba(0,0,0,0.7), 0 1px 4px rgba(0,0,0,0.5) !important;
  margin-bottom: 14px !important;
  animation: fadeUp 0.75s var(--ease-out) 0.1s both !important;
}

/* Star rating row */
.hero-desktop div[style*="alignItems:\"center\",gap:6"],
.hero-desktop div[style*='alignItems:"center",gap:6'] {
  animation: fadeUp 0.72s var(--ease-out) 0.18s both !important;
}

/* Hero genre / meta text */
.hero-desktop span[style*="fontSize:11"],
.hero-desktop span[style*="font-size: 11"] {
  animation: fadeUp 0.72s var(--ease-out) 0.22s both !important;
}

/* Synopsis */
.hero-desktop div[style*="fontSize:14"] {
  animation: fadeUp 0.72s var(--ease-out) 0.28s both !important;
  color: var(--text-secondary) !important;
  line-height: 1.65 !important;
}

/* CTA button row */
.hero-desktop div[style*="gap:10,marginTop"],
.hero-desktop div[style*="gap:10"][style*="marginTop"] {
  animation: fadeUp 0.72s var(--ease-out) 0.36s both !important;
}

/* Hero Watch button */
.hero-desktop button[style*="background:\"var(--green)\""],
.hero-desktop button[style*='background:"var(--green)"'] {
  background: var(--green) !important;
  border-radius: var(--radius-md) !important;
  height: 50px !important;
  padding: 0 30px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  font-family: var(--font-body) !important;
  box-shadow: var(--green-glow) !important;
  transition: all var(--t-base) !important;
  letter-spacing: 0.01em !important;
}

.hero-desktop button[style*="background:\"var(--green)\""]:hover,
.hero-desktop button[style*='background:"var(--green)"']:hover {
  filter: brightness(1.14) !important;
  transform: translateY(-2px) !important;
  box-shadow: var(--green-glow), 0 6px 20px rgba(0,0,0,0.5) !important;
}

/* Hero Info/Trailer button */
.hero-desktop button[style*="rgba(255,255,255,0.15)"],
.hero-desktop button[style*="rgba(255, 255, 255, 0.15)"] {
  background: rgba(255,255,255,0.1) !important;
  border: 1.5px solid rgba(255,255,255,0.18) !important;
  border-radius: var(--radius-md) !important;
  height: 50px !important;
  padding: 0 26px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  font-family: var(--font-body) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  transition: all var(--t-base) !important;
}

.hero-desktop button[style*="rgba(255,255,255,0.15)"]:hover,
.hero-desktop button[style*="rgba(255, 255, 255, 0.15)"]:hover {
  background: rgba(255,255,255,0.18) !important;
  border-color: rgba(255,255,255,0.28) !important;
  transform: translateY(-2px) !important;
}

/* Hero dot indicators */
.hero-desktop button[style*="borderRadius:99"],
.hero-desktop button[style*="border-radius: 99"] {
  transition: all 0.45s var(--ease-out) !important;
}

/* Mobile hero */
.hero-mobile > div {
  aspect-ratio: 9/14 !important;
  background: var(--surface-1) !important;
}

.hero-mobile > div > div[style*="linear-gradient(to top"] {
  background: linear-gradient(
    to top,
    #080808 0%,
    rgba(8,8,8,0.65) 42%,
    rgba(8,8,8,0.08) 72%,
    transparent 100%
  ) !important;
}

.hero-mobile h1 {
  font-family: var(--font-display) !important;
  font-weight: 900 !important;
  letter-spacing: -0.035em !important;
  text-shadow: 0 2px 14px rgba(0,0,0,0.75) !important;
}

/* ============================================================
   7. BADGES
   ============================================================ */

.badge {
  font-family: var(--font-body) !important;
  font-weight: 800 !important;
  letter-spacing: 0.07em !important;
  font-size: 9.5px !important;
  padding: 3px 8px !important;
  border-radius: 3px !important;
}

.badge-green {
  background: var(--green-dim) !important;
  color: var(--green-bright) !important;
  border: 1px solid var(--green-border) !important;
  box-shadow: 0 0 10px rgba(0,200,83,0.1) !important;
}

.badge-blue {
  color: #7dd3fc !important;
  background: rgba(56,189,248,0.1) !important;
  border: 1px solid rgba(56,189,248,0.2) !important;
}

.badge-purple {
  color: #d8b4fe !important;
  background: rgba(168,85,247,0.1) !important;
  border: 1px solid rgba(168,85,247,0.2) !important;
}

.badge-red {
  color: #fca5a5 !important;
  background: rgba(248,113,113,0.1) !important;
  border: 1px solid rgba(248,113,113,0.2) !important;
}

/* ============================================================
   8. SECTION ROWS — Netflix-style Carousels
   ============================================================ */

/* Section container */
.carousel-row {
  margin-bottom: 10px !important;
  position: relative !important;
}

/* Section header */
.carousel-row > div[style*="justifyContent"] {
  padding: 0 4% !important;
  margin-bottom: 16px !important;
  align-items: center !important;
}

/* Section title */
.carousel-row h2 {
  font-family: var(--font-display) !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  color: var(--text-primary) !important;
  line-height: 1.2 !important;
}

.carousel-row h2:hover {
  color: var(--green-bright) !important;
  cursor: default !important;
}

/* Section subtitle */
.carousel-row p[style*="fontSize:11"] {
  font-size: 11px !important;
  color: var(--text-tertiary) !important;
  margin-top: 3px !important;
}

/* Section icon */
.carousel-row span[style*="var(--green)"] svg {
  color: var(--green-bright) !important;
  filter: drop-shadow(0 0 5px rgba(0,200,83,0.45)) !important;
}

/* Carousel track */
.carousel-row .no-scrollbar[style*="overflowX:\"auto\""],
.carousel-row .no-scrollbar[style*='overflowX:"auto"'] {
  gap: 12px !important;
  padding: 8px 4% 110px !important;
  margin-bottom: -92px !important;
}

/* Arrow buttons */
.carousel-arrows button {
  width: 34px !important;
  height: 34px !important;
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--border-medium) !important;
  background: var(--glass-bg) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  color: var(--text-secondary) !important;
  transition: all var(--t-fast) !important;
}

.carousel-arrows button:hover:not(:disabled) {
  background: var(--glass-bg-hover) !important;
  border-color: var(--green-border) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4) !important;
}

.carousel-arrows { opacity: 0 !important; transition: opacity var(--t-base) !important; }
.carousel-row:hover .carousel-arrows { opacity: 1 !important; }

@media (max-width: 768px) {
  .carousel-arrows { display: none !important; }
}

/* ============================================================
   9. MOVIE CARDS — Immersive Portrait
   ============================================================ */

/* Card image frame */
div[style*='aspectRatio:"2/3"'][style*='overflow:"hidden"'],
div[style*="aspectRatio:\"2/3\""][style*="overflow:\"hidden\""] {
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-card) !important;
  transition: box-shadow 0.32s var(--ease-out), transform 0.32s var(--ease-out) !important;
  will-change: transform !important;
  background: var(--surface-2) !important;
  overflow: hidden !important;
}

/* 16/9 video cards */
div[style*='aspectRatio:"16/9"'][style*='overflow:"hidden"'],
div[style*="aspectRatio:\"16/9\""][style*="overflow:\"hidden\""] {
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-card) !important;
  overflow: hidden !important;
}

/* Card image — smooth reveal + zoom container */
div[style*='aspectRatio:"2/3"'] img,
div[style*="aspectRatio:\"2/3\""] img {
  transition: opacity 0.38s ease, transform 0.55s var(--ease-out) !important;
  transform-origin: center top !important;
  will-change: transform !important;
}

/* Hover state (JS applies scale(1.03) inline) */
div[style*='transform:"scale(1.03)"'],
div[style*="transform:\"scale(1.03)\""] {
  box-shadow: var(--shadow-hover), 0 0 0 1px var(--border-medium) !important;
}

/* Card metadata area */
div[style*="marginTop:8"][style*="paddingLeft:2"] {
  padding: 9px 2px 3px !important;
}

/* Card title */
div[style*="marginTop:8"][style*="paddingLeft:2"] > div[style*="fontSize:12"] {
  font-family: var(--font-body) !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  color: var(--text-primary) !important;
}

/* Card year / meta row */
div[style*="marginTop:8"][style*="paddingLeft:2"] > div[style*="marginTop:3"] span:first-child {
  color: var(--text-tertiary) !important;
  font-size: 10.5px !important;
}

/* Rating badge on card */
div[style*="top:6,left:6"][style*="backdropFilter"] {
  background: rgba(0,0,0,0.82) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border-radius: 4px !important;
  border: 0.5px solid rgba(255,255,255,0.07) !important;
  padding: 2px 6px !important;
}

/* TV label — emerald instead of blue */
div[style*="background:\"rgba(59,130,246"],
div[style*='background:"rgba(59,130,246'] {
  background: rgba(0,200,83,0.15) !important;
  border: 1px solid rgba(0,200,83,0.3) !important;
  border-radius: 3px !important;
}

div[style*="background:\"rgba(59,130,246"] span,
div[style*='background:"rgba(59,130,246'] span {
  color: var(--green-bright) !important;
}

/* ============================================================
   10. HOVER EXPAND PANEL (Netflix-style tooltip card)
   ============================================================ */

div.expand-desktop[style*="position:\"absolute\""],
div[style*="width:272"][style*="boxShadow"] {
  background: var(--surface-2) !important;
  border: 1px solid var(--border-medium) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 24px 72px rgba(0,0,0,0.97), 0 4px 14px rgba(0,0,0,0.65), 0 0 0 1px rgba(0,200,83,0.06) !important;
  overflow: hidden !important;
}

/* Expand panel backdrop gradient */
div[style*="width:272"] > div[style*="aspectRatio:\"16/9\""] > div[style*="linear-gradient"],
div[style*="width:272"] > div[style*='aspectRatio:"16/9"'] > div[style*="linear-gradient"] {
  background: linear-gradient(to top, var(--surface-2) 0%, transparent 58%) !important;
}

/* Expand panel inner content area */
div[style*="width:272"] > div[style*="padding:\"12px 14"] {
  padding: 14px 16px 16px !important;
  background: var(--surface-2) !important;
}

/* Expand panel play button */
div[style*="width:272"] button[style*="background:\"var(--green)\""],
div[style*="width:272"] button[style*='background:"var(--green)"'] {
  background: var(--green) !important;
  border-radius: var(--radius-full) !important;
  box-shadow: var(--green-glow-sm) !important;
  transition: all var(--t-fast) !important;
}

/* ============================================================
   11. BUTTONS — Universal Premium
   ============================================================ */

.btn {
  font-family: var(--font-body) !important;
  transition: all var(--t-base) !important;
  position: relative !important;
  overflow: hidden !important;
}

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

.btn-primary {
  background: var(--green) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--green-glow-sm) !important;
  padding: 11px 26px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em !important;
}

.btn-primary:hover {
  filter: brightness(1.12) !important;
  box-shadow: var(--green-glow) !important;
  transform: translateY(-1px) !important;
}

.btn-secondary {
  background: rgba(255,255,255,0.09) !important;
  border: 1.5px solid rgba(255,255,255,0.14) !important;
  border-radius: var(--radius-md) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  color: #fff !important;
  padding: 11px 26px !important;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.15) !important;
  border-color: rgba(255,255,255,0.24) !important;
  transform: translateY(-1px) !important;
}

.btn-icon {
  border-radius: var(--radius-full) !important;
  background: rgba(0,0,0,0.55) !important;
  border: 1.5px solid rgba(255,255,255,0.16) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  transition: all var(--t-base) !important;
}

.btn-icon:hover {
  background: rgba(255,255,255,0.12) !important;
  border-color: rgba(255,255,255,0.28) !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5) !important;
  transform: scale(1.06) !important;
}

.btn-icon.active {
  background: var(--green) !important;
  border-color: var(--green) !important;
  box-shadow: var(--green-glow-sm) !important;
}

.btn-ghost {
  border-radius: var(--radius-sm) !important;
  color: var(--text-secondary) !important;
}

.btn-ghost:hover {
  color: var(--text-primary) !important;
  background: var(--glass-bg-hover) !important;
}

/* ============================================================
   12. INPUTS
   ============================================================ */

.input-field {
  background: var(--surface-1) !important;
  border: 1.5px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  font-family: var(--font-body) !important;
  color: var(--text-primary) !important;
  transition: all var(--t-base) !important;
}

.input-field::placeholder { color: var(--text-tertiary) !important; }

.input-field:focus {
  border-color: var(--border-focus) !important;
  box-shadow: 0 0 0 3px rgba(0,200,83,0.1), 0 2px 8px rgba(0,0,0,0.3) !important;
  outline: none !important;
}

.input-field:hover:not(:focus) {
  border-color: var(--border-medium) !important;
}

/* ============================================================
   13. CARD COMPONENT (generic)
   ============================================================ */

.card {
  background: var(--surface-1) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  transition: all var(--t-base) !important;
  overflow: hidden !important;
}

.card:hover {
  border-color: var(--border-medium) !important;
  box-shadow: var(--shadow-hover) !important;
  transform: translateY(-2px) !important;
}

/* ============================================================
   14. OVERLAY / MODAL
   ============================================================ */

.overlay-backdrop {
  background: rgba(0,0,0,0.86) !important;
  backdrop-filter: blur(14px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(140%) !important;
  animation: fadeIn 0.28s var(--ease-out) !important;
}

/* Auth / info modal card */
div[style*="maxWidth:400"][style*="borderRadius:16"],
div[style*="max-width: 400"][style*="border-radius: 16"] {
  background: var(--surface-2) !important;
  border: 1px solid var(--border-medium) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-modal) !important;
  overflow: hidden !important;
}

/* ============================================================
   15. DETAIL MODAL / INFO PANEL (he component)
   ============================================================ */

/* Backdrop gradient in detail panel */
div[style*="width:272"] div[style*="aspectRatio:\"16/9\""],
div[style*="width:272"] div[style*='aspectRatio:"16/9"'] {
  border-radius: 0 !important;
  overflow: hidden !important;
}

/* Season/episode picker row */
div[style*="borderBottom:\"1px solid rgba(255,255,255,0.07)\""],
div[style*='borderBottom:"1px solid rgba(255,255,255,0.07)"'] {
  border-bottom-color: var(--border) !important;
}

div[style*="borderTop:\"1px solid rgba(255,255,255,0.07)\""],
div[style*='borderTop:"1px solid rgba(255,255,255,0.07)"'] {
  border-top-color: var(--border) !important;
}

/* ============================================================
   16. AUTH MODAL (Login / Register)
   ============================================================ */

div[style*="zIndex:600"][style*="backdropFilter:\"blur(8px)\""],
div[style*='zIndex:600'][style*='backdropFilter:"blur(8px)"'] {
  background: rgba(0,0,0,0.84) !important;
  backdrop-filter: blur(18px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
}

/* Auth title */
div[style*="fontSize:22"][style*="fontWeight:900"] {
  font-family: var(--font-display) !important;
  letter-spacing: -0.03em !important;
}

/* Auth logo mark */
div[style*="borderRadius:6"][style*='background:"var(--green)"'][style*="width:26"],
div[style*="borderRadius:6"][style*="background:\"var(--green)\""][style*="width:26"] {
  background: linear-gradient(135deg, var(--green), var(--green-bright)) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--green-glow-sm) !important;
}

/* Auth error message box */
div[style*="borderRadius:8"][style*="background:\"rgba(239,68,68"] {
  background: rgba(220,38,38,0.12) !important;
  border: 1px solid rgba(220,38,38,0.28) !important;
  border-radius: var(--radius-md) !important;
}

/* ============================================================
   17. TYPOGRAPHY — Display & Body
   ============================================================ */

.text-display {
  font-family: var(--font-display) !important;
  font-weight: 900 !important;
  letter-spacing: -0.04em !important;
  line-height: 1.0 !important;
}

.text-h1 {
  font-family: var(--font-display) !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.1 !important;
}

.text-h2 {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
}

.text-h3 {
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
}

.text-label {
  font-family: var(--font-body) !important;
  font-weight: 800 !important;
  letter-spacing: 0.09em !important;
  font-size: 10.5px !important;
}

.text-body {
  color: var(--text-secondary) !important;
  line-height: 1.65 !important;
}

.text-caption {
  color: var(--text-tertiary) !important;
  font-size: 11px !important;
  letter-spacing: 0.015em !important;
}

.gradient-green {
  background: linear-gradient(135deg, var(--green-bright) 0%, var(--green) 55%, #00BFA5 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* ============================================================
   18. PROGRESS BARS (Continue Watching)
   ============================================================ */

div[style*="height:3"][style*="borderRadius"] > div[style*="var(--green)"],
div[style*="height:2"][style*="borderRadius"] > div[style*="var(--green)"] {
  background: linear-gradient(90deg, var(--green), var(--green-bright)) !important;
  box-shadow: 0 0 6px rgba(0,200,83,0.45) !important;
}

/* Progress text (S1·E3) */
span[style*="var(--green)"][style*="fontWeight:600"] {
  color: var(--green-bright) !important;
}

/* ============================================================
   19. STAR RATINGS
   ============================================================ */

svg[style*='color:"var(--green)"'][style*='fill:"var(--green)"'],
svg[style*="color:\"var(--green)\""][style*="fill:\"var(--green)\""] {
  filter: drop-shadow(0 0 3px rgba(0,200,83,0.5)) !important;
}

/* ============================================================
   20. BOTTOM NAV (Mobile)
   ============================================================ */

div[style*="bottom-nav-mobile"],
div[style*="justifyContent:\"space-around\""][style*="bottom:0"],
div[style*='justifyContent:"space-around"'][style*="bottom:0"] {
  background: rgba(6,6,6,0.96) !important;
  backdrop-filter: blur(28px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
  border-top: 1px solid var(--border) !important;
}

/* Active bottom-nav icon glow */
div[style*='justifyContent:"space-around"'] a svg[style*='"var(--green)"'],
div[style*="justifyContent:\"space-around\""] a svg[style*="\"var(--green)\""] {
  filter: drop-shadow(0 0 5px rgba(0,200,83,0.4)) !important;
}

/* Bottom nav link text */
div[style*='justifyContent:"space-around"'] a span[style*="fontSize:9"],
div[style*="justifyContent:\"space-around\""] a span[style*="fontSize:9"] {
  font-family: var(--font-body) !important;
  letter-spacing: 0.055em !important;
  font-weight: 700 !important;
}

/* ============================================================
   21. LIVE DOT
   ============================================================ */

.live-dot {
  background: var(--green-bright) !important;
  box-shadow: 0 0 8px rgba(0,200,83,0.65) !important;
  animation: liveWave 1.7s ease-in-out infinite !important;
}

/* ============================================================
   22. PAGINATION
   ============================================================ */

button[style*="borderRadius:8"][style*="background:\"var(--surface-2)\""],
button[style*='borderRadius:8'][style*='background:"var(--surface-2)"'] {
  background: var(--surface-2) !important;
  border: 1px solid var(--border-medium) !important;
  border-radius: var(--radius-md) !important;
  font-family: var(--font-body) !important;
  font-weight: 700 !important;
  transition: all var(--t-fast) !important;
}

button[style*="borderRadius:8"][style*="background:\"var(--surface-2)\""]:hover:not(:disabled),
button[style*='borderRadius:8'][style*='background:"var(--surface-2)"']:hover:not(:disabled) {
  background: var(--surface-3) !important;
  border-color: var(--green-border) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4) !important;
}

/* ============================================================
   23. DISCOVER PAGES (Movies / Shows)
   ============================================================ */

/* Discover grid cards */
div[style*='aspectRatio:"2/3"'][style*='borderRadius:6'],
div[style*="aspectRatio:\"2/3\""][style*="borderRadius:6"] {
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-card) !important;
  overflow: hidden !important;
}

/* Filter sort button row */
button[style*="borderRadius:\"var(--radius-full)\""],
button[style*='borderRadius:"var(--radius-full)"'] {
  border-radius: var(--radius-full) !important;
  transition: all var(--t-fast) !important;
  font-family: var(--font-body) !important;
}

/* ============================================================
   24. PROFILE PAGE
   ============================================================ */

/* Avatar circle */
div[style*='borderRadius:"50%"'][style*='background:"var(--green)"'],
div[style*="borderRadius:\"50%\""][style*="background:\"var(--green)\""] {
  background: linear-gradient(135deg, var(--green), var(--green-bright)) !important;
  box-shadow: var(--green-glow) !important;
}

/* ============================================================
   25. PAGE NOT FOUND
   ============================================================ */

div h1[style*="text-h1"],
.text-h1 {
  font-family: var(--font-display) !important;
}

/* ============================================================
   26. SEARCH RESULTS
   ============================================================ */

/* Search field in search page */
div[style*='background:"rgba(255,255,255,0.08)"'],
div[style*="background:\"rgba(255,255,255,0.08)\""] {
  background: rgba(255,255,255,0.05) !important;
  border: 1.5px solid var(--border-medium) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

/* ============================================================
   27. ANIMATIONS — App-level
   ============================================================ */

.animate-fade-up { animation: fadeUp var(--t-slow) forwards !important; }
.animate-fade-in { animation: fadeIn var(--t-base) forwards !important; }

#root { animation: fadeIn 0.35s var(--ease-out) !important; }

/* ============================================================
   28. RESPONSIVE SYSTEM
   ============================================================ */

@media (max-width: 768px) {
  :root {
    --nav-h: 58px;
  }

  .hero-desktop {
    height: clamp(320px, 58vw, 520px) !important;
  }

  .carousel-row h2 {
    font-size: 15px !important;
  }

  .carousel-row > div[style*="justifyContent"] {
    margin-bottom: 12px !important;
  }
}

@media (max-width: 480px) {
  .hero-mobile h1 {
    font-size: 21px !important;
  }
}

@media (min-width: 1440px) {
  .carousel-row h2 {
    font-size: 19px !important;
  }
}

@media (min-width: 1800px) {
  :root { --nav-h: 72px; }
  .hero-desktop {
    height: clamp(640px, 52vw, 880px) !important;
  }
  .carousel-row h2 {
    font-size: 21px !important;
  }
}

/* ============================================================
   29. REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   30. PERFORMANCE HINTS
   ============================================================ */

.hero-desktop img,
.hero-desktop,
div[style*='aspectRatio:"2/3"'] img,
div[style*="aspectRatio:\"2/3\""] img {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* ============================================================
   31. DETAIL PANEL FULL-SCREEN (he component - larger overlay)
   ============================================================ */

/* Large detail overlay (scrollable panel) */
div[style*="zIndex:200"][style*="overflow"],
div[style*="zIndex:300"][style*="overflow"] {
  background: rgba(0,0,0,0.9) !important;
}

/* Detail backdrop header area */
div[style*="aspectRatio:\"16/9\""][style*="overflow:\"hidden\""][style*="background:\"#111\""],
div[style*='aspectRatio:"16/9"'][style*='overflow:"hidden"'][style*='background:"#111"'] {
  border-radius: 0 !important;
}

/* Cast pills */
div[style*="background:\"var(--surface-2)\""][style*="borderRadius:8"],
div[style*='background:"var(--surface-2)"'][style*="borderRadius:8"] {
  background: var(--surface-3) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  transition: all var(--t-fast) !important;
}

/* ============================================================
   32. PLAYER PAGE
   ============================================================ */

body.player-mode {
  background: #000 !important;
}

/* Player top/bottom overlays */
div[style*="background:\"linear-gradient(to bottom, rgba(0,0,0,0.7)"],
div[style*='background:"linear-gradient(to bottom, rgba(0,0,0,0.7)'] {
  background: linear-gradient(to bottom, rgba(0,0,0,0.82) 0%, transparent 100%) !important;
}

div[style*="background:\"linear-gradient(to top, rgba(0,0,0,0.85)"],
div[style*='background:"linear-gradient(to top, rgba(0,0,0,0.85)'] {
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, transparent 100%) !important;
}

/* Player title */
div[style*="player"][style*="fontSize:16"][style*="fontWeight:700"],
div[style*="player"][style*="fontSize:18"] {
  font-family: var(--font-display) !important;
  letter-spacing: -0.02em !important;
}

/* Source/quality selector */
div[style*="background:\"var(--surface-1)\""][style*="borderRadius:10"],
div[style*='background:"var(--surface-1)"'][style*="borderRadius:10"] {
  background: var(--surface-2) !important;
  border: 1px solid var(--border-medium) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-modal) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

/* ============================================================
   33. FINAL POLISH — Micro-details
   ============================================================ */

/* Divider */
.divider {
  background: var(--border) !important;
}

/* Footer text */
div[style*="fontSize:10"][style*="rgba(255,255,255,0.18)"] {
  opacity: 0.65 !important;
}

/* Remove from list buttons / trash icons */
button[style*="color:\"rgba(255,255,255,0.3)\""],
button[style*='color:"rgba(255,255,255,0.3)"'] {
  opacity: 0.7 !important;
  transition: opacity var(--t-fast), color var(--t-fast) !important;
}

button[style*="color:\"rgba(255,255,255,0.3)\""]:hover,
button[style*='color:"rgba(255,255,255,0.3)"']:hover {
  opacity: 1 !important;
}

/* Genre filter pill active glow */
button[style*="var(--green-dim)"],
button[style*="var(--green)"][style*="borderRadius:"] {
  box-shadow: var(--green-glow-sm) !important;
}

/* Empty state icons */
div[style*="color:\"var(--text-tertiary)\""] svg,
div[style*='color:"var(--text-tertiary)"'] svg {
  opacity: 0.7 !important;
}

/* Smooth all interactive elements */
button, a, [role="button"] {
  transition: all var(--t-fast) !important;
}

/* Safe-area for notched devices */
.safe-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0px) !important;
}

