:root {
  --bg: #050505;
  --bg-elevated: #0e0e0e;
  --bg-panel: #141414;
  --line: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --muted: #a3a3a3;
  --muted-2: #6b6b6b;
  /* Razorpay's theme.color only accepts a HEX literal, so app.js reads these
     two back off :root — keep them as plain hex, not rgba()/var(). */
  --accent: #e50914;
  --accent-hover: #f6121d;
  --accent-soft: rgba(229, 9, 20, 0.18);
  --radius: 6px;
  --radius-pill: 999px;
  --font-display: 'Bebas Neue', Impact, sans-serif;
  --font-body: 'Outfit', sans-serif;
  --pad-x: clamp(1.25rem, 4vw, 3.5rem);
  --header-h: 7.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
}

body.home-page {
  background: #000;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ── Header ── */

.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: var(--header-h);
  padding: 0 var(--pad-x);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.35) 70%, transparent);
  transition: background 0.25s ease;
}

body.home-page .top.is-scrolled {
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
}

body:not(.home-page) .top {
  position: sticky;
  background: rgba(0, 0, 0, 0.95);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
  flex-shrink: 0;
}

.brand-logo {
  height: clamp(5rem, 7vw, 6.5rem);
  width: auto;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  margin-left: 0.5rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: #fff;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.search-panel {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: none;
  background: transparent;
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.search-wrap--header {
  width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition:
    width 0.28s ease,
    opacity 0.2s ease;
}

.search-panel.is-open .search-wrap--header {
  width: min(280px, 52vw);
  opacity: 1;
  pointer-events: auto;
}

.search-wrap input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.55);
  color: var(--text);
  border-radius: var(--radius-pill);
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-size: 0.88rem;
  outline: none;
}

.search-wrap input:focus {
  border-color: rgba(229, 9, 20, 0.55);
}

.search-wrap input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  height: 14px;
  width: 14px;
  margin-left: 0.35rem;
  background: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23a3a3a3'%3E%3Cpath d='M18.3 5.7 12 12l6.3 6.3-1.4 1.4L10.6 13.4 4.3 19.7 2.9 18.3 9.2 12 2.9 5.7 4.3 4.3 10.6 10.6 16.9 4.3z'/%3E%3C/svg%3E");
  cursor: pointer;
}

/* Search results */

.search-results {
  padding: calc(var(--header-h) + 1.5rem) var(--pad-x) 3rem;
  min-height: 70vh;
  animation: fade-up 0.4s ease both;
}

.search-results-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.search-results-head h1 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.clear-search-btn {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 0.5rem 1rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.clear-search-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
}

.search-results-grid {
  margin-top: 0.5rem;
}

.auth-slot {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Neutral header pills — "Download App" and "Log In" sit together at the right. */
.header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.header-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
}

@media (max-width: 420px) {
  .header-btn {
    padding: 0.45rem 0.8rem;
    font-size: 0.78rem;
  }
}

.user-menu {
  position: relative;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.25rem 0.5rem 0.25rem 0.25rem;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.user-chip:hover,
.user-menu.is-open .user-chip {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.user-caret {
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.user-menu.is-open .user-caret {
  transform: rotate(180deg);
}

.user-avatar-wrap {
  display: inline-flex;
  flex-shrink: 0;
}

.user-avatar,
.user-avatar-img {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: var(--avatar, var(--accent));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.user-avatar-img {
  object-fit: cover;
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  max-width: 9rem;
}

.user-meta strong {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-meta em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: capitalize;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 50;
  min-width: 13.5rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #14141a;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  animation: user-dropdown-in 0.16s ease both;
}

.user-dropdown[hidden] {
  display: none;
}

@keyframes user-dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-dropdown__head {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.35rem;
}

.user-dropdown__head strong {
  font-size: 0.82rem;
  font-weight: 600;
}

.user-dropdown__head span {
  color: var(--muted);
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

.user-dropdown__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
}

.user-dropdown__item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

/* ── App shell ── */

.app {
  position: relative;
  z-index: 1;
  min-height: 60vh;
}

body.home-page .app,
body.detail-page-body .app,
body.about-page-body .app {
  padding: 0;
  animation: none;
}

body:not(.home-page):not(.detail-page-body):not(.about-page-body) .app {
  padding: 0.5rem var(--pad-x) 3rem;
  animation: fade-up 0.55s ease both;
}

body.detail-page-body {
  background: #000;
}

body.detail-page-body .top {
  position: sticky;
  background: rgba(0, 0, 0, 0.95);
}

/* ── Home page ── */

.landing {
  display: flex;
  flex-direction: column;
}

/* Hero */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(420px, 44vw, 640px);
  padding: calc(var(--header-h) + 1.5rem) var(--pad-x) clamp(3rem, 6vw, 4.5rem);
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-slide-bg {
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero-slide-bg.is-active {
  opacity: 1;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: clamp(1rem, 3vw, 1.75rem);
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.hero-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.25s ease, width 0.25s ease;
}

.hero-dot:hover {
  background: rgba(255, 255, 255, 0.7);
}

.hero-dot.is-active {
  width: 22px;
  background: #fff;
}

.hero-copy.is-enter {
  animation: hero-copy-in 0.55s ease both;
}

@keyframes hero-copy-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: blur(14px) brightness(0.45) saturate(1.1);
  transform: scale(1.12);
}

.hero-poster {
  position: absolute;
  right: clamp(2rem, 6vw, 6rem);
  top: 50%;
  transform: translateY(-50%);
  height: 78%;
  max-height: 460px;
  max-width: 38vw;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  z-index: 0;
}

.hero-poster img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.hero-bg--empty {
  background:
    radial-gradient(ellipse at 70% 30%, #2a1218 0%, transparent 50%),
    linear-gradient(135deg, #1a0a0c, #0a0a0a 55%, #121018);
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.82) 26%, rgba(0, 0, 0, 0.3) 48%, transparent 62%),
    linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.45) 100%);
}

.hero-copy {
  max-width: min(760px, 58%);
  animation: fade-up 0.8s ease both;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  margin: 0 0 0.85rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 3px;
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 8vw, 5.6rem);
  letter-spacing: 0.04em;
  font-weight: 400;
  line-height: 0.92;
  text-transform: uppercase;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.65);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  margin: 1rem 0 0.85rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
  font-weight: 500;
}

