/* AuraX — public user site theme.
   Distinct from the admin dashboard: an "aurora" premium dark look with a
   violet→cyan accent, versus the admin's gold. */

:root {
    --bg: #0a0b12;
    --bg-elev: #12141f;
    --surface: #161927;
    --surface-2: #1c2032;
    --border: #262a3d;
    --border-soft: #1e2233;
    --text: #e8eaf2;
    --text-muted: #9aa0b8;
    --text-dim: #6b7192;
    --accent: #7c5cff;
    --accent-2: #22d3ee;
    --accent-grad: linear-gradient(120deg, #7c5cff 0%, #22d3ee 100%);
    --green: #34d399;
    --red: #f87171;
    --gold: #fbbf24;
    --radius: 14px;
    --shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.6);
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Space Grotesk', var(--font);
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }

/* Aurora background glow */
.aurora {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(60% 50% at 15% 0%, rgba(124, 92, 255, 0.18) 0%, transparent 60%),
        radial-gradient(50% 40% at 100% 10%, rgba(34, 211, 238, 0.12) 0%, transparent 55%),
        radial-gradient(80% 60% at 50% 120%, rgba(124, 92, 255, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

/* ── Top bar ─────────────────────────────────────────────── */
.topbar {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 14px 28px;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(10, 11, 18, 0.72);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 50;
}
.brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}
.brand span {
    background: var(--accent-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.topnav { display: flex; gap: 6px; }
.topnav a {
    padding: 7px 14px;
    border-radius: 9px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.92rem;
    transition: color 0.15s, background 0.15s;
}
.topnav a:hover { color: var(--text); background: var(--surface); }
.topnav a.active { color: var(--text); background: var(--surface-2); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.balance-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 6px 14px;
    border-radius: 11px;
    background: var(--surface);
    border: 1px solid var(--border);
    line-height: 1.2;
}
.balance-label { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); }
.balance-value { font-family: var(--font-mono); font-weight: 600; font-size: 1.02rem; }
.balance-bonus { font-size: 0.68rem; color: var(--gold); }
.user-menu { display: flex; align-items: center; gap: 12px; }
.user-name { font-weight: 500; font-size: 0.9rem; color: var(--text-muted); }
.logout { font-size: 0.85rem; color: var(--text-dim); }
.logout:hover { color: var(--red); }

/* ── Layout ──────────────────────────────────────────────── */
.content { max-width: 1120px; margin: 0 auto; padding: 36px 28px 80px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 28px; }
.page-head h1 { font-size: 1.7rem; }
.page-head .muted { margin-top: 4px; }

/* ── Cards & stats ───────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}
.balance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    position: relative;
    overflow: hidden;
}
.stat-card.featured { border-color: transparent; background: var(--surface); }
.stat-card.featured::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: var(--radius);
    background: var(--accent-grad);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.stat-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); }
.stat-value { font-family: var(--font-mono); font-size: 1.9rem; font-weight: 600; margin: 6px 0 2px; }
.stat-sub { font-size: 0.82rem; color: var(--text-muted); }
.placeholder-card { margin-top: 8px; }
.placeholder-card h3 { font-size: 1.05rem; margin-bottom: 8px; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.1s, filter 0.15s, background 0.15s;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent-grad); border-color: transparent; color: #0a0b12; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 12px; font-size: 0.82rem; }

/* ── Alerts ──────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: 10px; font-size: 0.9rem; margin-bottom: 16px; }
.alert-error { background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.3); color: #fca5a5; }

/* ── Login ───────────────────────────────────────────────── */
.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; max-width: 420px; padding: 24px; }
.login-card {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px 32px;
    text-align: center;
    box-shadow: var(--shadow);
}
.login-brand { font-family: var(--font-display); font-weight: 700; font-size: 2.2rem; letter-spacing: -0.02em; }
.login-brand span {
    background: var(--accent-grad);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.login-tagline { color: var(--text-muted); margin: 6px 0 28px; letter-spacing: 0.02em; }
.login-widget { display: flex; justify-content: center; min-height: 48px; }
.login-hint { color: var(--text-muted); font-size: 0.85rem; margin-top: 22px; line-height: 1.55; }
.login-footer { color: var(--text-dim); font-size: 0.78rem; }

/* ── Tables (used from M1b on) ───────────────────────────── */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; font-size: 0.9rem; }
thead th { color: var(--text-dim); font-weight: 600; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--border); }
tbody tr { border-bottom: 1px solid var(--border-soft); }
tbody tr:last-child { border-bottom: none; }
.text-right { text-align: right; }

/* ── Section titles, links, utilities ────────────────────── */
.section-title { font-size: 1.05rem; margin: 28px 0 14px; color: var(--text); }
.link { color: var(--accent-2); }
.link:hover { text-decoration: underline; }
.mb-24 { margin-bottom: 24px; }
.pick { font-weight: 600; }
.back-link { display: inline-block; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 18px; }
.back-link:hover { color: var(--text); }
.card-title { font-size: 0.98rem; margin-bottom: 14px; }

/* ── Badges ──────────────────────────────────────────────── */
.badge { display: inline-block; padding: 3px 9px; border-radius: 7px; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.badge-pending { background: rgba(251, 191, 36, 0.14); color: var(--gold); }
.badge-win { background: rgba(52, 211, 153, 0.14); color: var(--green); }
.badge-loss { background: rgba(248, 113, 113, 0.14); color: var(--red); }
.badge-void { background: rgba(154, 160, 184, 0.14); color: var(--text-muted); }
.badge-buy { background: rgba(52, 211, 153, 0.14); color: var(--green); }
.badge-sell { background: rgba(248, 113, 113, 0.14); color: var(--red); }

/* ── Empty states ────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state h3 { margin-bottom: 8px; }
.empty-state .btn { margin-top: 18px; }

/* ── Category chips ──────────────────────────────────────── */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chip { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font-size: 0.85rem; font-weight: 500; }
.chip:hover { color: var(--text); }
.chip.active { background: var(--surface-2); color: var(--text); border-color: var(--accent); }

/* ── Market grid & cards ─────────────────────────────────── */
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 8px; }
.market-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; transition: transform 0.12s, border-color 0.15s; }
.market-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.market-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.market-cat { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-2); font-weight: 600; }
.market-vol { font-size: 0.78rem; }
.market-title { font-size: 1.02rem; line-height: 1.35; margin-bottom: 14px; font-family: var(--font); font-weight: 600; }
.market-outcomes { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.outcome-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 10px; }
.outcome-label { font-size: 0.9rem; }
.outcome-pct { font-weight: 600; font-size: 0.9rem; }
.outcome-bar { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.outcome-bar span { display: block; height: 100%; background: var(--accent-grad); }
.outcome-bar.big { height: 8px; }
.market-foot { margin-top: 14px; font-size: 0.78rem; }

/* ── Market detail ───────────────────────────────────────── */
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.detail-main { display: flex; flex-direction: column; gap: 18px; }
.detail-head h1 { font-size: 1.5rem; margin: 8px 0; line-height: 1.25; }
.detail-desc { color: var(--text-muted); line-height: 1.6; }
.odds-list { display: flex; flex-direction: column; gap: 14px; }
.odds-row { display: grid; grid-template-columns: 120px 1fr 52px; align-items: center; gap: 12px; }
.odds-row .outcome-pct { text-align: right; }
.trade-feed { display: flex; flex-direction: column; }
.trade-feed-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border-soft); font-size: 0.88rem; }
.trade-feed-row:last-child { border-bottom: none; }
.trade-time { margin-left: auto; font-size: 0.8rem; }
.detail-aside { position: sticky; top: 84px; }
.trade-panel { padding: 20px; }
.ticket-outcomes { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.ticket-outcome { display: flex; justify-content: space-between; padding: 10px 12px; border-radius: 9px; background: var(--surface-2); font-size: 0.9rem; }

.pager { display: flex; gap: 10px; justify-content: center; margin-top: 24px; }

/* ── Order ticket ────────────────────────────────────────── */
.btn-block { width: 100%; justify-content: center; margin-top: 6px; }
.ticket-tabs { display: flex; gap: 4px; background: var(--surface-2); border-radius: 10px; padding: 4px; margin-bottom: 18px; }
.ticket-tab { flex: 1; padding: 8px; border: none; background: transparent; color: var(--text-muted); font-family: var(--font); font-weight: 600; font-size: 0.9rem; border-radius: 7px; cursor: pointer; }
.ticket-tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.tab-panel.hidden { display: none; }
.ticket-label { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); margin: 14px 0 8px; }
.ticket-max { border: none; background: var(--surface-2); color: var(--accent-2); font-size: 0.7rem; font-weight: 600; padding: 2px 8px; border-radius: 6px; cursor: pointer; text-transform: none; letter-spacing: 0; margin-left: 6px; }
.outcome-choice { display: flex; flex-direction: column; gap: 8px; }
.outcome-opt { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; transition: border-color 0.12s, background 0.12s; }
.outcome-opt:hover { border-color: var(--accent); }
.outcome-opt input { accent-color: var(--accent); }
.outcome-opt:has(input:checked) { border-color: var(--accent); background: rgba(124, 92, 255, 0.08); }
.oo-label { flex: 1; font-weight: 500; }
.oo-pct { color: var(--text-muted); font-size: 0.85rem; }
.ticket-input { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); font-family: var(--font-mono); font-size: 1.05rem; }
.ticket-input:focus { outline: none; border-color: var(--accent); }
.ticket-help { font-size: 0.76rem; color: var(--text-dim); margin-top: 8px; }
.quote-box:empty { display: none; }
.quote-box { margin: 14px 0 4px; }
.quote-lines { display: flex; flex-direction: column; gap: 7px; padding: 12px 14px; background: var(--surface-2); border-radius: 10px; font-size: 0.88rem; }
.quote-lines > div { display: flex; justify-content: space-between; }
.quote-lines span { color: var(--text-muted); }
.quote-error { padding: 11px 14px; border-radius: 10px; background: rgba(248,113,113,0.12); border: 1px solid rgba(248,113,113,0.3); color: #fca5a5; font-size: 0.85rem; margin-bottom: 14px; }

/* ── Fill confirmation ───────────────────────────────────── */
.fill-confirm { text-align: center; }
.fill-check { width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 50%; background: rgba(52,211,153,0.15); color: var(--green); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 700; }
.fill-lines { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: var(--surface-2); border-radius: 10px; margin: 14px 0; text-align: left; font-size: 0.9rem; }
.fill-lines > div { display: flex; justify-content: space-between; }
.fill-lines span { color: var(--text-muted); }

/* ── Wallet ──────────────────────────────────────────────── */
.wallet-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; margin-bottom: 8px; }
.small { font-size: 0.85rem; }
select.ticket-input { appearance: none; cursor: pointer; }
.addr-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.addr-row { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-elev); }
.addr-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.addr-value { display: flex; align-items: center; gap: 8px; }
.addr-value code { flex: 1; font-family: var(--font-mono); font-size: 0.8rem; word-break: break-all; color: var(--text-muted); }
.copy-btn { border: 1px solid var(--border); background: var(--surface-2); color: var(--accent-2); font-size: 0.74rem; font-weight: 600; padding: 4px 10px; border-radius: 7px; cursor: pointer; white-space: nowrap; }
.copy-btn:hover { border-color: var(--accent); }
.confirm-pending { text-align: center; padding: 16px 12px; background: var(--surface-2); border-radius: 10px; margin: 12px 0 4px; }
.confirm-icon { font-size: 1.7rem; margin-bottom: 6px; }

