    :root {
      --green:   #5df1ff;
      --lime:    #a3e635;
      --sky:     #38bdf8;
      --orange:  #fb923c;
      --gold:    #fbbf24;
      --purple:  #a78bfa;
      --dark:    #0a0f0a;
      --panel:   #111a11;
      --border:  #1e3a3a;
      --text:    #d4ffd4;
      --muted:   #5a858a;
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    body {
      background: var(--dark);
      color: var(--text);
      font-family: 'Rajdhani', 'Noto Sans Khmer', sans-serif;
      font-size: 16px;
      overflow-x: hidden;
    }

    /* ─── PIXEL BG ─── */
    body::before {
      content: '';
      position: fixed; inset: 0; z-index: 0;
      background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(74,222,128,.12), transparent),
        url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='0' width='1' height='1' fill='rgba(74,222,128,.04)'/%3E%3C/svg%3E");
      background-size: 100% 100%, 32px 32px;
      pointer-events: none;
    }

    /* ─── HEADER ─── */
    header {
      position: sticky; top: 0; z-index: 100;
      background: rgba(10,15,10,.92);
      backdrop-filter: blur(12px);
      border-bottom: 2px solid var(--border);
      display: flex; align-items: center; justify-content: space-between;
      padding: 0 2rem;
      height: 64px;
    }

    .logo {
      font-family: 'Press Start 2P', monospace;
      font-size: .85rem;
      color: var(--green);
      text-shadow: 0 0 16px rgba(74,222,128,.6);
      letter-spacing: 1px;
      line-height: 1.4;
    }
    .logo span { color: var(--lime); }

    nav { display: flex; gap: 1.6rem; align-items: center; }
    nav a {
      color: var(--muted);
      text-decoration: none;
      font-weight: 600;
      font-size: .95rem;
      letter-spacing: .5px;
      transition: color .2s;
    }
    nav a:hover { color: var(--green); }

    .btn-connect {
      background: var(--green);
      color: #000;
      border: none; cursor: pointer;
      font-family: 'Press Start 2P', monospace;
      font-size: .55rem;
      padding: .55rem 1rem;
      border-radius: 4px;
      letter-spacing: .5px;
      transition: background .2s, transform .1s;
    }
    .btn-connect:hover { background: var(--lime); transform: scale(1.04); }

    /* ─── HERO ─── */
    .hero {
      position: relative; z-index: 1;
      min-height: 92vh;
      display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      text-align: center;
      padding: 4rem 1.5rem 3rem;
    }

    .hero-badge {
      font-family: 'Press Start 2P', monospace;
      font-size: .55rem;
      color: var(--green);
      border: 1px solid var(--green);
      padding: .4rem .9rem;
      border-radius: 99px;
      letter-spacing: 1px;
      margin-bottom: 1.8rem;
      animation: pulse-border 2.5s infinite;
    }
    @keyframes pulse-border {
      0%,100% { box-shadow: 0 0 0 0 rgba(74,222,128,.4); }
      50%      { box-shadow: 0 0 0 8px rgba(74,222,128,0); }
    }

    .hero h1 {
      font-family: 'Press Start 2P', monospace;
      font-size: clamp(1.6rem, 5vw, 3.4rem);
      color: #fff;
      line-height: 1.45;
      text-shadow: 0 0 40px rgba(74,222,128,.3);
      margin-bottom: 1rem;
    }
    .hero h1 .accent { color: var(--green); }

    .hero-sub {
      font-size: 1.25rem;
      color: var(--muted);
      max-width: 520px;
      line-height: 1.7;
      margin-bottom: 2.4rem;
      font-family: 'Noto Sans Khmer', sans-serif;
    }

    .ip-box {
      display: flex; align-items: center; gap: 0;
      background: var(--panel);
      border: 2px solid var(--border);
      border-radius: 8px;
      overflow: hidden;
      margin-bottom: 3rem;
      box-shadow: 0 0 32px rgba(74,222,128,.08);
    }
    .ip-label {
      font-family: 'Press Start 2P', monospace;
      font-size: .5rem;
      background: var(--green);
      color: #000;
      padding: .75rem 1rem;
    }
    .ip-text {
      font-family: 'Press Start 2P', monospace;
      font-size: .75rem;
      color: var(--green);
      padding: .75rem 1.2rem;
      letter-spacing: 1px;
    }
    .ip-copy {
      background: rgba(74,222,128,.1);
      border: none; cursor: pointer;
      color: var(--green);
      padding: .75rem 1rem;
      font-size: 1rem;
      transition: background .2s;
      font-family: inherit;
    }
    .ip-copy:hover { background: rgba(74,222,128,.2); }

    .hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
    .btn-main {
      font-family: 'Press Start 2P', monospace;
      font-size: .6rem;
      padding: .9rem 1.8rem;
      border-radius: 6px;
      border: none; cursor: pointer;
      transition: transform .15s, box-shadow .15s;
    }
    .btn-main:hover { transform: translateY(-2px); }
    .btn-primary { background: var(--green); color: #000; box-shadow: 0 4px 20px rgba(74,222,128,.4); }
    .btn-primary:hover { box-shadow: 0 6px 28px rgba(74,222,128,.6); }
    .btn-secondary { background: transparent; color: var(--green); border: 2px solid var(--green); }

    /* ─── STATS ─── */
    .stats {
      position: relative; z-index: 1;
      display: flex; justify-content: center; gap: 1px;
      background: var(--border);
      border-top: 2px solid var(--border);
      border-bottom: 2px solid var(--border);
    }
    .stat-item {
      flex: 1; max-width: 220px;
      background: var(--panel);
      padding: 1.8rem 1rem;
      text-align: center;
    }
    .stat-num {
      font-family: 'Press Start 2P', monospace;
      font-size: 1.4rem;
      color: var(--green);
      display: block;
      text-shadow: 0 0 16px rgba(74,222,128,.5);
    }
    .stat-label { font-size: .85rem; color: var(--muted); margin-top: .5rem; font-weight: 600; }

    /* ─── SECTION ─── */
    section { position: relative; z-index: 1; padding: 5rem 1.5rem; }
    .section-title {
      font-family: 'Press Start 2P', monospace;
      font-size: clamp(.9rem, 2vw, 1.4rem);
      color: #fff;
      text-align: center;
      margin-bottom: .6rem;
    }
    .section-title .g { color: var(--green); }
    .section-sub {
      text-align: center;
      color: var(--muted);
      font-size: 1rem;
      margin-bottom: 3rem;
      font-family: 'Noto Sans Khmer', sans-serif;
    }

    /* ─── RANKS ─── */
    .ranks-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 1.2rem;
      max-width: 1100px; margin: 0 auto;
    }

    .rank-card {
      background: var(--panel);
      border: 2px solid var(--border);
      border-radius: 10px;
      padding: 1.8rem 1.4rem;
      text-align: center;
      position: relative; overflow: hidden;
      transition: transform .25s, border-color .25s, box-shadow .25s;
    }
    .rank-card::before {
      content: '';
      position: absolute; top: 0; left: 0; right: 0; height: 3px;
      background: var(--rank-color, var(--green));
    }
    .rank-card:hover {
      transform: translateY(-6px);
      border-color: var(--rank-color, var(--green));
      box-shadow: 0 12px 36px rgba(0,0,0,.5);
    }
    .rank-card.featured {
      border-color: var(--rank-color, var(--gold));
      box-shadow: 0 0 32px rgba(251,191,36,.15);
    }

    .rank-badge-wrap {
      width: 64px; height: 64px;
      margin: 0 auto 1rem;
      display: flex; align-items: center; justify-content: center;
      background: rgba(255,255,255,.04);
      border-radius: 8px;
      font-size: 2rem;
    }
    .rank-name {
      font-family: 'Press Start 2P', monospace;
      font-size: .75rem;
      color: var(--rank-color, var(--green));
      margin-bottom: .6rem;
    }
    .rank-price {
      font-family: 'Press Start 2P', monospace;
      font-size: 1.1rem;
      color: #fff;
      margin-bottom: 1.2rem;
    }
    .rank-price span { font-size: .6rem; color: var(--muted); }

    .rank-perks { list-style: none; margin-bottom: 1.5rem; text-align: left; }
    .rank-perks li {
      font-size: .85rem; color: var(--text);
      padding: .3rem 0;
      border-bottom: 1px solid rgba(255,255,255,.04);
      font-weight: 500;
    }
    .rank-perks li::before { content: '▸ '; color: var(--rank-color, var(--green)); }

    .btn-buy {
      width: 100%;
      font-family: 'Press Start 2P', monospace;
      font-size: .55rem;
      padding: .8rem;
      border-radius: 6px;
      border: 2px solid var(--rank-color, var(--green));
      background: transparent;
      color: var(--rank-color, var(--green));
      cursor: pointer;
      transition: background .2s, color .2s;
    }
    .btn-buy:hover { background: var(--rank-color, var(--green)); color: #000; }
    .rank-card.featured .btn-buy { background: var(--rank-color, var(--gold)); color: #000; }

    .hot-tag {
      position: absolute; top: 12px; right: 12px;
      font-family: 'Press Start 2P', monospace;
      font-size: .4rem;
      background: var(--orange);
      color: #000; padding: .2rem .5rem;
      border-radius: 4px;
    }

    /* ─── MONEY SHOP ─── */
    .money-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 1.2rem;
      max-width: 900px; margin: 0 auto;
    }
    .money-card {
      background: var(--panel);
      border: 2px solid var(--border);
      border-radius: 10px;
      padding: 1.6rem 1.2rem;
      text-align: center;
      transition: transform .25s, border-color .25s;
      cursor: pointer;
    }
    .money-card:hover { transform: translateY(-5px); border-color: var(--gold); box-shadow: 0 8px 28px rgba(251,191,36,.15); }
    .coin-icon { font-size: 2.4rem; margin-bottom: .8rem; }
    .money-amount {
      font-family: 'Press Start 2P', monospace;
      font-size: .9rem;
      color: var(--gold);
      margin-bottom: .3rem;
    }
    .money-label { font-size: .8rem; color: var(--muted); margin-bottom: 1rem; font-family: 'Noto Sans Khmer', sans-serif; }
    .money-price {
      font-family: 'Press Start 2P', monospace;
      font-size: .85rem;
      color: #fff;
      margin-bottom: 1rem;
    }
    .btn-buy-money {
      width: 100%;
      font-family: 'Press Start 2P', monospace;
      font-size: .5rem;
      padding: .7rem;
      border-radius: 6px;
      border: 2px solid var(--gold);
      background: transparent;
      color: var(--gold);
      cursor: pointer;
      transition: background .2s, color .2s;
    }
    .btn-buy-money:hover { background: var(--gold); color: #000; }

    /* ─── FEATURES ─── */
    .features-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 1rem;
      max-width: 960px; margin: 0 auto;
    }
    .feat-card {
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 1.4rem;
      display: flex; gap: 1rem; align-items: flex-start;
    }
    .feat-icon { font-size: 1.8rem; flex-shrink: 0; }
    .feat-title { font-family: 'Press Start 2P', monospace; font-size: .6rem; color: var(--green); margin-bottom: .4rem; }
    .feat-desc { font-size: .85rem; color: var(--muted); line-height: 1.6; font-family: 'Noto Sans Khmer', sans-serif; }

    /* ─── MODAL ─── */
    .modal-overlay {
      display: none; position: fixed; inset: 0; z-index: 200;
      background: rgba(0,0,0,.8);
      backdrop-filter: blur(6px);
      align-items: center; justify-content: center;
    }
    .modal-overlay.open { display: flex; }
    .modal {
      background: var(--panel);
      border: 2px solid var(--border);
      border-radius: 14px;
      padding: 2.4rem;
      width: min(460px, 94vw);
      position: relative;
      animation: pop-in .25s cubic-bezier(.17,.67,.37,1.4);
    }
    @keyframes pop-in {
      from { transform: scale(.85); opacity: 0; }
      to   { transform: scale(1);   opacity: 1; }
    }
    .modal-close {
      position: absolute; top: 1rem; right: 1rem;
      background: none; border: none; color: var(--muted);
      font-size: 1.4rem; cursor: pointer;
    }
    .modal h2 {
      font-family: 'Press Start 2P', monospace;
      font-size: .75rem; color: var(--green);
      margin-bottom: 1.4rem;
    }
    .form-group { margin-bottom: 1.2rem; }
    .form-group label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .4rem; font-weight: 600; }
    .form-group input {
      width: 100%;
      background: rgba(255,255,255,.04);
      border: 1px solid var(--border);
      border-radius: 6px;
      color: var(--text);
      padding: .7rem .9rem;
      font-size: .95rem;
      font-family: 'Rajdhani', sans-serif;
      outline: none;
      transition: border-color .2s;
    }
    .form-group input:focus { border-color: var(--green); }
    .modal-item-info {
      background: rgba(74,222,128,.06);
      border: 1px solid rgba(74,222,128,.2);
      border-radius: 6px;
      padding: .8rem 1rem;
      margin-bottom: 1.4rem;
      font-size: .85rem; color: var(--text);
      display: flex; justify-content: space-between; align-items: center;
    }
    .modal-item-name { font-weight: 700; }
    .modal-item-price { font-family: 'Press Start 2P', monospace; font-size: .65rem; color: var(--green); }
    .btn-confirm {
      width: 100%;
      font-family: 'Press Start 2P', monospace;
      font-size: .6rem;
      padding: .9rem;
      background: var(--green);
      color: #000;
      border: none; border-radius: 6px;
      cursor: pointer;
      transition: background .2s;
    }
    .btn-confirm:hover { background: var(--lime); }
    .payment-note {
      text-align: center;
      margin-top: .8rem;
      font-size: .8rem;
      color: var(--muted);
      font-family: 'Noto Sans Khmer', sans-serif;
    }

    /* ─── FOOTER ─── */
    footer {
      position: relative; z-index: 1;
      background: var(--panel);
      border-top: 2px solid var(--border);
      padding: 2.4rem 1.5rem;
      text-align: center;
    }
    .footer-logo {
      font-family: 'Press Start 2P', monospace;
      font-size: .7rem;
      color: var(--green);
      margin-bottom: .8rem;
    }
    .footer-ip { font-size: .9rem; color: var(--muted); margin-bottom: .5rem; }
    .footer-note { font-size: .8rem; color: rgba(255,255,255,.2); font-family: 'Noto Sans Khmer', sans-serif; }

    /* ─── TOAST ─── */
    #toast {
      position: fixed; bottom: 2rem; right: 2rem; z-index: 999;
      background: var(--green); color: #000;
      font-family: 'Press Start 2P', monospace;
      font-size: .55rem;
      padding: .8rem 1.4rem;
      border-radius: 6px;
      box-shadow: 0 4px 20px rgba(0,0,0,.4);
      transform: translateY(80px); opacity: 0;
      transition: transform .3s, opacity .3s;
    }
    #toast.show { transform: translateY(0); opacity: 1; }

    /* ─── SCROLLBAR ─── */
    ::-webkit-scrollbar { width: 6px; }
    ::-webkit-scrollbar-track { background: var(--dark); }
    ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

    @media (max-width: 600px) {
      header { padding: 0 1rem; }
      nav a { font-size: .8rem; }
      .stat-item { padding: 1.2rem .5rem; }
      .stat-num { font-size: 1rem; }
    }
    
  /* ══ KHQR CARD — Bakong/ACLEDA style ══ */
  .khqr-card {
    background: #fff;
    border-radius: 18px;
    overflow: visible;
    box-shadow: 0 8px 32px rgba(0,0,0,.45);
    margin: 0 auto .4rem;
    max-width: 300px;
    position: relative;
  }
  .khqr-card-header {
    background: #d0021b;
    border-radius: 18px 18px 0 0;
    padding: .9rem 1.4rem .7rem;
    display: flex; align-items: center;
  }
  .khqr-logo-text {
    font-family: 'Press Start 2P', monospace;
    font-size: 1.05rem;
    color: #fff;
    letter-spacing: 2px;
    font-weight: 900;
  }
  .khqr-logo-text span {
    display: inline-block;
    border: 2.5px solid #fff;
    border-radius: 4px;
    padding: 0 3px;
    margin: 0 1px;
  }
  .khqr-card-merchant {
    background: #fff;
    padding: 1rem 1.4rem .6rem;
    border-bottom: none;
  }
  .khqr-merchant-name {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem; font-weight: 700;
    color: #111;
    letter-spacing: .5px;
    margin-bottom: .15rem;
  }
  .khqr-merchant-amount {
    font-family: 'Press Start 2P', monospace;
    font-size: 1.6rem;
    color: #111;
    font-weight: 900;
  }

  /* Dashed divider with circles (ticket-style) */
  .khqr-divider {
    display: flex; align-items: center;
    position: relative; margin: 0;
    background: #fff;
  }
  .khqr-circle-left, .khqr-circle-right {
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--dark);
    flex-shrink: 0;
    position: relative; z-index: 2;
  }
  .khqr-circle-left  { margin-left: -10px; }
  .khqr-circle-right { margin-right: -10px; }
  .khqr-dash-line {
    flex: 1;
    border-top: 2px dashed #ccc;
    margin: 0 4px;
  }

  /* QR area */
  .khqr-qr-area {
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    padding: 1.2rem 1.4rem .8rem;
  }
  .khqr-card .qr-inner {
    background: #fff;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    min-width: 190px; min-height: 190px;
    display: flex; align-items: center; justify-content: center;
  }

  /* Footer info */
  .khqr-card-footer {
    background: #f7f7f7;
    border-radius: 0 0 18px 18px;
    padding: .6rem 1.4rem .9rem;
  }
  .khqr-footer-row {
    display: flex; justify-content: space-between;
    padding: .18rem 0;
  }
  .khqr-footer-label { font-size: .78rem; color: #888; font-weight: 600; }
  .khqr-footer-val   { font-size: .78rem; color: #222; font-weight: 700; font-family: 'Rajdhani',sans-serif; }

  /* ── QR Spinner ── */
  .qr-spinner {
    width: 40px; height: 40px; border-radius: 50%;
    border: 3px solid var(--border);
    border-top-color: var(--green);
    animation: spin .8s linear infinite;
  }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* ── Modal Steps ── */
  .modal-steps {
    display: flex; align-items: center; justify-content: center;
    gap: 0; margin-bottom: 1.4rem;
  }
  .modal-step {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--border); color: var(--muted);
    font-family: 'Press Start 2P', monospace; font-size: .5rem;
    display: flex; align-items: center; justify-content: center;
    transition: background .3s, color .3s;
  }
  .modal-step.active { background: var(--green); color: #000; }
  .modal-step.done   { background: var(--sky);   color: #000; }
  .modal-step-line { flex: 1; max-width: 40px; height: 2px; background: var(--border); }

  /* ── KHQR UI ── */
  .khqr-header {
    display: flex; align-items: center; justify-content: center;
    gap: .6rem; margin-bottom: 1rem;
  }
  .bakong-logo { height: 24px; }
  .khqr-title {
    font-family: 'Press Start 2P', monospace; font-size: .6rem;
    color: var(--sky);
  }
  .qr-wrap {
    position: relative; width: fit-content; margin: 0 auto 1rem;
  }
  .qr-inner {
    background: #fff;
    padding: 12px; border-radius: 10px;
    box-shadow: 0 0 0 3px var(--green), 0 0 24px rgba(74,222,128,.25);
    display: flex; align-items: center; justify-content: center;
    min-width: 180px; min-height: 180px;
  }
  .qr-inner canvas { display: block !important; }
  .qr-amount-tag {
    position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%);
    background: var(--gold); color: #000;
    font-family: 'Press Start 2P', monospace; font-size: .55rem;
    padding: .25rem .7rem; border-radius: 99px;
    white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.4);
  }
  .khqr-info {
    background: rgba(255,255,255,.03); border: 1px solid var(--border);
    border-radius: 8px; padding: .8rem 1rem; margin: 1.4rem 0 .8rem;
  }
  .khqr-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: .3rem 0; border-bottom: 1px solid rgba(255,255,255,.04);
  }
  .khqr-row:last-child { border-bottom: none; }
  .kh-label { font-size: .8rem; color: var(--muted); font-weight: 600; }
  .kh-val   { font-size: .85rem; color: var(--text); font-weight: 700; }

  /* ── Timer ── */
  .timer-wrap { margin-bottom: .8rem; }
  .timer-bar-bg {
    height: 4px; background: var(--border); border-radius: 2px; margin-bottom: .4rem; overflow: hidden;
  }
  .timer-bar {
    height: 100%; width: 100%; background: var(--green);
    border-radius: 2px; transition: width 1s linear, background .5s;
  }
  .timer-text { font-size: .8rem; color: var(--muted); }
  .timer-text b { color: var(--green); font-family: 'Press Start 2P', monospace; font-size: .6rem; }

  /* ── Guide ── */
  .khqr-steps-guide {
    background: rgba(56,189,248,.05); border: 1px solid rgba(56,189,248,.15);
    border-radius: 8px; padding: .8rem 1rem; margin-bottom: .8rem;
  }
  .guide-step {
    font-size: .82rem; color: var(--text); padding: .22rem 0;
    font-family: 'Noto Sans Khmer', sans-serif; line-height: 1.6;
  }
  .guide-step b { color: var(--sky); }

  /* ── Back btn ── */
  .btn-back {
    width: 100%; margin-top: .5rem;
    background: transparent; border: 1px solid var(--border);
    color: var(--muted); padding: .6rem;
    border-radius: 6px; cursor: pointer; font-size: .85rem;
    font-family: 'Rajdhani', sans-serif; font-weight: 600;
    transition: border-color .2s, color .2s;
  }
  .btn-back:hover { border-color: var(--green); color: var(--green); }

  /* ── Success ── */
  .success-icon { font-size: 3.5rem; margin-bottom: .6rem; }
  .success-title {
    font-family: 'Press Start 2P', monospace; font-size: .9rem;
    color: var(--green); margin-bottom: .8rem;
  }
  .success-msg { font-size: .9rem; color: var(--text); line-height: 1.7; margin-bottom: 1rem; font-family: 'Noto Sans Khmer', sans-serif; }
  .success-box {
    background: rgba(74,222,128,.06); border: 1px solid rgba(74,222,128,.2);
    border-radius: 8px; padding: .8rem 1rem;
  }