.hero-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.rating-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #ffd166;
}

.rating-chip svg {
  flex-shrink: 0;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
}

.tag {
  display: inline-flex;
  padding: 0.28rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.35);
}

.hero-synopsis {
  margin: 0 0 1.5rem;
  max-width: 64ch;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.98rem;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.45rem;
  border-radius: var(--radius);
  border: none;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    filter 0.2s ease;
}

.btn svg {
  flex-shrink: 0;
}

.btn--play {
  background: var(--accent);
  color: #fff;
  min-width: 9.5rem;
}

.btn--play:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn--later {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
}

.btn--later:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* Sections */

.rail-section,
.browse-section,
.promo-section {
  padding: 1.75rem var(--pad-x) 0.5rem;
}

/* Offset scroll targets so the section title isn't hidden behind the fixed header */
.hero,
.rail-section,
.browse-section,
.promo-section {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-heading svg {
  color: var(--accent);
  flex-shrink: 0;
}

.see-all {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}

.see-all:hover {
  text-decoration: underline;
}

/* Carousels */

.rail-wrap {
  position: relative;
}

.rail {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 1.25rem 0;
}

.rail::-webkit-scrollbar {
  display: none;
}

.rail-btn {
  position: absolute;
  top: 35%;
  z-index: 2;
  width: 2.4rem;
  height: 2.4rem;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.rail-wrap:hover .rail-btn {
  opacity: 1;
}

.rail-btn:hover {
  background: var(--accent);
}

.rail-btn--prev {
  left: -0.4rem;
}

.rail-btn--next {
  right: -0.4rem;
}

.tile {
  position: relative;
  flex: 0 0 auto;
  width: clamp(128px, 14vw, 168px);
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1;
}

.tile:hover,
.tile:focus-visible {
  transform: scale(1.09);
  z-index: 5;
}

.tile-media {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 8px;
  background: #161616;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  transition: box-shadow 0.35s ease, outline-color 0.35s ease;
  outline: 0 solid transparent;
}

.tile:hover .tile-media,
.tile:focus-visible .tile-media {
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.65);
  outline: 2px solid rgba(229, 9, 20, 0.9);
  outline-offset: -2px;
}

.tile-media img,
.tile-empty {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.tile:hover .tile-media img,
.tile:focus-visible .tile-media img {
  transform: scale(1.1);
}

.tile-empty {
  background: linear-gradient(160deg, #242028, #101010);
}

.tile-badge {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  z-index: 1;
  padding: 0.18rem 0.45rem;
  border-radius: 3px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}

.tile-badge--new {
  background: var(--accent);
}

.tile-diamond {
  position: absolute;
  top: 0.5rem;
  right: 0.55rem;
  z-index: 1;
  color: #f4c430;
  font-size: 1.1rem;
  line-height: 1;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.65));
}

.tile-views {
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
}

.tile-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile-tags {
  display: flex;
  gap: 0.35rem;
  overflow: hidden;
}

.tile-tag {
  flex: 0 1 auto;
  min-width: 0;
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted-2);
  font-size: 0.68rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Poster hover preview card */

.hover-card {
  position: fixed;
  z-index: 200;
  border-radius: 12px;
  overflow: hidden;
  background: #141414;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: scale(0.9);
  transform-origin: center;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
  pointer-events: auto;
}

.hover-card.is-visible {
  opacity: 1;
  transform: scale(1);
}

.hover-card__media {
  position: relative;
  aspect-ratio: 2 / 3;
  background: #161616;
}

.hover-card__media img,
.hover-card__empty {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hover-card__empty {
  background: linear-gradient(160deg, #242028, #101010);
}

.hover-card__diamond {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  color: #f4c430;
  font-size: 1.1rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

.hover-card__body {
  padding: 0.9rem 1rem 1.1rem;
}

.hover-card__title {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}

.hover-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.hover-card__tag {
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.72rem;
  font-weight: 500;
  color: #e6e6e6;
  white-space: nowrap;
}

.hover-card__desc {
  margin: 0 0 0.9rem;
  color: var(--muted, #b3b3b3);
  font-size: 0.82rem;
  line-height: 1.45;
}

.hover-card__play {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  background: var(--accent, #e50914);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hover-card__play:hover {
  background: #f6121d;
  transform: translateY(-1px);
}

.hover-card__playicon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

/* Browse grid */

.browse-section {
  padding-top: 2.25rem;
  padding-bottom: 2rem;
}

.browse-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.25rem;
}

.browse-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.filter-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.2rem 0;
  position: relative;
}

.filter-btn:hover {
  color: #fff;
}

.filter-btn.is-active {
  color: var(--accent);
  font-weight: 600;
}

.filter-btn.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.35rem;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.browse-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 2.25rem 1.75rem;
}

.browse-grid .tile {
  width: auto;
}

.browse-more {
  margin-top: 2rem;
}

.browse-more:empty {
  margin-top: 0;
}

.discover-more {
  width: 100%;
  padding: 1rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: #1c1c1c;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.discover-more:hover {
  background: #262626;
  border-color: rgba(255, 255, 255, 0.16);
}

/* Stats */

.stats-bar {
  margin: 1.5rem var(--pad-x) 0;
  padding: 1.75rem clamp(1rem, 3vw, 2.5rem);
  border-radius: 12px;
  background: linear-gradient(90deg, #1a0508 0%, #3a0a10 45%, #1a0508 100%);
  border: 1px solid rgba(229, 9, 20, 0.25);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}

.stat strong {
  display: block;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat span {
  display: block;
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
  font-weight: 500;
}

/* Promo */

.promo-section {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

.promo-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.promo-copy h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.promo-copy h2 em {
  font-style: normal;
  color: var(--accent);
}

.promo-copy > p {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
  max-width: 42ch;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
  margin-bottom: 1.75rem;
}

.feature {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.feature-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.feature strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.15rem;
}

.feature span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  text-decoration: none;
  min-width: 10.5rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.store-btn:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: #181818;
}

.store-btn small {
  display: block;
  font-size: 0.65rem;
  color: var(--muted);
  line-height: 1.1;
}

.store-btn strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.15;
}

.promo-phones {
  position: relative;
  min-height: 380px;
  display: grid;
  place-items: center;
}

.phone {
  position: absolute;
  width: min(180px, 38%);
  aspect-ratio: 9 / 19;
  border-radius: 22px;
  border: 3px solid #2a2a2a;
  background: #0a0a0a;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.phone img,
.phone-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.phone-fallback {
  background:
    linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.85)),
    linear-gradient(135deg, #2a1520, #0e0e12);
}

.phone--back {
  left: 8%;
  top: 8%;
  transform: rotate(-8deg);
  opacity: 0.85;
  animation: phone-float 5s ease-in-out infinite;
}

.phone--mid {
  right: 10%;
  top: 0;
  transform: rotate(6deg);
  opacity: 0.9;
  animation: phone-float 5.5s ease-in-out 0.4s infinite;
}

.phone--front {
  width: min(200px, 42%);
  left: 50%;
  top: 12%;
  transform: translateX(-50%);
  z-index: 2;
  border-color: #3a3a3a;
  animation: phone-float 4.8s ease-in-out 0.2s infinite;
}

.phone-notch {
  position: absolute;
  top: 0.45rem;
  left: 50%;
  transform: translateX(-50%);
  width: 38%;
  height: 0.55rem;
  border-radius: 999px;
  background: #111;
  z-index: 2;
}

/* Footer */

.site-footer {
  margin-top: 1rem;
  padding: 3.5rem var(--pad-x) 2.5rem;
  background: #1c1c1c;
  border-top: 1px solid var(--line);
}

.footer-logo-row {
  margin-bottom: 1rem;
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem 2.5rem;
  padding-bottom: 0;
}

.footer-logo {
  display: inline-block;
  margin: 0;
}

.footer-logo img {
  height: 4.5rem;
  width: auto;
  display: block;
}

.footer-about {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 40ch;
}

.footer-copy {
  margin: 0;
  color: var(--muted-2);
  font-size: 0.8rem;
}

.footer-col h3 {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  font-weight: 700;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
}

.footer-genres {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-genres a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
}

.footer-genres a:hover {
  color: #fff;
}

.footer-bottom-bar {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted-2);
  font-size: 0.85rem;
}

.footer-col a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: #fff;
}

.footer-stores {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-stores .store-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  width: 100%;
  max-width: 11rem;
  min-height: 3.5rem;
  justify-content: flex-start;
  background: #111;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-stores .store-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.footer-stores .store-btn span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.footer-stores .store-btn strong {
  white-space: nowrap;
}

.footer-stores .store-btn:hover {
  background: #1c1c1c;
  border-color: rgba(255, 255, 255, 0.28);
}

.footer-stores .store-btn small {
  color: var(--muted);
}

/* ── About page ── */

.about-page {
  padding: 1.5rem var(--pad-x) 3rem;
}

.about-inner {
  max-width: 60rem;
  margin: 0 auto;
}

.about-heading {
  margin: 0 0 0.5rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
}

.about-tagline {
  margin: 0 0 2rem;
  color: var(--accent);
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  font-weight: 600;
}

.about-text {
  margin: 0 0 1.35rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 52rem;
}

.about-subheading {
  margin: 2.25rem 0 0.85rem;
  font-size: clamp(1.2rem, 2.6vw, 1.5rem);
  font-weight: 700;
}

.about-list {
  margin: 0 0 1.35rem;
  padding-left: 1.25rem;
  max-width: 52rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.about-list li {
  margin-bottom: 0.6rem;
}

.about-list strong {
  color: #fff;
  font-weight: 600;
}

.about-link {
  color: var(--accent);
  text-decoration: none;
}

.about-link:hover {
  text-decoration: underline;
}

/* Contact form */

.contact-form {
  max-width: 44rem;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #141414;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}

.contact-field textarea {
  resize: vertical;
  min-height: 7rem;
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-phone {
  display: flex;
  align-items: stretch;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #141414;
  overflow: hidden;
}

.contact-phone:focus-within {
  border-color: var(--accent);
}

.contact-phone__code {
  display: grid;
  place-items: center;
  padding: 0 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-phone input {
  border: none;
  border-radius: 0;
  background: transparent;
}

.contact-submit {
  align-self: flex-start;
  margin-top: 0.5rem;
  padding: 0.85rem 2rem;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.contact-submit:hover {
  background: var(--accent-hover);
}

.contact-status {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}

.contact-status.is-success {
  color: #4ade80;
}

.contact-status.is-error {
  color: #ff6b6b;
}

@media (max-width: 620px) {
  .contact-row {
    grid-template-columns: 1fr;
  }
}

.about-cta {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.about-join {
  margin: 0 0 0.4rem;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  color: #fff;
}

.about-join-sub {
  margin: 0;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 600;
  color: var(--muted);
}

/* ── Sign-in / detail / watch (preserved) ── */

.signin {
  min-height: calc(100vh - 7rem);
  display: grid;
  place-items: center;
  padding: 1rem 0 2rem;
}

.signin-panel {
  width: min(420px, 100%);
  padding: clamp(1.75rem, 4vw, 2.4rem);
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 40%),
    rgba(8, 10, 14, 0.72);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  animation: fade-up 0.55s ease both;
}

.signin-brand {
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-size: 2.6rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  line-height: 1;
}

.signin-panel h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.5rem);
  letter-spacing: 0.05em;
  font-weight: 400;
  line-height: 1;
}

.signin-sub {
  margin: 0.7rem 0 1.4rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.oauth-stack {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.oauth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: 100%;
  border: none;
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.oauth-btn:hover:not(.is-disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.oauth-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.oauth-icon {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
}

.oauth-btn--google {
  background: #fff;
  color: #1f1f1f;
}

.oauth-btn--facebook {
  background: #1877f2;
  color: #fff;
}

.signin-note {
  margin: 1rem 0 0;
  color: #ff8f8f;
  font-size: 0.85rem;
}

.signin-back {
  margin: 1.35rem 0 0;
}

body.on-signin .top {
  justify-content: space-between;
}

body.on-signin .nav,
body.on-signin .search-panel {
  display: none;
}

.back-link {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.back-link:hover {
  color: var(--text);
}

/* ── Detail page ── */

.detail-page {
  padding: 1.5rem var(--pad-x) 3.5rem;
  min-height: calc(100vh - var(--header-h));
  animation: fade-up 0.45s ease both;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 540px);
  gap: clamp(1.5rem, 4vw, 2.75rem);
  align-items: start;
}

.detail-main {
  display: flex;
  align-items: flex-start;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  min-width: 0;
}

.detail-about {
  flex: 1 1 0;
  min-width: 0;
}

.detail-side {
  min-width: 0;
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  width: 100%;
}

.detail-media {
  display: flex;
  align-items: flex-start;
  flex: 0 0 auto;
  width: clamp(300px, 46%, 460px);
}

.detail-poster-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: #141414;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.detail-layout.is-playing .detail-poster-frame {
  background: #000;
}

.detail-poster-layer,
.detail-player-layer {
  position: absolute;
  inset: 0;
}

.detail-poster-layer[hidden],
.detail-player-layer[hidden] {
  display: none;
}

.detail-poster-frame img,
.detail-poster-empty {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-poster-empty {
  background: linear-gradient(160deg, #2a1520, #101010);
}

.poster-play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: none;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.detail-poster-frame:hover .poster-play-overlay,
.poster-play-overlay:focus-visible {
  opacity: 1;
}

.poster-play-overlay svg {
  width: 4rem;
  height: 4rem;
  padding: 0.85rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

#detail-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
}

.detail-player-veil {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  color: var(--muted);
  pointer-events: none;
  z-index: 1;
}

.detail-player-veil[hidden],
.detail-player-veil.is-hidden {
  opacity: 0;
}

.poster-chip {
  position: absolute;
  z-index: 1;
  padding: 0.22rem 0.55rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.poster-chip--series {
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.poster-chip--prime {
  top: 0.75rem;
  left: 0.75rem;
  background: linear-gradient(135deg, #c9a227, #8a6d1a);
  color: #1a1408;
}

.detail-poster-nav {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.poster-nav-btn {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(20, 20, 20, 0.9);
  color: #fff;
  display: grid;
  place-items: center;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.poster-nav-btn:hover:not(.is-disabled) {
  background: var(--accent);
  border-color: var(--accent);
}

.poster-nav-btn.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.detail-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
  color: var(--muted-2);
  font-size: 0.82rem;
}

.detail-crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.detail-crumbs a:hover {
  color: #fff;
}

.detail-title {
  margin: 0 0 1.1rem;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: #fff;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  margin-bottom: 1rem;
}

.detail-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.2rem 0;
}

.detail-action:hover,
.detail-action.is-on {
  color: var(--accent);
}

.detail-synopsis {
  margin: 0 0 1.25rem;
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  line-height: 1.6;
}

.see-more {
  border: none;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: inherit;
  cursor: pointer;
  padding: 0;
}

.see-more:hover {
  text-decoration: underline;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.detail-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.8rem;
  font-weight: 500;
}

.detail-play-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.detail-play.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.detail-ready {
  color: var(--muted);
  font-size: 0.85rem;
}

.detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.15rem;
}

.detail-tab {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.55rem 0;
  position: relative;
}

.detail-tab:hover {
  color: #fff;
}

.detail-tab.is-active {
  color: #fff;
  font-weight: 600;
}

.detail-tab.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
}

.ep-range {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
}

.ep-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.5rem;
  max-height: min(62vh, 620px);
  overflow-y: auto;
  padding-right: 0.4rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.ep-grid::-webkit-scrollbar {
  width: 8px;
}

.ep-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.ep-card--trailer {
  font-size: 0.68rem;
  letter-spacing: 0.01em;
}

.ep-card {
  position: relative;
  aspect-ratio: 1;
  border: none;
  border-radius: 6px;
  background: #262626;
  color: rgba(255, 255, 255, 0.75);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: grid;
  place-items: center;
  overflow: hidden;
  transition:
    background 0.2s ease,
    transform 0.15s ease,
    color 0.2s ease;
}

.ep-card:hover:not(.is-active) {
  background: #383838;
  color: #fff;
  transform: translateY(-1px);
}

.ep-card.is-active {
  background: var(--accent);
  color: #fff;
}

.ep-card.is-locked:not(.is-active) {
  color: rgba(255, 255, 255, 0.6);
}

.ep-lock {
  position: absolute;
  top: 0;
  right: 0;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 0 6px 0 7px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
}

.ep-lock svg {
  width: 10px;
  height: 10px;
}

.ep-playing {
  display: grid;
  place-items: center;
}

.ep-playing svg {
  width: 16px;
  height: 16px;
}

.cast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.cast-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.cast-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #3a3a3a, #1a1a1a);
  margin-bottom: 0.35rem;
}

.cast-card strong {
  font-size: 0.9rem;
}

.cast-card em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.78rem;
}

.similar-grid {
  padding-bottom: 1rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.cta:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.watch-stage {
  position: relative;
  background: #000;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  aspect-ratio: 16 / 9;
}

#player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
}

.stage-veil {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(10, 12, 16, 0.2), rgba(10, 12, 16, 0.72));
  color: var(--muted);
  pointer-events: none;
}

.stage-veil[hidden],
.stage-veil.is-hidden {
  opacity: 0;
}

.watch-meta {
  margin-top: 1rem;
}

.watch-meta .label {
  display: block;
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.watch-meta h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: 0.04em;
  font-weight: 400;
}

.file-meta {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  word-break: break-all;
}

.empty {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 2rem var(--pad-x);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-ken {
  from {
    transform: scale(1.08);
  }
  to {
    transform: scale(1.04);
  }
}

@keyframes phone-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -10px;
  }
}

@media (max-width: 1100px) {
  .browse-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1020px) {
  .nav {
    display: none;
  }

  .hero {
    min-height: clamp(380px, 68vw, 560px);
  }

  .hero-scrim {
    background:
      linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.55) 55%, rgba(0, 0, 0, 0.35) 100%),
      linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.6) 100%);
  }

  .promo-grid {
    grid-template-columns: 1fr;
  }

  .promo-phones {
    min-height: 300px;
    margin-bottom: 0.5rem;
  }

  .promo-copy h2 {
    font-size: clamp(1.75rem, 7vw, 2.4rem);
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-layout.is-playing {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
    justify-self: stretch;
    max-width: 100%;
  }

  .detail-main {
    flex-direction: column;
    align-items: center;
  }

  .detail-media {
    width: 300px;
    max-width: 100%;
    margin: 0 auto;
  }

  .detail-about {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .ep-grid {
    max-height: none;
    overflow-y: visible;
  }
}

@media (max-width: 700px) {
  .browse-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .user-meta {
    display: none;
  }

  .detail-media {
    max-width: 240px;
  }

  .detail-poster-nav {
    display: none;
  }

  .footer-about {
    font-size: 0.82rem;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .rail-btn {
    display: none;
  }

  .header-btn {
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 4.75rem;
  }

  .top {
    gap: 0.55rem;
    padding: 0 0.85rem;
  }

  .brand {
    flex-shrink: 1;
    min-width: 0;
  }

  .brand-logo {
    height: 2.9rem;
    max-width: 100%;
  }

  .header-actions {
    gap: 0.4rem;
    flex-shrink: 0;
  }

  .header-btn {
    flex-shrink: 0;
    padding: 0.42rem 0.75rem;
    font-size: 0.78rem;
  }

  /* Two pills plus the logo won't fit on a phone; the bottom nav covers sign-in. */
  .header-btn[data-download-open] {
    display: none;
  }
}

@media (max-width: 480px) {
  .browse-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .ep-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Premium / billing */
.premium-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(229, 9, 20, 0.15);
  border: 1px solid rgba(229, 9, 20, 0.45);
  color: #ff6b6b;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  margin-right: 0.5rem;
}

.premium-badge--active {
  background: rgba(46, 204, 113, 0.12);
  border-color: rgba(46, 204, 113, 0.45);
  color: #7dffb0;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom));
  background: rgba(8, 8, 10, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 500;
}

.bottom-nav__item.is-active {
  color: #fff;
}

.bottom-nav__item--premium .bottom-nav__diamond {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #e50914, #b20710);
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 8px 24px rgba(229, 9, 20, 0.35);
}

.premium-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.25rem 6rem;
}

.premium-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.premium-diamond {
  display: inline-flex;
  width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: linear-gradient(135deg, #e50914, #b20710);
  color: #fff;
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.premium-hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 6vw, 3rem);
  letter-spacing: 0.04em;
  margin: 0 0 0.5rem;
}

.premium-status {
  color: rgba(255, 255, 255, 0.72);
}

.premium-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.premium-features span {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.plan-card {
  padding: 1.25rem;
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.plan-card--featured {
  border-color: rgba(229, 9, 20, 0.55);
  box-shadow: 0 0 0 1px rgba(229, 9, 20, 0.2);
}

.plan-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.plan-price {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.plan-price span {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
}

.plan-desc {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.88rem;
  min-height: 2.5rem;
}

.plan-trial {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: #7dffb0;
  font-size: 0.82rem;
  font-weight: 600;
}

.plan-btn {
  width: 100%;
}

.premium-note {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.82rem;
}

.premium-page--success {
  text-align: center;
  padding-top: 4rem;
}

.paywall-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  text-align: center;
}

.paywall-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
}

body.on-premium .search-panel,
body.on-premium .nav {
  opacity: 0.85;
}

@media (max-width: 900px) {
  .bottom-nav {
    display: grid;
  }

  .app {
    padding-bottom: 5rem;
  }

  .header-actions {
    gap: 0.35rem;
  }

  .premium-badge {
    display: none;
  }

  .hero-poster {
    display: none;
  }

  /* No poster to clear at this width — let the copy use the full column. */
  .hero-copy {
    max-width: 100%;
  }

  .hero-backdrop {
    filter: brightness(0.55) saturate(1.05);
    transform: none;
  }
}

/* ── Header "Start Free Trial" pill (centered on desktop) ── */

.header-trial {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.25rem;
  border: none;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #21b24c 0%, #109c3d 55%, #0c7f31 100%);
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(16, 156, 61, 0.4);
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.header-trial:hover {
  transform: translate(-50%, -50%) translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 10px 26px rgba(16, 156, 61, 0.55);
}

.header-trial__diamond {
  font-size: 0.8rem;
  color: #b9ffcf;
  text-shadow: 0 0 8px rgba(185, 255, 207, 0.7);
}

body.on-signin .header-trial,
body.on-premium .header-trial {
  display: none;
}

@media (max-width: 1180px) {
  .header-trial {
    font-size: 0.82rem;
    padding: 0.5rem 1rem;
  }
}

/* A pill centred on the viewport lands on top of the logo once the header gets
   narrow, so below this width it stops being centred and joins the header flow,
   sitting just left of the search/account controls. */
@media (max-width: 760px) {
  .header-trial {
    position: static;
    transform: none;
    margin-left: auto;
    flex-shrink: 0;
    font-size: 0.78rem;
    padding: 0.45rem 0.9rem;
    box-shadow: 0 6px 16px rgba(16, 156, 61, 0.35);
  }

  /* The centring translate is gone, so the lift must be rebuilt without it. */
  .header-trial:hover {
    transform: translateY(-1px);
  }
}

/* On the narrowest phones the pill has to earn its space against the logo. */
@media (max-width: 420px) {
  .header-trial {
    gap: 0.3rem;
    padding: 0.4rem 0.7rem;
    font-size: 0.72rem;
  }

  .header-trial__diamond {
    display: none;
  }
}

/* ── Hero "Start Free Trial" pill ── */

.hero-trial {
  border-radius: var(--radius-pill);
  padding-right: 0.4rem;
  gap: 0.7rem;
  box-shadow: 0 10px 28px rgba(229, 9, 20, 0.4);
}

.hero-trial__play {
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  background: #fff;
  color: var(--accent);
}

.hero-trial__play svg {
  margin-left: 1px;
}

/* ── Play-gate popups (download app / login) ── */

.app-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.app-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.app-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.app-modal__card {
  position: relative;
  width: min(400px, 100%);
  max-height: calc(100dvh - 2.5rem);
  overflow-y: auto;
  padding: clamp(1.7rem, 4vw, 2.25rem) clamp(1.4rem, 4vw, 1.9rem);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #141414;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
  text-align: center;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.25, 1);
}

.app-modal.is-open .app-modal__card {
  transform: translateY(0) scale(1);
}

.app-modal__close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.app-modal__close:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.app-modal__brand {
  display: inline-block;
  margin-bottom: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.9rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  line-height: 1;
}

.app-modal__appicon {
  display: inline-grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 0.85rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #e50914, #b20710);
  color: #fff;
  box-shadow: 0 12px 30px rgba(229, 9, 20, 0.4);
}

.app-modal__logo {
  display: inline-block;
  margin-bottom: 0.85rem;
}

.app-modal__logo img {
  height: 3.5rem;
  width: auto;
  display: block;
}

.app-modal__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.25rem, 3.6vw, 1.5rem);
  font-weight: 700;
  color: #fff;
}

.app-modal__sub {
  margin: 0 auto 1.4rem;
  max-width: 30ch;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
  line-height: 1.5;
}

.app-modal__stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.app-modal__stores .store-btn {
  min-width: 0;
  flex: 1 1 45%;
  justify-content: center;
}

/* ── Start-trial popup ── */

/* ── Sign-in modal ── */

body.signin-modal-open {
  overflow: hidden;
}

.signin-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.26s ease, visibility 0.26s ease;
}

.signin-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.signin-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.signin-modal__card {
  position: relative;
  width: min(420px, 100%);
  padding: clamp(2rem, 5vw, 2.75rem) clamp(1.5rem, 5vw, 2.25rem);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0d0d0d;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
  text-align: center;
  transform: translateY(18px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.25, 1);
}

.signin-modal.is-open .signin-modal__card {
  transform: none;
}

.signin-modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.signin-modal__close:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.signin-modal__logo img {
  height: 3.25rem;
  width: auto;
  display: block;
  margin: 0 auto 1.25rem;
}

.signin-modal__title {
  margin: 0 0 0.4rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
}

.signin-modal__sub {
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.signin-modal__providers {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* ── Phone capture (shown before Razorpay checkout opens) ── */

.phone-modal {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.26s ease, visibility 0.26s ease;
}

.phone-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.phone-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.phone-modal__card {
  position: relative;
  width: min(420px, 100%);
  padding: clamp(2rem, 5vw, 2.75rem) clamp(1.5rem, 5vw, 2.25rem);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0d0d0d;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
  text-align: center;
  transform: translateY(18px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.25, 1);
}

.phone-modal.is-open .phone-modal__card {
  transform: none;
}

.phone-modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.phone-modal__close:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.phone-modal__logo img {
  height: 3.25rem;
  width: auto;
  display: block;
  margin: 0 auto 1.25rem;
}

.phone-modal__title {
  margin: 0 0 0.4rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
}

.phone-modal__sub {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.phone-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.3rem 0.3rem 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s ease;
}

.phone-field:focus-within {
  border-color: rgba(255, 255, 255, 0.3);
}

.phone-field__cc {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  padding: 0.65rem 0.9rem;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
  font-size: 0.85rem;
}

.phone-field__cc b {
  color: #fff;
  font-weight: 600;
}

.phone-field__input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  outline: none;
}

.phone-field__input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.phone-field__go {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.6rem;
  height: 2.6rem;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}

.phone-field__go:hover {
  background: var(--accent-hover);
}

.phone-modal__error {
  margin: 0.75rem 0 0;
  color: #ff6b6b;
  font-size: 0.82rem;
}

.phone-modal__error[hidden] {
  display: none;
}

body.phone-modal-open {
  overflow: hidden;
}

/* ── UPI app picker (mobile only; desktop uses standard checkout) ── */

/* Sits above the payment screen's z-index so a stray overlap can never leave a
   half-covered modal on screen — startCheckout drops it before showing one. */
.checkout-loader {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.checkout-loader.is-open {
  opacity: 1;
  visibility: visible;
}

.checkout-loader__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
}

.checkout-loader__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  width: min(320px, 100%);
  padding: 2rem 1.5rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--bg-panel, #141414);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
  text-align: center;
}

.checkout-loader__spinner {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent);
  animation: upi-spin 0.9s linear infinite;
}

.checkout-loader__title {
  margin: 0.5rem 0 0;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
}

.checkout-loader__note {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.upi-modal {
  position: fixed;
  inset: 0;
  z-index: 145;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.26s ease, visibility 0.26s ease;
}

.upi-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.upi-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.upi-modal__card {
  position: relative;
  width: min(390px, 100%);
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  padding: 1.25rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--bg-panel, #141414);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
  transform: translateY(18px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.25, 1);
}

.upi-modal.is-open .upi-modal__card {
  transform: none;
}

.upi-modal__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  /* Keeps the title clear of the close button in the corner. */
  padding-right: 2.25rem;
  margin-bottom: 1rem;
}

.upi-modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.upi-modal__close:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.upi-modal__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.upi-modal__sub {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.upi-amount {
  padding: 0.85rem 0.9rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.upi-amount__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.upi-amount__label {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
}

.upi-amount__value {
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 800;
}

/* The recurring terms must stay legible — never shrink this into the noise. */
.upi-amount__terms {
  margin: 0.4rem 0 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.74rem;
  line-height: 1.45;
}

.upi-pick-label {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.upi-tiles {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.upi-tile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.upi-tile:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
}

.upi-tile:active {
  transform: scale(0.985);
}

.upi-tile__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
}

.upi-tile__name {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 600;
}

.upi-tile__chev {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.35);
}

/* Desktop QR mode. The code itself must stay on a true-white plate at full
   contrast — tinting or dimming it costs scans. */
.upi-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.upi-qr__frame {
  padding: 0.7rem;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
}

.upi-qr__img {
  display: block;
  width: 196px;
  height: 196px;
  image-rendering: pixelated;
}

.upi-qr__hint {
  margin: 0;
  max-width: 17rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.upi-qr__apps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  opacity: 0.75;
}

.upi-qr__app {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
}

.upi-qr__app svg {
  width: 100%;
  height: 100%;
}

.upi-qr__wait {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.74rem;
}

.upi-qr__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  animation: upi-pulse 1.4s ease-in-out infinite;
}

@keyframes upi-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .upi-qr__dot {
    animation: none;
  }
}

.upi-modal__foot {
  margin: 1rem 0 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.68rem;
}

/* Stage machine: the picker and the waiting state swap in place. */
.upi-status {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 0.5rem 0.5rem;
  text-align: center;
}

.upi-modal[data-stage='verifying'] .upi-status,
.upi-modal[data-stage='failed'] .upi-status {
  display: flex;
}

.upi-modal[data-stage='verifying'] .upi-tiles,
.upi-modal[data-stage='verifying'] .upi-pick-label,
.upi-modal[data-stage='verifying'] .upi-qr,
.upi-modal[data-stage='failed'] .upi-tiles,
.upi-modal[data-stage='failed'] .upi-pick-label,
.upi-modal[data-stage='failed'] .upi-qr {
  display: none;
}

.upi-status__spinner {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent);
  animation: upi-spin 0.9s linear infinite;
}

