/* =====================================================================
   ROYALE COMPETITIONS — design system
   Tokens extracted from the live benchmark (July 2026):
   bg #101010 · body Inter 17px · display Orbitron uppercase ·
   buttons Poppins 600 · primary CTA linear-gradient(91.39deg,
   #E1010B 11.24%, #9D0000 99.56%) r8 · ghost 1px #AEAEB2 r8 ·
   accent purple #892EFF · white price pill · red timer pill ·
   navy "ends" pill · grey-gradient cards r16
===================================================================== */
:root {
  --bg: #101010;
  --surface: #1a1c22;
  --surface-2: #24262e;
  --card-grad-a: #4e545e;
  --card-grad-b: #33363e;
  --border: #2e3038;
  --ghost-border: #aeaeb2;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, .7);
  --faint: rgba(255, 255, 255, .45);
  --red: #e1010b;
  --red-dark: #9d0000;
  --grad-primary: linear-gradient(91.39deg, #e1010b 11.24%, #9d0000 99.56%);
  --grad-hero: linear-gradient(115deg, #3b0aa8 0%, #892eff 38%, #b3123f 78%, #e1010b 100%);
  --grad-ends: linear-gradient(91deg, #2743e0 10%, #0e1b8c 95%);
  --purple: #892eff;
  --green: #21c15f;
  --radius: 16px;
  --radius-btn: 8px;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-ui: 'Poppins', 'Inter', sans-serif;
  --font-display: 'Orbitron', 'Poppins', sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 16px;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: none; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(16,16,16,.94); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo { font-family: var(--font-display); font-size: 19px; font-weight: 900; letter-spacing: 1px; white-space: nowrap; font-style: italic; text-transform: uppercase; line-height: 1; }
.logo em { display: block; font-style: normal; font-size: 9.5px; font-weight: 500; letter-spacing: 4.5px; color: var(--muted); }
.main-nav { display: flex; gap: 6px; flex: 1; }
.main-nav a { color: var(--muted); font-family: var(--font-ui); font-size: 14.5px; font-weight: 500; padding: 8px 14px; border-radius: var(--radius-btn); }
.main-nav a.active { background: var(--purple); color: #fff; }
.main-nav a:hover { color: #fff; }
.auth-buttons { display: flex; gap: 10px; align-items: center; }
.btn { border-radius: var(--radius-btn); font-family: var(--font-ui); font-weight: 600; font-size: 14px; transition: .15s; color: #fff; }
.btn-gold { background: var(--grad-primary); padding: 11px 22px; }
.btn-gold:hover { filter: brightness(1.15); }
.btn-ghost { background: transparent; border: 1px solid var(--ghost-border); padding: 10px 20px; }
.btn-ghost:hover { border-color: #fff; }
.btn-block { width: 100%; padding: 14px; font-size: 15px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.user-chip { font-size: 13px; color: var(--muted); }
.user-chip b { color: var(--text); }

/* ---- Category chips (Orbitron, outlined, uppercase) ---- */
.chip-bar { display: flex; gap: 4px; overflow-x: auto; padding: 20px 0 8px; scrollbar-width: none; border: 1px solid var(--border); border-radius: 10px; padding: 6px; margin-top: 20px; }
.chip-bar::-webkit-scrollbar { display: none; }
.chip {
  background: transparent; color: var(--muted); border: 1px solid transparent;
  padding: 9px 16px; border-radius: var(--radius-btn);
  font-family: var(--font-display); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .8px; white-space: nowrap;
}
.chip:hover { color: #fff; }
.chip.active { border-color: var(--ghost-border); color: #fff; }

/* ---- Hero (purple -> red gradient like benchmark banner) ---- */
.hero {
  margin: 20px 0 8px; border-radius: var(--radius); overflow: hidden; position: relative;
  background: var(--grad-hero); padding: 54px 40px; text-align: center;
}
.hero h1 { font-family: var(--font-display); font-size: clamp(24px, 4.2vw, 42px); line-height: 1.14; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; }
.hero h1 span { color: #fff; text-shadow: 0 2px 24px rgba(0,0,0,.4); }
.hero p { color: rgba(255,255,255,.85); margin: 14px auto 24px; max-width: 560px; font-size: 15px; }

/* ---- Cards grid ---- */
.section-title { font-family: var(--font-ui); font-size: 19px; font-weight: 700; margin: 32px 0 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,.5); }
.card-media { position: relative; aspect-ratio: 4/3; background: linear-gradient(160deg, var(--card-grad-a), var(--card-grad-b)); overflow: hidden; }
.card-media .ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 64px; }
.timer-pill {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  background: var(--grad-primary); color: #fff; font-family: var(--font-ui);
  font-weight: 700; font-size: 12.5px; padding: 6px 16px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(225,1,11,.45);
}
.timer-pill.ends { background: var(--grad-ends); box-shadow: 0 4px 14px rgba(39,67,224,.4); }
.price-badge {
  position: absolute; left: 12px; top: 12px; background: #fff; color: #101010;
  font-family: var(--font-ui); font-weight: 700; font-size: 14.5px; padding: 5px 14px; border-radius: 999px;
}
.members-badge {
  position: absolute; right: 12px; top: 12px; background: var(--purple); color: #fff;
  font-size: 10.5px; font-weight: 700; font-family: var(--font-ui); padding: 6px 10px; border-radius: 999px;
}
.card-body { padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; text-align: center; }
.card-title { font-family: var(--font-ui); font-size: 15.5px; font-weight: 600; line-height: 1.3; }
.card-sub { color: var(--muted); font-size: 13px; }
.card-footer { margin-top: auto; }
.enter-btn {
  background: var(--grad-primary); color: #fff; font-family: var(--font-ui);
  font-weight: 600; padding: 12px; border-radius: 6px; font-size: 14px; width: 100%; display: block;
}
.enter-btn:hover { filter: brightness(1.15); }
.countdown { font-size: 12.5px; color: var(--muted); font-weight: 600; font-family: var(--font-ui); }
.countdown.urgent { color: #ff5a60; }

/* ---- Sold bar ---- */
.sold-wrap { display: flex; flex-direction: column; gap: 4px; }
.sold-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); font-weight: 600; }
.sold-labels b { color: var(--green); }
.sold-bar { height: 9px; background: rgba(255,255,255,.09); border-radius: 999px; overflow: hidden; }
.sold-fill { height: 100%; background: var(--grad-primary); border-radius: 999px; transition: width .4s; }

/* ---- Detail ---- */
.detail { display: grid; grid-template-columns: 1.15fr .85fr; gap: 26px; margin-top: 24px; }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; } }
.detail-media { border-radius: var(--radius); overflow: hidden; background: linear-gradient(160deg, var(--card-grad-a), var(--card-grad-b)); aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; font-size: 100px; }
.buy-panel { background: var(--surface); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 16px; height: fit-content; }
.buy-panel h1 { font-family: var(--font-ui); font-size: 23px; font-weight: 700; line-height: 1.2; }
.buy-panel .price-badge { position: static; align-self: flex-start; }
.cash-alt { color: var(--muted); font-weight: 600; font-size: 14px; }
.bundles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bundle { background: var(--surface-2); border: 1px solid transparent; border-radius: 10px; padding: 10px; text-align: center; cursor: pointer; transition: .15s; }
.bundle:hover, .bundle.active { border-color: var(--red); }
.bundle .save { color: #ff4d55; font-family: var(--font-ui); font-weight: 700; font-size: 13px; }
.bundle .qty { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.qty-row { display: flex; align-items: center; gap: 12px; }
.qty-row input[type=range] { flex: 1; accent-color: var(--red); }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button { width: 34px; height: 34px; border-radius: 8px; background: var(--surface-2); color: var(--text); font-size: 18px; font-weight: 700; }
.stepper input { width: 76px; text-align: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 8px 4px; font-weight: 700; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px dashed var(--border); padding-top: 12px; }
.total-row .amount { font-family: var(--font-display); font-size: 25px; font-weight: 700; }
.total-row .save-note { color: var(--green); font-size: 12.5px; font-weight: 700; }
.detail-info { grid-column: 1 / -1; background: var(--surface); border-radius: var(--radius); padding: 26px; }
.detail-info h3 { font-family: var(--font-ui); margin-bottom: 10px; font-size: 17px; font-weight: 700; }
.detail-info p, .detail-info li { color: var(--muted); font-size: 14.5px; line-height: 1.65; }
.draw-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 12px; margin-top: 16px; }
.fact { background: var(--surface-2); border-radius: 10px; padding: 12px; }
.fact .k { font-size: 10.5px; color: var(--faint); font-family: var(--font-display); font-weight: 500; text-transform: uppercase; letter-spacing: .6px; }
.fact .v { font-weight: 600; margin-top: 4px; font-size: 14px; font-family: var(--font-ui); }

/* ---- Modals ---- */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.78); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 18px; }
.modal { background: var(--surface); border-radius: var(--radius); width: 100%; max-width: 440px; padding: 26px; position: relative; max-height: 92vh; overflow-y: auto; }
.modal h2 { font-family: var(--font-ui); font-size: 20px; font-weight: 700; margin-bottom: 16px; }
.modal .close { position: absolute; right: 14px; top: 12px; background: none; color: var(--muted); font-size: 22px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 5px; font-family: var(--font-ui); }
.field input, .field select { width: 100%; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); padding: 11px 12px; border-radius: var(--radius-btn); font-size: 14px; }
.field input:focus, .field select:focus { outline: none; border-color: var(--ghost-border); }
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tabs button { flex: 1; padding: 10px; border-radius: var(--radius-btn); background: var(--surface-2); color: var(--muted); font-family: var(--font-ui); font-weight: 600; }
.tabs button.active { background: var(--grad-primary); color: #fff; }
.error-box { background: rgba(225,1,11,.12); border: 1px solid var(--red); color: #ff9ba0; border-radius: var(--radius-btn); padding: 10px 12px; font-size: 13px; margin-bottom: 12px; }
.info-box { background: rgba(137,46,255,.12); border: 1px solid var(--purple); color: #cdaaff; border-radius: var(--radius-btn); padding: 12px; font-size: 13.5px; font-weight: 500; }
.gateway-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.gateway { display: flex; align-items: center; gap: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-btn); padding: 12px; cursor: pointer; font-family: var(--font-ui); font-weight: 600; font-size: 14px; }
.gateway.active { border-color: var(--red); }
.gateway .dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--faint); }
.gateway.active .dot { border-color: var(--red); background: var(--red); }
.checkout-summary { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; font-size: 13.5px; color: var(--muted); }
.checkout-summary .row { display: flex; justify-content: space-between; padding: 3px 0; }
.checkout-summary .row.total { color: var(--text); font-weight: 700; font-size: 16px; border-top: 1px dashed var(--border); margin-top: 6px; padding-top: 8px; font-family: var(--font-ui); }

/* ---- Result / tickets ---- */
.ticket-numbers { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; max-height: 150px; overflow-y: auto; }
.ticket-no { background: var(--surface-2); padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; font-family: var(--font-ui); }
.ticket-no.win { background: var(--grad-primary); color: #fff; }
.win-banner { text-align: center; padding: 18px 10px; }
.win-banner .big { font-size: 42px; }
.win-banner h3 { font-family: var(--font-display); color: #fff; font-size: 20px; margin: 10px 0 4px; text-transform: uppercase; }

/* ---- Account / winners ---- */
.panel { background: var(--surface); border-radius: var(--radius); padding: 22px; margin-top: 18px; }
.panel h3 { font-family: var(--font-ui); margin-bottom: 12px; font-size: 16px; font-weight: 700; }
.list-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.list-row:last-child { border-bottom: none; }
.list-row .muted { color: var(--muted); font-size: 12.5px; }
.balance-big { font-family: var(--font-display); font-size: 32px; font-weight: 700; }
.winner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 16px; }
.winner-card { background: var(--surface); border-radius: var(--radius); padding: 20px; text-align: center; }
.winner-card .avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(160deg, var(--card-grad-a), var(--card-grad-b)); margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.winner-card .name { font-family: var(--font-ui); font-weight: 700; }
.winner-card .prize { color: #ff4d55; font-size: 13px; font-weight: 600; margin-top: 4px; }
.winner-card .date { color: var(--faint); font-size: 12px; margin-top: 6px; }

/* ---- Steps / footer ---- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 18px 0 10px; }
.step { background: var(--surface); border-radius: var(--radius); padding: 24px; }
.step .num { width: 40px; height: 40px; border-radius: 50%; background: var(--grad-primary); color: #fff; font-family: var(--font-display); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 16px; margin-bottom: 12px; }
.step h4 { font-family: var(--font-ui); margin-bottom: 6px; font-weight: 600; }
.step p { color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.site-footer { border-top: 1px solid rgba(255,255,255,.07); margin-top: 56px; padding: 30px 0 40px; color: var(--muted); font-size: 13px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; }
.pay-marks { display: flex; gap: 8px; }
.pay-marks span { background: var(--surface); border-radius: 8px; padding: 7px 13px; font-family: var(--font-ui); font-weight: 600; font-size: 12px; }
.badge-18 { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--red); color: #ff4d55; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--surface); border: 1px solid var(--purple); color: var(--text); border-radius: 999px; padding: 12px 22px; font-family: var(--font-ui); font-weight: 600; font-size: 14px; z-index: 200; }
.empty { color: var(--muted); text-align: center; padding: 28px 0; font-size: 14px; }
.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: sp .8s linear infinite; vertical-align: -3px; }
@keyframes sp { to { transform: rotate(360deg); } }
@media (max-width: 760px) { .main-nav { display: none; } .hero { padding: 34px 22px; } }

/* ---- Spin wheel ---- */
.wheel-wrap { position: relative; width: 280px; height: 280px; margin: 0 auto; }
.wheel {
  width: 100%; height: 100%; border-radius: 50%;
  border: 6px solid #2e3038;
  background: conic-gradient(
    var(--red) 0 45deg, #24262e 45deg 90deg,
    var(--purple) 90deg 135deg, #24262e 135deg 180deg,
    var(--red-dark) 180deg 225deg, #24262e 225deg 270deg,
    var(--purple) 270deg 315deg, #16181d 315deg 360deg);
  position: relative;
}
.wheel-label {
  position: absolute; left: 50%; top: 50%; margin-left: -18px; margin-top: -10px;
  width: 36px; text-align: center;
  font-family: var(--font-display); font-size: 12px; font-weight: 700; color: #fff;
}
.pointer {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent;
  border-top: 20px solid #fff; z-index: 2; filter: drop-shadow(0 2px 4px rgba(0,0,0,.6));
}

/* ---- Club tiers ---- */
.tier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 18px; }
.tier-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 20px; display: flex; flex-direction: column; gap: 12px; }
.tier-card.popular { border-color: var(--purple); box-shadow: 0 0 24px rgba(137,46,255,.25); }
.tier-card .ribbon { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--purple); color: #fff; font-family: var(--font-display); font-size: 10.5px; letter-spacing: 1.5px; padding: 4px 14px; border-radius: 999px; }
.tier-name { font-family: var(--font-display); font-size: 15px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.tier-price { font-family: var(--font-ui); font-size: 30px; font-weight: 700; }
.tier-price span { font-size: 13px; color: var(--muted); font-weight: 500; }
.tier-list { list-style: none; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tier-list li { color: var(--muted); font-size: 13px; line-height: 1.45; padding-left: 16px; position: relative; }
.tier-list li::before { content: ""; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--purple); }

/* ---- FAQ accordion ---- */
.faq-list { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.faq-item { background: var(--surface); border-radius: 12px; overflow: hidden; border: 1px solid transparent; }
.faq-item.open { border-color: var(--border); }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: none; color: var(--text); font-family: var(--font-ui); font-weight: 600; font-size: 14.5px; text-align: left; padding: 16px 18px; }
.faq-q span { color: var(--muted); font-size: 18px; }
.faq-a { padding: 0 18px 16px; color: var(--muted); font-size: 14px; line-height: 1.65; }

/* ---- Misc ---- */
.month-nav { display: flex; align-items: center; gap: 14px; margin: 6px 0 16px; }
.month-label { font-family: var(--font-display); font-size: 14px; letter-spacing: 1px; text-transform: uppercase; }
.gift-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.toggle-row { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 13.5px; color: var(--muted); }
.toggle-row input { width: auto; accent-color: var(--red); }
.result-mark { width: 84px; height: 84px; border-radius: 50%; background: var(--grad-primary); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 1px; margin: 0 auto; color: #fff; }
.result-mark.neutral { background: var(--surface-2); }
.ph-cat { font-family: var(--font-display); letter-spacing: 4px; font-size: 14px; color: rgba(255,255,255,.4); text-transform: uppercase; }