@media (max-width: 720px) {
    .wallet-cols { grid-template-columns: 1fr; }
}

/* ═══ Public landing (bolder marketing) ═══════════════════ */
.landing { overflow-x: hidden; }
.btn-lg { padding: 14px 26px; font-size: 1rem; border-radius: 12px; }

/* Hero */
.hero { max-width: 1120px; margin: 0 auto; padding: 72px 28px 48px; }
.hero-inner { max-width: 760px; }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; color: var(--accent-2); background: rgba(34,211,238,0.08); border: 1px solid rgba(34,211,238,0.2); padding: 6px 14px; border-radius: 999px; margin-bottom: 24px; }
.hero-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.5rem, 6.5vw, 4.4rem); line-height: 1.02; letter-spacing: -0.03em; }
.hero-title .grad { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--text-muted); line-height: 1.55; margin: 22px 0 32px; max-width: 620px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-trust { margin-top: 22px; font-size: 0.88rem; color: var(--text-dim); }

/* Sections + bleed bands */
.section { max-width: 1120px; margin: 0 auto; padding: 60px 28px; }
.bleed { border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.band-inner { max-width: 1120px; margin: 0 auto; padding: 60px 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 26px; }
.section-head h2 { font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -0.02em; }

/* Stats band */
.stats-band { background: linear-gradient(180deg, rgba(124,92,255,0.06), transparent); }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; padding-top: 44px; padding-bottom: 44px; }
.stat-tile { text-align: center; }
.stat-num { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 3.4vw, 2.3rem); background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-cap { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.step-n { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-grad); color: #0a0b12; font-family: var(--font-display); font-weight: 700; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.step h3 { font-size: 1.02rem; margin-bottom: 8px; }
.step p { font-size: 0.9rem; line-height: 1.5; }

/* Features */
.why-band { background: var(--bg-elev); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { padding: 22px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.feature-ico { font-size: 1.6rem; margin-bottom: 12px; }
.feature h3 { font-size: 1.02rem; margin-bottom: 8px; }
.feature p { font-size: 0.9rem; line-height: 1.55; }

/* CTA band */
.cta-band { background: linear-gradient(180deg, transparent, rgba(124,92,255,0.07)); }
.cta-inner { text-align: center; }
.cta-inner h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin-bottom: 12px; }
.cta-inner .muted { margin-bottom: 26px; }

/* Footer */
.footer { border-top: 1px solid var(--border-soft); }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 40px 28px 60px; text-align: center; }
.footer-brand { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.footer-brand span { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; margin: 18px 0; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--text); }
.footer-token { font-size: 0.78rem; margin-bottom: 16px; }
.footer-token code { font-family: var(--font-mono); word-break: break-all; }
.footer-disclaimer { font-size: 0.78rem; color: var(--text-dim); max-width: 640px; margin: 0 auto; line-height: 1.5; }

@media (max-width: 900px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .feature-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .stats-grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .detail-grid { grid-template-columns: 1fr; }
    .detail-aside { position: static; }
}
@media (max-width: 720px) {
    .topbar { gap: 16px; padding: 12px 16px; flex-wrap: wrap; }
    .topnav { order: 3; width: 100%; overflow-x: auto; }
    .content { padding: 24px 16px 60px; }
    .user-name { display: none; }
    .odds-row { grid-template-columns: 90px 1fr 46px; }
}