.upi-modal[data-stage='failed'] .upi-status__spinner {
  display: none;
}

@keyframes upi-spin {
  to {
    transform: rotate(360deg);
  }
}

.upi-status__title {
  margin: 0.35rem 0 0;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
}

.upi-status__note {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.upi-status__cancel {
  margin-top: 0.6rem;
  padding: 0.55rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.upi-status__cancel:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

@media (prefers-reduced-motion: reduce) {
  .upi-status__spinner {
    animation-duration: 2.4s;
  }
}

.signin-provider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.9rem 1.25rem;
  border-radius: 999px;
  background: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.signin-provider:hover {
  background: #2a2a2a;
  border-color: rgba(255, 255, 255, 0.2);
}

.signin-provider__icon {
  display: inline-flex;
  align-items: center;
}

.signin-provider.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.signin-modal__error {
  margin: 1.1rem 0 0;
  color: #ff6b6b;
  font-size: 0.82rem;
  line-height: 1.45;
}

.signin-modal__terms {
  margin: 1.6rem 0 0;
  color: var(--muted-2);
  font-size: 0.78rem;
  line-height: 1.6;
}

.signin-modal__terms a {
  color: var(--muted);
  text-decoration: underline;
}

.signin-modal__terms a:hover {
  color: #fff;
}

body.trial-modal-open {
  overflow: hidden;
}

.trial-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.26s ease, visibility 0.26s ease;
}

.trial-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.trial-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.trial-modal__card {
  position: relative;
  width: min(430px, 100%);
  max-height: calc(100dvh - 2.5rem);
  overflow-y: auto;
  padding: clamp(1.7rem, 4vw, 2.25rem) clamp(1.4rem, 4vw, 2rem) clamp(1.4rem, 4vw, 1.75rem);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #141414;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
  text-align: center;
  transform: translateY(18px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.25, 1);
  scrollbar-width: thin;
}

.trial-modal.is-open .trial-modal__card {
  transform: translateY(0) scale(1);
}

.trial-modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.trial-modal__close:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.trial-modal__title {
  margin: 0.3rem 0 0.9rem;
  font-size: clamp(1.05rem, 3.6vw, 1.3rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
}

.trial-modal__strike {
  position: relative;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: line-through;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

.trial-modal__price {
  margin: 0 0 1.6rem;
  font-size: clamp(2.6rem, 11vw, 3.6rem);
  font-weight: 800;
  line-height: 1;
  color: #22c55e;
}

.trial-modal__rupee {
  font-size: 0.55em;
  font-weight: 700;
  vertical-align: 0.16em;
  margin-right: 0.04em;
}

.trial-modal__steps {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  text-align: left;
}

.trial-modal__step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.5rem 0;
}

.trial-modal__stepdot {
  position: relative;
  flex-shrink: 0;
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #2b2b2b;
  color: rgba(255, 255, 255, 0.85);
}

.trial-modal__step:not(:last-child) .trial-modal__stepdot::after {
  content: '';
  position: absolute;
  top: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 1.6rem;
  background: rgba(255, 255, 255, 0.14);
}

.trial-modal__steptext {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.3;
}

.trial-modal__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, #23c552 0%, #16a34a 100%);
  color: #fff;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(22, 163, 74, 0.45);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.trial-modal__cta:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.trial-modal__note {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

@media (prefers-reduced-motion: reduce) {
  .trial-modal__card {
    transition: none;
  }
}
