/* --- TOKENS ------------------------------------------------ */
    :root {
      --bg:    #0a0a0a;
      --s1:    #111;
      --s2:    #1a1a1a;
      --b1:    #2a2a2a;
      --gold:  #f5c400;
      --text:  #fff;
      --muted: #777;
      --ok:    #44cc88;
      --err:   #ff4444;
      --r:     10px;
      --hdr:   60px;
      --nav:   48px;
    }

    /* --- RESET ------------------------------------------------- */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html, body { height: 100%; background: var(--bg); color: var(--text); font-family: 'Barlow', sans-serif; font-size: 14px; }
    button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; font-size: inherit; }
    input  { font-family: inherit; }
    .hidden { display: none !important; }

    /* --- REUSABLE COMPONENTS ----------------------------------- */
    .btn-gold {
      background: var(--gold); color: #000;
      font-family: 'Barlow Condensed', sans-serif; font-size: 15px; font-weight: 700; letter-spacing: 1px;
      padding: 12px 20px; border-radius: var(--r); width: 100%; transition: opacity .15s;
    }
    .btn-gold:hover { opacity: .85; }

    .btn-outline {
      border: 1px solid var(--b1); color: var(--text);
      font-weight: 600; padding: 10px 20px; border-radius: var(--r); width: 100%; transition: border-color .15s;
    }
    .btn-outline:hover { border-color: var(--gold); }

    .inp {
      width: 100%; background: var(--s1); border: 1px solid var(--b1);
      color: var(--text); padding: 11px 14px; border-radius: var(--r); outline: none; transition: border-color .15s;
    }
    .inp:focus { border-color: var(--gold); }

    .label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; margin-bottom: 6px; }
    .field { margin-bottom: 14px; }

    .err { color: var(--err); font-size: 13px; margin-top: 8px; }

    .card { background: var(--s2); border: 1px solid var(--b1); border-radius: var(--r); padding: 24px; margin-bottom: 20px; }
    .card-title { font-family: 'Barlow Condensed', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }

    .stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px; }
    .stat { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--r); padding: 16px; }
    .stat-label { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
    .stat-value { font-family: 'Barlow Condensed', sans-serif; font-size: 30px; font-weight: 700; color: var(--gold); }

    .notice { border-left: 3px solid var(--gold); background: var(--s2); border-radius: var(--r); padding: 12px 16px; color: var(--muted); margin-bottom: 20px; }
    .notice strong { color: var(--gold); }

    .placeholder { text-align: center; padding: 80px 24px; color: var(--muted); }
    .placeholder h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 8px; }

    /* --- TOAST ------------------------------------------------- */
    #toast { position: fixed; bottom: 20px; right: 20px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
    .t {
      background: var(--s2); border: 1px solid var(--b1); border-left: 3px solid var(--gold);
      padding: 10px 16px; border-radius: var(--r); font-size: 13px; animation: fadeIn .2s ease;
    }
    .t.ok  { border-left-color: var(--ok); }
    .t.err { border-left-color: var(--err); }
    @keyframes fadeIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; } }

    /* --- LOADING ----------------------------------------------- */
    #loading { position: fixed; inset: 0; background: var(--bg); display: flex; align-items: center; justify-content: center; z-index: 100; }
    #loading span { font-family: 'Barlow Condensed', sans-serif; font-size: 52px; font-weight: 800; letter-spacing: 6px; color: var(--gold); }

    /* --- INVITE GATE ------------------------------------------- */
    #invite-gate { position: fixed; inset: 0; background: var(--bg); display: flex; align-items: center; justify-content: center; z-index: 90; }
    .gate-box { background: var(--s2); border: 1px solid var(--b1); border-radius: 18px; padding: 44px 36px; max-width: 400px; width: calc(100% - 32px); text-align: center; }
    .gate-logo { font-family: 'Barlow Condensed', sans-serif; font-size: 44px; font-weight: 800; color: var(--gold); letter-spacing: 4px; }
    .gate-tagline { font-size: 11px; letter-spacing: 3px; color: var(--muted); margin-bottom: 28px; }
    .gate-link { margin-top: 14px; }
    .gate-link button { color: var(--muted); font-size: 12px; text-decoration: underline; }
    .gate-link button:hover { color: var(--text); }

    /* --- AUTH MODAL -------------------------------------------- */
    #auth-modal { position: fixed; inset: 0; background: rgba(0,0,0,.8); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 95; }
    .auth-box { background: var(--s2); border: 1px solid var(--b1); border-radius: 18px; padding: 36px; max-width: 380px; width: calc(100% - 32px); position: relative; }
    .auth-close { position: absolute; top: 14px; right: 16px; color: var(--muted); font-size: 20px; }
    .auth-close:hover { color: var(--text); }
    .auth-title { font-family: 'Barlow Condensed', sans-serif; font-size: 26px; font-weight: 800; letter-spacing: 1px; margin-bottom: 4px; }
    .auth-sub { color: var(--muted); font-size: 13px; margin-bottom: 24px; }
    .auth-switch { text-align: center; margin-top: 14px; font-size: 13px; color: var(--muted); }
    .auth-switch button { color: var(--gold); font-weight: 600; }

    /* --- APP SHELL --------------------------------------------- */
    #app { min-height: 100vh; display: flex; flex-direction: column; }

    header {
      height: var(--hdr); background: var(--s1); border-bottom: 1px solid var(--b1);
      display: flex; align-items: center; justify-content: space-between;
      padding: 0 24px; position: sticky; top: 0; z-index: 50;
    }
    .logo { font-family: 'Barlow Condensed', sans-serif; font-size: 24px; font-weight: 800; color: var(--gold); letter-spacing: 3px; cursor: pointer; }
    #hdr-right { display: flex; align-items: center; gap: 12px; }
    .chip-badge { background: var(--s1); border: 1px solid var(--b1); border-radius: 20px; padding: 5px 14px; font-weight: 600; color: var(--gold); }
    .user-badge { background: var(--gold); color: #000; border-radius: 20px; padding: 5px 14px; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; letter-spacing: 1px; cursor: pointer; }
    .hdr-btn { border: 1px solid var(--b1); padding: 6px 16px; border-radius: var(--r); font-weight: 600; }
    .hdr-btn:hover { border-color: var(--gold); }
    .hdr-join { background: var(--gold); color: #000; padding: 6px 16px; border-radius: var(--r); font-family: 'Barlow Condensed', sans-serif; font-weight: 700; letter-spacing: 1px; }

    nav { height: var(--nav); background: var(--s1); border-bottom: 1px solid var(--b1); display: flex; padding: 0 16px; overflow-x: auto; }
    .tab { font-family: 'Barlow Condensed', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); padding: 0 14px; border-bottom: 2px solid transparent; white-space: nowrap; }
    .tab:hover { color: var(--text); }
    .tab.active { color: var(--gold); border-bottom-color: var(--gold); }

    main { flex: 1; }
    .page { max-width: 960px; margin: 0 auto; padding: 28px 20px; }
    .page-title { font-family: 'Barlow Condensed', sans-serif; font-size: 28px; font-weight: 800; letter-spacing: 1px; margin-bottom: 22px; }

    /* --- DROPDOWN --------------------------------------------- */
    .dropdown-wrap { position: relative; }
    .dropdown-menu {
      position: absolute; top: calc(100% + 8px); right: 0;
      background: var(--s2); border: 1px solid var(--b1);
      border-radius: var(--r); min-width: 160px; z-index: 200;
      overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.4);
    }
    .dropdown-menu button {
      display: block; width: 100%; text-align: left;
      padding: 11px 16px; font-size: 13px; font-weight: 600;
      color: var(--text); transition: background .12s;
    }
    .dropdown-menu button:hover { background: var(--b1); }
    .dropdown-menu .dd-divider { height: 1px; background: var(--b1); }
    .dropdown-menu .dd-danger { color: var(--err) !important; }

    /* --- FEEDBACK BUTTON -------------------------------------- */
    .hdr-feedback {
      border: 1px solid var(--gold); color: var(--gold);
      font-family: 'Barlow Condensed', sans-serif; font-size: 12px;
      font-weight: 700; letter-spacing: 1px; padding: 5px 14px;
      border-radius: var(--r); transition: background .15s;
    }
    .hdr-feedback:hover { background: var(--gold); color: #000; }

    /* --- CHALLENGE BUTTON ------------------------------------- */
    .btn-challenge {
      background: transparent; border: 1px solid var(--gold); color: var(--gold);
      font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 700;
      letter-spacing: 1px; padding: 4px 12px; border-radius: 6px; white-space: nowrap;
      transition: background .15s;
    }
    .btn-challenge:hover { background: var(--gold); color: #000; }

    /* --- CHALLENGE ROW ----------------------------------------- */
    .challenge-row {
      display: flex; align-items: center; justify-content: space-between;
      padding: 12px 0; border-bottom: 1px solid var(--b1); flex-wrap: wrap; gap: 10px;
    }
    .challenge-row:last-child { border-bottom: none; }

    /* --- SMALL ACTION BUTTONS ---------------------------------- */
    .btn-sm-ok {
      background: transparent; border: 1px solid var(--ok); color: var(--ok);
      font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 700;
      letter-spacing: 1px; padding: 4px 12px; border-radius: 6px; transition: background .15s;
    }
    .btn-sm-ok:hover { background: var(--ok); color: #000; }

    .btn-sm-err {
      background: transparent; border: 1px solid var(--err); color: var(--err);
      font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 700;
      letter-spacing: 1px; padding: 4px 12px; border-radius: 6px; transition: background .15s;
    }
    .btn-sm-err:hover { background: var(--err); color: #fff; }

    /* --- ADMIN TABLE ------------------------------------------- */
    .table-wrap { background: var(--s2); border: 1px solid var(--b1); border-radius: var(--r); overflow: hidden; }
    table { width: 100%; border-collapse: collapse; font-size: 13px; }
    th { padding: 10px 16px; text-align: left; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--b1); }
    td { padding: 10px 16px; border-bottom: 1px solid var(--b1); }
    tr:last-child td { border-bottom: none; }

    /* --- PLAY PAGE -------------------------------------------- */
    .play-filters {
      display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px;
    }
    .play-filters .inp { margin-bottom: 0; }

    .plat-icon {
      font-size: 14px; cursor: default;
    }

    /* --- HDR FEEDBACK ----------------------------------------- */
    .hdr-feedback {
      border: 1px solid var(--b1); padding: 5px 12px; border-radius: var(--r);
      font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--muted);
    }
    .hdr-feedback:hover { border-color: var(--gold); color: var(--text); }

    /* ============================================================
       LANDING PAGE
    ============================================================ */

    #invite-gate {
      min-height: 100vh;
      background: var(--bg);
      overflow-y: auto;
      display: block !important; /* override hidden when shown */
    }
    #invite-gate.hidden { display: none !important; }

    /* --- LP NAV ------------------------------------------------ */
    .lp-nav {
      position: sticky; top: 0; z-index: 50;
      display: flex; align-items: center; justify-content: space-between;
      padding: 0 40px; height: 64px;
      background: rgba(10,10,10,.92); backdrop-filter: blur(8px);
      border-bottom: 1px solid var(--b1);
    }
    .lp-nav-logo {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 26px; font-weight: 800; letter-spacing: 4px; color: var(--gold);
    }
    .lp-nav-right { display: flex; align-items: center; gap: 14px; }
    .lp-alpha-badge {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 11px; font-weight: 700; letter-spacing: 2px;
      color: var(--gold); border: 1px solid var(--gold);
      padding: 3px 10px; border-radius: 4px; opacity: .8;
    }

    /* --- HERO -------------------------------------------------- */
    .lp-hero {
      position: relative; overflow: hidden;
      padding: 100px 40px 80px; text-align: center;
      min-height: 560px; display: flex; flex-direction: column;
      align-items: center; justify-content: center; gap: 32px;
    }

    /* Animated grid background */
    .lp-hero-grid {
      position: absolute; inset: 0; z-index: 0;
      background-image:
        linear-gradient(rgba(245,196,0,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(245,196,0,.04) 1px, transparent 1px);
      background-size: 48px 48px;
      mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 100%);
    }

    .lp-hero-content { position: relative; z-index: 1; max-width: 700px; }

    .lp-eyebrow {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 12px; font-weight: 700; letter-spacing: 4px;
      color: var(--gold); margin-bottom: 20px; opacity: .8;
    }

    .lp-title {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: clamp(64px, 10vw, 110px); font-weight: 800;
      line-height: .92; letter-spacing: 2px;
      color: var(--text); margin-bottom: 24px;
    }

    .lp-title::after {
      content: '';
      display: block; width: 60px; height: 4px;
      background: var(--gold); margin: 20px auto 0;
    }

    .lp-subtitle {
      font-size: 16px; color: #b8b8b8; line-height: 1.7;
      max-width: 520px; margin: 0 auto 32px;
    }

    .lp-hero-cta { display: flex; flex-direction: column; align-items: center; gap: 12px; }
    .lp-code-note { font-size: 11px; color: var(--muted); letter-spacing: 1px; }

    .lp-hero-stats {
      position: relative; z-index: 1;
      display: flex; align-items: center; gap: 0;
      background: var(--s2); border: 1px solid var(--b1);
      border-radius: 12px; padding: 20px 36px; gap: 36px;
    }
    .lp-hero-stat { text-align: center; }
    .lp-hero-stat-val {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 28px; font-weight: 800; color: var(--gold);
      display: block;
    }
    .lp-hero-stat-label { font-size: 11px; color: var(--muted); letter-spacing: 1px; display: block; margin-top: 2px; }
    .lp-hero-stat-div { width: 1px; height: 40px; background: var(--b1); }

    /* --- SECTIONS ---------------------------------------------- */
    .lp-section { padding: 80px 40px; }
    .lp-section-inner { max-width: 960px; margin: 0 auto; }
    .lp-section-label {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 11px; font-weight: 700; letter-spacing: 4px;
      color: var(--gold); margin-bottom: 12px; opacity: .8;
    }
    .lp-section-title {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: clamp(32px, 5vw, 48px); font-weight: 800;
      line-height: 1.1; color: var(--text); margin-bottom: 32px;
    }
    .lp-body {
      color: #b8b8b8; font-size: 15px; line-height: 1.75;
      max-width: 620px; margin-bottom: 16px;
    }

    /* --- ORIGIN ------------------------------------------------ */
    .lp-origin { background: var(--s1); border-top: 1px solid var(--b1); border-bottom: 1px solid var(--b1); }
    .lp-origin-inner { max-width: 960px; margin: 0 auto; }
    .lp-origin-tag {
      display: inline-block; margin-top: 24px;
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 12px; font-weight: 700; letter-spacing: 2px;
      color: var(--gold); border: 1px solid rgba(245,196,0,.3);
      padding: 6px 14px; border-radius: 4px;
    }

    /* --- HOW IT WORKS ------------------------------------------ */
    .lp-steps {
      display: flex; align-items: flex-start; gap: 0;
      flex-wrap: wrap;
    }
    .lp-step {
      flex: 1; min-width: 220px;
      background: var(--s2); border: 1px solid var(--b1);
      border-radius: var(--r); padding: 28px 24px;
    }
    .lp-step-arrow {
      color: var(--gold); font-size: 24px; padding: 28px 12px 0;
      flex-shrink: 0; opacity: .5;
    }
    .lp-step-num {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 48px; font-weight: 800; color: var(--gold);
      opacity: .25; line-height: 1; margin-bottom: 12px;
    }
    .lp-step-title {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 16px; font-weight: 700; letter-spacing: 2px;
      color: var(--text); margin-bottom: 10px;
    }
    .lp-step-body { font-size: 13px; color: #b8b8b8; line-height: 1.65; }

    /* --- FEATURES ---------------------------------------------- */
    .lp-features-section { background: var(--s1); border-top: 1px solid var(--b1); border-bottom: 1px solid var(--b1); }
    .lp-features {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 16px;
    }
    .lp-feature {
      background: var(--bg); border: 1px solid var(--b1);
      border-radius: var(--r); padding: 24px;
      transition: border-color .2s;
    }
    .lp-feature:hover { border-color: rgba(245,196,0,.35); }
    .lp-feature-icon { font-size: 24px; margin-bottom: 12px; }
    .lp-feature-title {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 14px; font-weight: 700; letter-spacing: 2px;
      color: var(--text); margin-bottom: 8px;
    }
    .lp-feature-body { font-size: 13px; color: #b8b8b8; line-height: 1.65; }

    /* --- GAMES ------------------------------------------------- */
    .lp-games {
      display: flex; gap: 12px; flex-wrap: wrap;
    }
    .lp-game {
      flex: 1; min-width: 160px;
      border-radius: var(--r); padding: 22px 20px;
      border: 1px solid var(--b1);
    }
    .lp-game-active {
      background: rgba(245,196,0,.06);
      border-color: rgba(245,196,0,.4);
    }
    .lp-game-soon { background: var(--s2); opacity: .55; }
    .lp-game-name {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 15px; font-weight: 800; letter-spacing: 1px;
      color: var(--text); margin-bottom: 8px;
    }
    .lp-game-status {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 11px; font-weight: 700; letter-spacing: 2px;
      margin-bottom: 6px;
    }
    .lp-game-live  { color: var(--ok); }
    .lp-game-coming { color: var(--muted); }
    .lp-game-sub { font-size: 11px; color: var(--muted); }

    /* --- FINAL CTA --------------------------------------------- */
    .lp-cta-section { text-align: center; }
    .lp-cta-inner { max-width: 560px; margin: 0 auto; }
    .lp-cta-title {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 52px; font-weight: 800; letter-spacing: 1px;
      color: var(--text); margin-bottom: 16px;
    }
    .lp-cta-sub { color: #b8b8b8; font-size: 15px; line-height: 1.6; margin-bottom: 32px; }

    /* --- FOOTER ------------------------------------------------ */
    .lp-footer {
      border-top: 1px solid var(--b1); padding: 40px;
      text-align: center;
    }
    .lp-footer-logo {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 22px; font-weight: 800; letter-spacing: 4px;
      color: var(--gold); margin-bottom: 6px;
    }
    .lp-footer-sub { font-size: 11px; color: var(--muted); letter-spacing: 2px; margin-bottom: 8px; }
    .lp-footer-copy { font-size: 11px; color: var(--b1); }

    /* --- RESPONSIVE -------------------------------------------- */
    @media (max-width: 640px) {
      .lp-nav { padding: 0 20px; }
      .lp-hero { padding: 60px 20px 60px; }
      .lp-hero-stats { gap: 20px; padding: 16px 24px; flex-wrap: wrap; justify-content: center; }
      .lp-hero-stat-div { display: none; }
      .lp-section { padding: 60px 20px; }
      .lp-step-arrow { display: none; }
      .lp-footer { padding: 32px 20px; }
    }

    /* --- REQUEST ACCESS MODAL ---------------------------------- */
    #request-modal {
      position: fixed; inset: 0;
      background: rgba(0,0,0,.8); backdrop-filter: blur(4px);
      display: flex; align-items: center; justify-content: center; z-index: 96;
    }
    #request-modal textarea.inp { font-family: inherit; }
