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

    html, body {
      height: 100%;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
      -webkit-font-smoothing: antialiased;
      background: #040b1a;
      color: #f9f9f9;
      overflow-x: hidden;
    }

    /* ── Background mosaic ── */
    .bg-mosaic {
      position: fixed;
      inset: 0;
      z-index: 0;
      display: grid;
      grid-template-columns: repeat(6, 1fr);
      grid-template-rows: repeat(4, 1fr);
      gap: 4px;
      opacity: 0.18;
      filter: blur(0px) saturate(0.7);
      transform: scale(1.05);
    }

    .mosaic-tile {
      background-size: cover;
      background-position: center;
    }

    /* Placeholder gradients simulating movie posters */
    .mosaic-tile:nth-child(1)  { background: linear-gradient(145deg, #0d1f5c, #1a3a8a); }
    .mosaic-tile:nth-child(2)  { background: linear-gradient(145deg, #2d0a0a, #8a1212); }
    .mosaic-tile:nth-child(3)  { background: linear-gradient(145deg, #0a2d0a, #1a6b2e); }
    .mosaic-tile:nth-child(4)  { background: linear-gradient(145deg, #1a0a4a, #5c1a9e); }
    .mosaic-tile:nth-child(5)  { background: linear-gradient(145deg, #0a1a3d, #1040a0); }
    .mosaic-tile:nth-child(6)  { background: linear-gradient(145deg, #3d1a0a, #a04010); }
    .mosaic-tile:nth-child(7)  { background: linear-gradient(145deg, #0a3d3d, #0a7a7a); }
    .mosaic-tile:nth-child(8)  { background: linear-gradient(145deg, #3d0a1a, #9e1a4a); }
    .mosaic-tile:nth-child(9)  { background: linear-gradient(145deg, #1a1a3d, #3d3d8a); }
    .mosaic-tile:nth-child(10) { background: linear-gradient(145deg, #0d2d0a, #2a6a15); }
    .mosaic-tile:nth-child(11) { background: linear-gradient(145deg, #1a0d3d, #6a1a8a); }
    .mosaic-tile:nth-child(12) { background: linear-gradient(145deg, #3d1a1a, #8a3a10); }
    .mosaic-tile:nth-child(13) { background: linear-gradient(145deg, #0a1540, #142f8a); }
    .mosaic-tile:nth-child(14) { background: linear-gradient(145deg, #2d0a2d, #7a127a); }
    .mosaic-tile:nth-child(15) { background: linear-gradient(145deg, #0d300d, #1a661a); }
    .mosaic-tile:nth-child(16) { background: linear-gradient(145deg, #400a0a, #cc1a1a); }
    .mosaic-tile:nth-child(17) { background: linear-gradient(145deg, #0a0d3d, #151f8a); }
    .mosaic-tile:nth-child(18) { background: linear-gradient(145deg, #1a1a0a, #5a5a15); }
    .mosaic-tile:nth-child(19) { background: linear-gradient(145deg, #0a2d2d, #156060); }
    .mosaic-tile:nth-child(20) { background: linear-gradient(145deg, #3d0d0a, #b02510); }
    .mosaic-tile:nth-child(21) { background: linear-gradient(145deg, #0d1540, #1a2d8a); }
    .mosaic-tile:nth-child(22) { background: linear-gradient(145deg, #2d1a0a, #8a5010); }
    .mosaic-tile:nth-child(23) { background: linear-gradient(145deg, #0a0d30, #0a1570); }
    .mosaic-tile:nth-child(24) { background: linear-gradient(145deg, #1a0d2d, #5a158a); }

    /* Dark overlay on top of mosaic */
    .bg-overlay {
      position: fixed;
      inset: 0;
      z-index: 1;
      background:
        linear-gradient(to bottom,
          rgba(4, 11, 26, 0.55) 0%,
          rgba(4, 11, 26, 0.6) 40%,
          rgba(4, 11, 26, 0.75) 80%,
          rgba(4, 11, 26, 1) 100%
        );
    }

    /* ── Page layout ── */
    .page {
      position: relative;
      z-index: 2;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }

    /* ── Header ── */
    header {
      padding: 20px 32px;
      display: flex;
      align-items: center;
      justify-content: flex-start;
    }

    .logo-link {
      display: inline-flex;
      text-decoration: none;
    }

    /* ── Main ── */
    main {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 20px 60px;
    }

    .dialog {
      width: 100%;
      max-width: 440px;
      display: flex;
      flex-direction: column;
      gap: 24px;
      animation: fadeSlideUp 0.35s ease both;
    }

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

    /* ── Heading ── */
    .heading h1 {
      font-size: 26px;
      font-weight: 600;
      line-height: 1.25;
      color: #f9f9f9;
      margin-bottom: 8px;
    }

    .heading p {
      font-size: 15px;
      line-height: 1.55;
      color: #f9f9f9;
      opacity: 0.85;
    }

    /* ── Form ── */
    form {
      display: flex;
      flex-direction: column;
      gap: 24px;
    }

    /* Floating label field */
    .text-field {
      position: relative;
      display: flex;
      align-items: center;
      width: 100%;
      height: 60px;
      background: rgba(255,255,255,0.07);
      border-radius: 4px 4px 0 0;
      overflow: hidden;
      cursor: text;
    }

    .text-field::after {
      content: '';
      position: absolute;
      left: 0; right: 0; bottom: 0;
      height: 2px;
      background: #8899aa;
      transition: background 0.2s;
    }

    .text-field:focus-within::after {
      background: #0071eb;
    }

    .text-field label {
      position: absolute;
      left: 16px;
      top: 18px;
      font-size: 17px;
      line-height: 1.5;
      color: #8899aa;
      pointer-events: none;
      transition: all 0.15s ease;
      transform-origin: left top;
    }

    .text-field input {
      flex: 1;
      height: 100%;
      padding: 26px 16px 10px;
      font-size: 17px;
      line-height: 1.5;
      color: #f9f9f9;
      background: transparent;
      border: none;
      outline: none;
    }

    .text-field input:focus + label,
    .text-field input:not(:placeholder-shown) + label {
      top: 8px;
      font-size: 12px;
      color: #6688aa;
    }

    /* Reorder: label after input in DOM but visually above using pointer-events */
    /* Using :placeholder-shown trick: input must have placeholder=" " */

    .field-error-msg {
      font-size: 13px;
      color: #ff6b6b;
      margin-top: -16px;
      display: none;
    }

    .field-has-error .text-field::after { background: #ff6b6b; }
    .field-has-error .field-error-msg   { display: block; }

    /* Continue button */
    .btn-continue {
      width: 100%;
      height: 52px;
      padding: 14px 24px;
      background: #0071eb;
      color: #fff;
      font-size: 15px;
      font-weight: 600;
      border: 2px solid #0071eb;
      border-radius: 12px;
      cursor: pointer;
      transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
      outline: none;
      letter-spacing: 0.1px;
    }

    .btn-continue:hover  {
      background: #0483ff;
      border-color: #0483ff;
      box-shadow: 0 4px 20px rgba(0,113,235,0.4);
    }

    .btn-continue:active { opacity: 0.9; }

    /* ── Email chip (password step) ── */
    .email-chip {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: rgba(255,255,255,0.07);
      border-radius: 4px 4px 0 0;
      border-bottom: 2px solid rgba(255,255,255,0.2);
      padding: 10px 16px;
      font-size: 15px;
      color: #f9f9f9;
    }

    .email-chip button {
      background: none;
      border: none;
      color: #5b9bd5;
      font-size: 13px;
      cursor: pointer;
      padding: 0;
      text-decoration: underline;
    }
    .email-chip button:hover { color: #7ab8f5; }

    /* Password show/hide toggle */
    .pw-toggle {
      position: absolute;
      right: 14px;
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      color: rgba(249,249,249,0.5);
      cursor: pointer;
      padding: 4px;
      line-height: 1;
      transition: color .2s;
    }
    .pw-toggle:hover { color: #f9f9f9; }

    /* Forgot password link */
    .forgot-link {
      text-align: right;
      font-size: 13px;
    }
    .forgot-link a {
      color: #5b9bd5;
      text-decoration: none;
    }
    .forgot-link a:hover { text-decoration: underline; }

    /* Step transition */
    .step { display: none; flex-direction: column; gap: 24px; }
    .step.active {
      display: flex;
      animation: fadeSlideUp .3s ease both;
    }

    /* ── Brand logos / logo parade ── */
    .logo-parade-wrap {
      font-size: 14px;
      line-height: 1.5;
      color: rgba(249,249,249,0.7);
    }

    .logo-parade-wrap a {
      color: rgba(249,249,249,0.9);
      text-decoration: underline;
      cursor: pointer;
    }

    .logo-parade {
      display: flex;
      flex-wrap: wrap;
      gap: 4px 8px;
      margin-top: 12px;
      align-items: center;
    }

    .logo-parade svg {
      height: 20px;
      width: auto;
      display: block;
      opacity: 0.9;
    }

    /* Make all logos white */
    .logo-parade svg path { fill: #f9f9f9 !important; }

    /* ── Footer ── */
    footer {
      position: relative;
      z-index: 2;
      padding: 32px 32px 24px;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 8px 24px;
      border-top: 1px solid rgba(255,255,255,0.08);
    }

    footer a, footer p {
      font-size: 13px;
      color: rgba(249,249,249,0.45);
      text-decoration: none;
    }

    footer a:hover { color: rgba(249,249,249,0.7); text-decoration: underline; }

    /* ── Responsive ── */
    @media (max-width: 500px) {
      header { padding: 16px 20px; }
      main   { padding: 0 16px 48px; }
      .heading h1 { font-size: 22px; }
      footer { padding: 24px 16px; gap: 6px 16px; }
    }
    /* ── Billing / Step 3 ── */
    .plan-summary {
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 12px;
      padding: 16px 20px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .plan-summary-left { display: flex; flex-direction: column; gap: 2px; }

    .plan-name {
      font-size: 15px;
      font-weight: 600;
      color: #f9f9f9;
    }

    .plan-desc {
      font-size: 12px;
      color: rgba(249,249,249,0.55);
    }

    .plan-price {
      font-size: 18px;
      font-weight: 700;
      color: #f9f9f9;
      white-space: nowrap;
    }

    .plan-price span {
      font-size: 12px;
      font-weight: 400;
      color: rgba(249,249,249,0.55);
    }

    .section-label {
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.8px;
      text-transform: uppercase;
      color: rgba(249,249,249,0.45);
      margin-bottom: -8px;
    }

    .card-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0 12px;
    }

    /* Card type badges inside card number field */
    .card-badges {
      position: absolute;
      right: 14px;
      top: 50%;
      transform: translateY(-50%);
      display: flex;
      gap: 4px;
      align-items: center;
    }

    .card-badge {
      width: 38px;
      height: 24px;
      border-radius: 4px;
      object-fit: cover;
      opacity: 0.25;
      transition: opacity .25s;
      display: block;
    }

    .card-badge.active {
      opacity: 1;
    }

    .legal-text {
      font-size: 12px;
      line-height: 1.6;
      color: rgba(249,249,249,0.45);
    }

    .legal-text a { color: rgba(249,249,249,0.65); text-decoration: underline; }

    .btn-subscribe {
      width: 100%;
      height: 52px;
      padding: 14px 24px;
      background: #0071eb;
      color: #fff;
      font-size: 15px;
      font-weight: 600;
      border: 2px solid #0071eb;
      border-radius: 12px;
      cursor: pointer;
      transition: background .2s, border-color .2s, box-shadow .2s;
      outline: none;
      letter-spacing: 0.1px;
    }

    .btn-subscribe:hover {
      background: #0483ff;
      border-color: #0483ff;
      box-shadow: 0 4px 20px rgba(0,113,235,0.4);
    }

    .btn-subscribe:active { opacity: 0.9; }

    .secure-badge {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      font-size: 12px;
      color: rgba(249,249,249,0.4);
    }

    .secure-badge svg { opacity: 0.5; }

    /* wider dialog on billing step */
    .dialog.wide { max-width: 520px; }

    /* ── OTP Step ── */
    .otp-single-wrap {
      position: relative;
      display: flex;
      align-items: center;
    }

    .otp-single {
      width: 100%;
      height: 64px;
      text-align: center;
      font-size: 28px;
      font-weight: 600;
      letter-spacing: 12px;
      color: #f9f9f9;
      background: rgba(255,255,255,0.06);
      border: 2px solid rgba(255,255,255,0.15);
      border-radius: 14px;
      outline: none;
      caret-color: #0071eb;
      padding: 0 48px 0 16px;
      transition: border-color .2s, box-shadow .2s;
    }

    .otp-single::placeholder {
      color: rgba(255,255,255,0.15);
      letter-spacing: 10px;
      font-size: 22px;
    }

    .otp-single:focus {
      border-color: #0071eb;
      box-shadow: 0 0 0 3px rgba(0,113,235,0.2);
    }

    .otp-single.error {
      border-color: #ff6b6b;
      box-shadow: 0 0 0 3px rgba(255,107,107,0.15);
    }

    .otp-single-icon {
      position: absolute;
      right: 16px;
      pointer-events: none;
    }

    .resend-text {
      text-align: center;
      font-size: 13px;
      color: rgba(249,249,249,0.5);
      margin-top: -8px;
    }

    .resend-btn {
      background: none;
      border: none;
      color: #5b9bd5;
      font-size: 13px;
      cursor: pointer;
      padding: 0;
      text-decoration: underline;
    }

    .resend-btn:hover { color: #7ab8f5; }
    .resend-btn:disabled { color: rgba(249,249,249,0.3); text-decoration: none; cursor: default; }

    /* ── Confirmation Step ── */
    .confirm-wrap {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 16px;
      text-align: center;
    }

    .confirm-icon {
      width: 88px;
      height: 88px;
      border-radius: 50%;
      background: rgba(0, 113, 235, 0.12);
      border: 2px solid rgba(0, 113, 235, 0.3);
      display: flex;
      align-items: center;
      justify-content: center;
      animation: popIn .4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
    }

    @keyframes popIn {
      from { transform: scale(0.5); opacity: 0; }
      to   { transform: scale(1);   opacity: 1; }
    }

    .confirm-title {
      font-size: 30px;
      font-weight: 700;
      color: #f9f9f9;
      letter-spacing: -.3px;
    }

    .confirm-sub {
      font-size: 15px;
      color: rgba(249,249,249,0.65);
      line-height: 1.6;
    }

    .confirm-divider {
      width: 100%;
      height: 1px;
      background: rgba(255,255,255,0.08);
      margin: 4px 0;
    }

    .confirm-details {
      width: 100%;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 12px;
      padding: 16px 20px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .confirm-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 14px;
    }

    .confirm-label { color: rgba(249,249,249,0.45); }
    .confirm-value { color: #f9f9f9; font-weight: 500; }

    .confirm-active {
      display: flex;
      align-items: center;
      gap: 6px;
      color: #4cd964;
    }

    .confirm-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #4cd964;
      box-shadow: 0 0 6px #4cd96488;
    }

    /* ── Loading overlay ── */
    .loading-overlay {
      position: fixed;
      inset: 0;
      z-index: 100;
      background: rgba(4, 11, 26, 0.85);
      backdrop-filter: blur(6px);
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      pointer-events: none;
      transition: opacity .2s ease;
    }

    .loading-overlay.active {
      opacity: 1;
      pointer-events: all;
    }

    .loading-spinner {
      width: 44px;
      height: 44px;
      border: 3px solid rgba(255,255,255,0.1);
      border-top-color: #0071eb;
      border-radius: 50%;
      animation: spin .7s linear infinite;
    }

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