  :root {
    color-scheme: dark;
    --blue: #0a5cff;
    --blue-hi: #4d8bff;
    --navy: #0d1b3d;
    --night: #060c1d;
    --slate: #3e495a;
    --grey: #8a8f98;
    --white: #ffffff;
    --soft: #c9d2e3;
    --line: rgba(138,143,152,.22);
    --font: "Poppins", "Avenir Next", "Segoe UI", system-ui, sans-serif;
    --gutter: clamp(16px, 4.5vw, 64px);
    --wrap: 1180px;
    --gold: #f0bf55;
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0; background: var(--night); color: var(--white);
    font: 400 15.5px/1.65 var(--font); -webkit-font-smoothing: antialiased;
  }
  a { color: inherit; }
  button { font: inherit; color: inherit; }
  :focus-visible { outline: 2px solid var(--blue-hi); outline-offset: 3px; }
  .wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
  .label { font-size: 12px; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; color: var(--blue-hi); }

  /* Logo */
  .logo { display: inline-grid; justify-items: center; text-decoration: none; line-height: 1; }
  .logo .word { font-weight: 400; letter-spacing: .14em; white-space: nowrap; }
  .logo .word b {
    font-weight: 700; letter-spacing: .06em;
    background: linear-gradient(180deg, #3f86ff 0%, var(--blue) 60%, #0a45c8 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .logo .tag { color: var(--blue-hi); font-weight: 500; letter-spacing: .42em; text-transform: uppercase; margin-top: .9em; }
  .logo-sm .word { font-size: 18px; }
  .logo-sm .tag { display: none; }

  /* Header */
  .top {
    position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
    background: rgba(6,12,29,.78); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
  }
  .top .wrap { display: flex; align-items: center; gap: 28px; padding-block: 14px; }
  .account { display: flex; gap: 8px; }
  .nav { display: flex; gap: 24px; margin-left: auto; }
  .nav a { text-decoration: none; color: var(--soft); font-size: 14px; }
  .nav a:hover { color: var(--white); }
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    border: 0; border-radius: 6px; padding: 12px 22px; cursor: pointer;
    font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap;
    transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
  }
  .btn:hover { transform: translateY(-1px); }
  .btn-blue { background: var(--blue); color: #fff; box-shadow: 0 6px 24px rgba(10,92,255,.35); }
  .btn-blue:hover { background: #226cff; box-shadow: 0 8px 30px rgba(10,92,255,.5); }
  .btn-line { background: rgba(255,255,255,.04); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); }
  .btn-line:hover { background: rgba(255,255,255,.1); }
  .btn-sm { padding: 9px 16px; font-size: 14px; }

  .label.gold { color: var(--gold); }
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  /* Hero: the film's key art, full width */
  .hero { position: relative; background: var(--night); }
  .banner { position: relative; max-width: 1600px; margin: 0 auto; }
  .banner img { display: block; width: 100%; aspect-ratio: 16/9; max-width: 100%; object-fit: cover; }
  .banner::after {
    content: ""; position: absolute; inset: auto 0 0 0; height: 38%;
    background: linear-gradient(0deg, var(--night) 4%, rgba(6,12,29,0));
  }
  .banner::before {
    content: ""; position: absolute; inset: 0 auto 0 0; width: 8%; z-index: 1;
    background: linear-gradient(90deg, var(--night), rgba(6,12,29,0));
  }
  .hero-bar {
    position: relative; z-index: 2; margin-top: clamp(-120px, -7vw, -24px);
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 48px; align-items: end;
    padding-bottom: clamp(48px, 7vw, 88px);
  }
  .facts { display: flex; flex-wrap: wrap; gap: 6px 10px; color: var(--soft); font-size: 14px; font-variant-numeric: tabular-nums; margin-top: 14px; }
  .facts span { padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line); }
  .logline { margin: 16px 0 0; color: var(--soft); font-size: 17px; max-width: 56ch; }
  .actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
  .price-note { color: var(--grey); font-size: 13px; margin-top: 12px; text-align: right; }

  /* Horizon glow used in the closing band */
  .arc {
    position: absolute; left: 50%; transform: translateX(-50%);
    width: min(1100px, 140%); height: 260px; border-radius: 50%;
    border-top: 2px solid rgba(90,150,255,.85);
    box-shadow: 0 -10px 40px -6px rgba(10,92,255,.55);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
    pointer-events: none;
  }
  .arc::after {
    content: ""; position: absolute; left: 50%; top: -5px; transform: translateX(-50%);
    width: 140px; height: 8px; border-radius: 50%;
    background: radial-gradient(closest-side, #fff, rgba(120,170,255,.8) 40%, transparent);
    filter: blur(1px);
  }

  /* Poster in the About section */
  .poster {
    display: block; width: 100%; max-width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 10px;
    box-shadow: 0 30px 70px rgba(0,0,0,.55), 0 0 0 1px rgba(240,191,85,.25), 0 0 60px -14px rgba(240,191,85,.35);
  }

  /* Sections */
  section.block { padding-block: clamp(64px, 9vw, 112px); border-top: 1px solid var(--line); scroll-margin-top: 64px; }
  .head { display: grid; gap: 10px; margin-bottom: 36px; max-width: 720px; }
  .head h2 { margin: 0; font-weight: 600; font-size: clamp(28px, 3.6vw, 42px); line-height: 1.12; letter-spacing: -0.01em; text-wrap: balance; }
  .head p { margin: 0; color: var(--soft); }

  /* Trailer */
  .screen {
    position: relative; aspect-ratio: 16/9; max-width: 100%; border-radius: 10px; overflow: hidden;
    background: radial-gradient(80% 90% at 50% 100%, #10275e, #050a18 70%);
    box-shadow: 0 0 0 1px rgba(77,139,255,.22), 0 30px 80px rgba(0,0,0,.5);
  }
  .screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
  .screen .arc { bottom: -210px; top: auto; width: 90%; }
  .screen .still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .play {
    position: absolute; inset: 0; margin: auto; width: 86px; height: 86px; border-radius: 50%;
    border: 0; cursor: pointer; background: var(--blue); display: grid; place-items: center;
    box-shadow: 0 0 0 10px rgba(10,92,255,.18), 0 0 50px rgba(10,92,255,.6);
    transition: transform .15s ease;
  }
  .play:hover { transform: scale(1.05); }
  .screen .cap { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-size: 13px; color: var(--soft); letter-spacing: .08em; }

  /* Watch options */
  .offers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .offer {
    display: grid; gap: 18px; align-content: start; padding: clamp(24px, 3vw, 36px); border-radius: 10px;
    background: linear-gradient(180deg, rgba(13,27,61,.9), rgba(8,15,34,.9));
    box-shadow: inset 0 0 0 1px var(--line);
  }
  .offer.best { box-shadow: inset 0 0 0 1.5px var(--blue), 0 0 50px -12px rgba(10,92,255,.55); }
  .offer-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .offer h3 { margin: 0; font-size: 20px; font-weight: 600; }
  .pill { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #fff; background: var(--blue); padding: 4px 10px; border-radius: 999px; }
  .price { font-size: clamp(40px, 5vw, 54px); font-weight: 700; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
  .price small { font-size: 15px; font-weight: 400; color: var(--grey); letter-spacing: 0; margin-left: 6px; }
  .offer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; color: var(--soft); font-size: 14.5px; }
  .offer li { display: flex; gap: 10px; align-items: flex-start; }
  .offer li svg { flex: none; margin-top: 4px; color: var(--blue-hi); }
  .offer .btn { width: 100%; }
  .secure { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 22px; color: var(--grey); font-size: 13.5px; }
  .secure a { color: var(--blue-hi); text-decoration: none; font-weight: 500; }
  .secure a:hover { text-decoration: underline; }

  /* About the film */
  .film { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
  .synopsis p { margin: 0 0 16px; color: var(--soft); font-size: 17px; max-width: 62ch; }
  .details { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
  .details div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
  .details dt { color: var(--grey); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; padding-top: 2px; }
  .details dd { margin: 0; }

  /* FAQ */
  .faq { display: grid; gap: 10px; max-width: 820px; }
  .faq details { border-radius: 8px; background: rgba(13,27,61,.55); box-shadow: inset 0 0 0 1px var(--line); }
  .faq summary {
    list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 500;
    display: flex; justify-content: space-between; gap: 16px; align-items: center;
  }
  .faq summary::-webkit-details-marker { display: none; }
  .faq summary::after { content: "+"; color: var(--blue-hi); font-size: 22px; font-weight: 300; line-height: 1; }
  .faq details[open] summary::after { content: "–"; }
  .faq details p { margin: 0; padding: 0 22px 20px; color: var(--soft); max-width: 68ch; }

  /* Closing band */
  .closing { position: relative; overflow: hidden; text-align: center; padding-block: clamp(80px, 11vw, 140px) clamp(56px, 8vw, 96px); border-top: 1px solid var(--line); }
  .closing .arc { top: 40px; }
  .closing .logo .word { font-size: clamp(30px, 6vw, 64px); }
  .closing .logo .tag { font-size: clamp(10px, 1.3vw, 15px); }
  .closing p { margin: 30px auto 0; color: var(--soft); max-width: 50ch; }
  footer { border-top: 1px solid var(--line); color: var(--grey); font-size: 13px; }
  footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-block: 24px 36px; }

  /* About the film, with poster */
  .film { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); align-items: start; }
  .film .head { margin-bottom: 20px; }

  @media (max-width: 860px) {
    .hero-bar { grid-template-columns: 1fr; margin-top: 0; }
    .price-note { text-align: left; }
    .film { grid-template-columns: 1fr; }
    .poster { max-width: 300px; }
    .offers { grid-template-columns: 1fr; }
    .nav { display: none; }
    .account { margin-left: auto; }
  }
  @media (max-width: 420px) {
    .logo-sm .word { font-size: 13px; letter-spacing: .1em; }
    .top .wrap { gap: 10px; }
    .account .btn { padding: 8px 11px; font-size: 13px; }
    .actions .btn { flex: 1 1 100%; }
    .details div { grid-template-columns: 1fr; gap: 2px; }
  }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
  }

  /* ===== App pages (sign in, watch, rentals, admin, policies) ===== */
  .page { padding-block: clamp(40px, 7vw, 88px) clamp(56px, 8vw, 104px); }
  .page-narrow { max-width: 520px; margin: 0 auto; }
  .page-mid { max-width: 820px; margin: 0 auto; }
  .page h1 { margin: 10px 0 12px; font-weight: 700; font-size: clamp(30px, 4.6vw, 46px); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
  .page .lead { color: var(--soft); font-size: 16.5px; margin: 0 0 28px; max-width: 58ch; }
  .panel {
    border-radius: 10px; padding: clamp(22px, 3.5vw, 34px);
    background: linear-gradient(180deg, rgba(13,27,61,.9), rgba(8,15,34,.9));
    box-shadow: inset 0 0 0 1px var(--line);
  }
  .panel + .panel { margin-top: 18px; }
  .field { display: grid; gap: 7px; margin-bottom: 18px; }
  .field label { font-size: 13px; font-weight: 500; color: var(--soft); }
  .field .hint { font-size: 12.5px; color: var(--grey); }
  .input, textarea.input {
    width: 100%; padding: 12px 14px; border-radius: 6px; border: 0;
    background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
    color: #fff; font: inherit; font-size: 16px;
  }
  textarea.input { min-height: 120px; resize: vertical; line-height: 1.55; }
  .input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--blue-hi); }
  .code-input { font-size: 26px; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
  .btn-block { width: 100%; }
  .btn[disabled] { opacity: .55; cursor: default; transform: none; }
  .msg { font-size: 14px; margin: 12px 0 0; min-height: 1.4em; }
  .msg.err { color: #ff8b8b; }
  .msg.ok { color: #7fd8a4; }
  .linklike { background: none; border: 0; padding: 0; color: var(--blue-hi); cursor: pointer; font: inherit; font-size: 14px; }
  .linklike:hover { text-decoration: underline; }
  .muted { color: var(--grey); font-size: 13.5px; }
  .account .btn-text { color: var(--soft); text-decoration: none; font-size: 14px; padding: 9px 6px; background: none; border: 0; cursor: pointer; font-family: inherit; }
  .account .btn-text:hover { color: #fff; }

  /* Watch page */
  .stage {
    position: relative; aspect-ratio: 16/9; max-width: 100%; width: 100%;
    border-radius: 10px; overflow: hidden; background: #000;
    box-shadow: 0 0 0 1px rgba(77,139,255,.22), 0 30px 80px rgba(0,0,0,.5);
  }
  .stage mux-player { position: absolute; inset: 0; width: 100%; height: 100%; --media-object-fit: contain; }
  .stage .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
  .stage .over {
    position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; text-align: center;
    padding: 20px; background: radial-gradient(70% 70% at 50% 50%, rgba(6,12,29,.55), rgba(6,12,29,.9));
  }
  .stage .over-inner { display: grid; gap: 14px; justify-items: center; max-width: 460px; }
  .stage .over h2 { margin: 0; font-size: clamp(20px, 3vw, 28px); font-weight: 600; text-wrap: balance; }
  .stage .over p { margin: 0; color: var(--soft); font-size: 15px; }
  .watch-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; align-items: baseline; margin-top: 18px; }
  .watch-meta h1 { margin: 0; font-size: clamp(22px, 3vw, 30px); font-weight: 600; letter-spacing: -0.01em; }
  .timeleft { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--soft); font-variant-numeric: tabular-nums; }
  .timeleft .dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 10px #3ddc84; }
  .timeleft.low .dot { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
  .spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); border-top-color: var(--blue-hi); animation: spin 0.9s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* My Rentals */
  .rental-list { display: grid; gap: 14px; }
  .rental {
    display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 18px; align-items: center;
    padding: 14px; border-radius: 10px; background: rgba(13,27,61,.6); box-shadow: inset 0 0 0 1px var(--line);
  }
  .rental img { width: 84px; aspect-ratio: 2/3; object-fit: cover; border-radius: 6px; max-width: 100%; }
  .rental h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
  .rental .when { color: var(--soft); font-size: 14px; }
  .pill-state { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; margin-bottom: 8px; }
  .pill-state.ready, .pill-state.watching { background: rgba(61,220,132,.14); color: #7fe0a8; }
  .pill-state.expired, .pill-state.refunded, .pill-state.disputed { background: rgba(138,143,152,.18); color: var(--soft); }
  .empty { text-align: center; padding: 40px 20px; }

  /* Admin */
  .admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 20px; }
  .status-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
  .status-list li { display: flex; gap: 10px; align-items: flex-start; }
  .ok-dot, .warn-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; }
  .ok-dot { background: #3ddc84; }
  .warn-dot { background: var(--gold); }
  .table-wrap { overflow-x: auto; }
  table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
  table.data th { text-align: left; font-weight: 500; color: var(--grey); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
  table.data td { padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
  .thumb-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
  .thumb-row img { width: 80px; border-radius: 6px; max-width: 100%; }

  /* Policies */
  .prose h2 { font-size: 20px; font-weight: 600; margin: 34px 0 10px; }
  .prose p, .prose li { color: var(--soft); max-width: 68ch; }
  .prose ul { padding-left: 20px; }

  .nav a.active { color: #fff; }
  .hidden { display: none !important; }

  @media (max-width: 700px) {
    .admin-grid { grid-template-columns: 1fr; }
    .rental { grid-template-columns: 64px minmax(0, 1fr); }
    .rental img { width: 64px; }
    .rental .btn { grid-column: 1 / -1; }
  }
