/* ==========================================================================
   AXOM V3 — "Midnight" (modern crypto casino)
   Loaded after axom-casino.css. That file keeps every component's structure;
   this one replaces the look: palette, type, the desktop sidebar shell, the
   hero, game cards, and the surfaces that carried hard-coded colours.
   Nothing here changes element IDs, data attributes or behaviour.
   To roll back: remove this stylesheet's <link> from index.html.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
    /* surfaces: deep navy-slate */
    --ink: #0a0f17;
    --s0: #070b11;
    --s1: #101823;
    --s2: #162130;
    --s3: #1d2a3c;
    --s4: #26364c;
    --line: rgba(148, 173, 214, 0.10);
    --line-2: rgba(148, 173, 214, 0.17);
    --line-3: rgba(148, 173, 214, 0.30);

    /* text */
    --text: #f2f6fb;
    --text-2: #a9b6c9;
    --text-3: #8191a8;

    /* one action colour: aqua, taken from the gem in the AXOM mark.
       The base sheet calls its action colour "gold"; those names are kept so
       every existing rule follows, and real gold lives in --au. */
    --gold: #2ee0c0;
    --gold-hi: #63efd6;
    --gold-lo: #1bc4a6;
    --gold-ink: #04241e;
    --gold-text: #5eead4;
    --gold-tint: rgba(46, 224, 192, 0.12);
    --accent-rgb: 46, 224, 192;
    --au: #f0c35a;
    --au-text: #f5d58a;
    --au-tint: rgba(240, 195, 90, 0.13);
    --teal: #6aa8ff;
    --teal-tint: rgba(106, 168, 255, 0.13);

    /* semantic */
    --ok: #4ade80;
    --pending: #7cb2ff;
    --warn: #fbb040;
    --fail: #ff6b74;
    --refund: #b7a4ff;
    --muted: #8f9db3;
    --focus: #7df3d8;

    /* type */
    --font-display: "Plus Jakarta Sans", "Geist", ui-sans-serif, system-ui, sans-serif;

    /* shape: a little tighter */
    --r-sm: 8px; --r-md: 10px; --r-lg: 14px; --r-xl: 18px;

    /* layout */
    --side-w: 0px;
    --top-h: 64px;
    --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 8px 24px rgba(0, 0, 0, 0.28);
    --shadow-2: 0 18px 48px rgba(0, 0, 0, 0.45);
}

/* ---------- base ---------- */
html, body { background: var(--ink); }
body {
    background:
        radial-gradient(1200px 520px at 78% -160px, rgba(46, 224, 192, 0.07), transparent 70%),
        radial-gradient(900px 480px at 8% -200px, rgba(106, 168, 255, 0.07), transparent 70%),
        var(--ink);
    background-attachment: fixed;
}
::selection { background: rgba(var(--accent-rgb), 0.32); }
.wordmark { font: 800 20px/1 var(--font-display); letter-spacing: 0.16em; font-stretch: normal; }
.view-head h1, .section-head h2, .feature-title, .login-panel h1 { font-stretch: normal; letter-spacing: -0.01em; }
.view-head h1 { font-weight: 800; }
.section-head h2 { font-size: 19px; font-weight: 700; }
.eyebrow { letter-spacing: 0.1em; }

/* ---------- top bar ---------- */
.topbar {
    background: rgba(10, 15, 23, 0.86);
    border-bottom: 1px solid var(--line);
    backdrop-filter: saturate(150%) blur(14px);
    -webkit-backdrop-filter: saturate(150%) blur(14px);
}
.topnav { display: none !important; }
.top-search { background: var(--s1); border-color: var(--line); border-radius: var(--r-pill); height: 42px; padding: 0 16px; }
.top-search:hover { background: var(--s2); }
.wallet-pill { background: var(--s0); border-color: var(--line-2); border-radius: var(--r-md); height: 42px; font-family: var(--font-mono); font-size: 14.5px; }
.wallet-pill:hover { background: var(--s1); }
.wallet-pill-label { font-family: var(--font-ui); }
.top-deposit { height: 42px; border-radius: var(--r-md); }
.icon-btn { border-radius: var(--r-md); }
.count-badge { background: var(--fail); color: #fff; }
.avatar { background: linear-gradient(140deg, var(--s4), var(--s2)); border-color: var(--line-3); }

/* ---------- buttons ---------- */
.btn { border-radius: var(--r-md); font-weight: 650; letter-spacing: 0.005em; }
.btn-primary {
    background: linear-gradient(180deg, var(--gold-hi), var(--gold) 58%, var(--gold-lo));
    color: var(--gold-ink);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 6px 18px rgba(var(--accent-rgb), 0.22);
}
.btn-primary:hover:not(:disabled) { background: linear-gradient(180deg, #8af5e2, var(--gold-hi) 58%, var(--gold)); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 8px 24px rgba(var(--accent-rgb), 0.32); }
.btn-primary:active:not(:disabled) { background: var(--gold-lo); box-shadow: none; }
.btn-primary:disabled { background: var(--s3); color: var(--text-3); box-shadow: none; }
.btn-secondary { background: var(--s2); border-color: var(--line-2); }
.btn-secondary:hover:not(:disabled) { background: var(--s3); }
.btn-lg { height: 50px; padding: 0 24px; font-size: 15.5px; }
.link-btn { font-weight: 600; }

/* ---------- chips, badges ---------- */
.chip { height: 38px; padding: 0 16px; background: var(--s1); border-color: var(--line); font-weight: 600; }
.chip:hover { background: var(--s2); }
.chip.active, .chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: #0a0f17; }
.chip.active svg, .chip[aria-pressed="true"] svg { color: #0a0f17; }
.badge { height: 21px; padding: 0 8px; border-radius: 6px; font-size: 10.5px; letter-spacing: 0.07em; }
.badge-hot { background: linear-gradient(135deg, #ff8a3c, #ff4d6d); color: #fff; }
.badge-new { background: var(--gold); color: var(--gold-ink); }
.badge-live { background: rgba(7, 11, 17, 0.78); color: #fff; padding-left: 20px; position: relative; }
.badge-live::before { content: ""; position: absolute; left: 8px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #ff4d6d; box-shadow: 0 0 0 3px rgba(255, 77, 109, 0.25); }
.badge-warn { background: rgba(7, 11, 17, 0.82); color: var(--warn); box-shadow: inset 0 0 0 1px rgba(251, 176, 64, 0.45); }
.badge-muted { background: rgba(7, 11, 17, 0.82); }
.chip-static.is-browser svg, .gcard-platform.is-browser svg { color: var(--gold); }

/* ---------- inputs ---------- */
.input, .search-field input, .sort-field select { background-color: var(--s0); border-color: var(--line-2); }
.input:focus, .search-field input:focus, .sort-field select:focus { border-color: rgba(var(--accent-rgb), 0.75); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.16); }
.search-field input { border-radius: var(--r-pill); background-color: var(--s1); border-color: var(--line); }
.sort-field select { border-radius: var(--r-pill); background-color: var(--s1); border-color: var(--line); height: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23a9b6c9' d='m7 10 5 5 5-5z'/%3E%3C/svg%3E"); }

/* ---------- panels ---------- */
.panel { background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 120px), var(--s1); border-color: var(--line); box-shadow: var(--shadow-1); }
.figure { background: var(--s2); }
.meter-bar { background: var(--s0); box-shadow: inset 0 0 0 1px var(--line); }
.meter-bar i { background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); }
.empty-state.signed-out { background: var(--s1); }
.balance-card, .dock-card { background: radial-gradient(100% 130% at 100% 0%, rgba(var(--accent-rgb), 0.13), transparent 62%), var(--s1) !important; }
.reward-card.is-ready { border-color: rgba(var(--accent-rgb), 0.55); }

/* ---------- hero ---------- */
.floor-title { display: none; }
.floor-head { margin-top: 0; }
.hero {
    position: relative; isolation: isolate; overflow: hidden;
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px;
    margin: 0 0 var(--s-5); padding: 22px 20px 20px;
    border-radius: var(--r-xl); border: 1px solid var(--line-2);
    background:
        radial-gradient(520px 300px at 92% 8%, rgba(46, 224, 192, 0.22), transparent 68%),
        radial-gradient(460px 320px at 0% 110%, rgba(106, 168, 255, 0.20), transparent 70%),
        linear-gradient(135deg, #12202f 0%, #0d1622 55%, #0b121c 100%);
    box-shadow: var(--shadow-1);
}
.hero::before { /* faint grid, fading out to the left */
    content: ""; position: absolute; inset: 0; z-index: -1;
    background-image: linear-gradient(rgba(148, 173, 214, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 173, 214, 0.07) 1px, transparent 1px);
    background-size: 36px 36px;
    -webkit-mask-image: linear-gradient(100deg, transparent 30%, #000 100%); mask-image: linear-gradient(100deg, transparent 30%, #000 100%);
}
.hero-copy { min-width: 0; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); background: rgba(var(--accent-rgb), 0.12); color: var(--gold-text); font: 700 11px/1 var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; }
.hero-kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.22); }
.hero-title { margin-top: 12px; font: 800 34px/1.04 var(--font-display); letter-spacing: -0.03em; }
.hero-title em { font-style: normal; color: transparent; background: linear-gradient(92deg, #f7dc8f, #f0c35a 55%, #d99a2b); -webkit-background-clip: text; background-clip: text; }
.hero-text { margin-top: 10px; max-width: 46ch; color: var(--text-2); font-size: 15px; line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hero-actions .btn { flex: 1 1 auto; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; color: var(--text-2); font-size: 13px; }
.hero-points li { display: inline-flex; align-items: center; gap: 7px; }
.hero-points svg { width: 15px; height: 15px; color: var(--gold); }
.hero-art { display: none; }

/* ---------- catalog ---------- */
.catalog-section { margin-bottom: var(--s-8); }
.section-sub { color: var(--text-3); }
.originals .section-sub svg { color: var(--gold); }
.resume { background: var(--s1); border-radius: var(--r-md); }
.resume-art { border-radius: 8px; }

/* ---------- game cards ---------- */
.gcard-link { border-radius: var(--r-lg); }
.gcard-art {
    border-radius: var(--r-lg);
    background: var(--s2);
    box-shadow: inset 0 0 0 1px var(--line), 0 6px 18px rgba(0, 0, 0, 0.28);
    transition: transform var(--t-card) var(--ease-out), box-shadow var(--t-card) var(--ease-out);
}
.gcard-art::before { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none;
    background: linear-gradient(180deg, rgba(7, 11, 17, 0) 55%, rgba(7, 11, 17, 0.55) 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); }
.gcard-art.is-wide::before { inset: 0; background: linear-gradient(180deg, rgba(7, 11, 17, 0) 55%, rgba(7, 11, 17, 0.55) 100%); filter: none; opacity: 1; z-index: 1; }
.gcard-art .badge { top: 9px; left: 9px; z-index: 2; }
.gcard-platform { z-index: 2; left: 9px; bottom: 9px; height: 23px; border-radius: 6px; background: rgba(7, 11, 17, 0.72); font-size: 11px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.gcard-body { padding: 10px 40px 0 2px; }
.gcard-name { font: 700 14.5px/1.3 var(--font-display); letter-spacing: -0.005em; }
.gcard-meta { color: var(--text-3); font-size: 12px; }
.gcard-fav { z-index: 3; }
.gcard-fav::before { background: rgba(7, 11, 17, 0.6); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.gcard-fav[aria-pressed="true"] { color: #ff5d7a; }
.gcard-info:hover { background: var(--s2); }
.gcard.is-maintenance .gcard-art img, .gcard.is-soon .gcard-art img { filter: grayscale(0.55) brightness(0.5); }
@media (hover: hover) and (pointer: fine) {
    .gcard:not(.is-soon) .gcard-link:hover .gcard-art { transform: translateY(-4px); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.55), 0 16px 34px rgba(0, 0, 0, 0.45), 0 0 0 4px rgba(var(--accent-rgb), 0.10); }
    .gcard:not(.is-soon) .gcard-link:hover .gcard-art img { transform: scale(1.05); }
    .gcard:not(.is-soon) .gcard-link:hover .gcard-name { color: var(--text); }
}
/* the featured original */
.gcard.is-spotlight .gcard-art { border-radius: var(--r-xl); }
.gcard.is-spotlight .gcard-art::before { background: none; }
.gcard.is-spotlight .gcard-body { border-radius: 0 0 var(--r-xl) var(--r-xl); background: linear-gradient(to bottom, transparent, rgba(7, 11, 17, 0.92) 58%); }
.gcard.is-spotlight .gcard-name { font: 800 30px/1.05 var(--font-display); letter-spacing: -0.02em; font-stretch: normal; }
.gcard.is-spotlight .gcard-meta { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: rgba(var(--accent-rgb), 0.16); color: var(--gold-text); font-weight: 600; font-family: var(--font-mono); font-size: 11.5px; }
.gcard.is-spotlight .gcard-info::before { background: rgba(7, 11, 17, 0.6); }

/* ---------- lobby panels ---------- */
.lobby-secondary { margin-top: var(--s-4); }
.win-avatar { background: linear-gradient(140deg, var(--s4), var(--s2)); }
.win-amt { font-family: var(--font-mono); }
.meter-figure, .dock-balance, .account-balance { font-family: var(--font-display); letter-spacing: -0.02em; }

/* ---------- tab bar (phones and tablets) ---------- */
.tabbar { background: rgba(10, 15, 23, 0.94); border-top: 1px solid var(--line-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.tabbar a { font-weight: 600; font-size: 11px; }
.tabbar a[aria-current="page"]::before { left: 34%; right: 34%; height: 3px; border-radius: 0 0 3px 3px; box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.7); }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); color: var(--text-3); }

/* ---------- overlays ---------- */
.modal-container { background: var(--s1); border-color: var(--line-2); box-shadow: var(--shadow-2); }
.subnav a[aria-current="page"] { border-bottom-color: var(--gold); }
.toast { box-shadow: var(--shadow-2); }

/* ---------- sign-in ---------- */
.login-gate { background:
    radial-gradient(900px 500px at 85% -10%, rgba(46, 224, 192, 0.14), transparent 70%),
    radial-gradient(700px 500px at 0% 110%, rgba(106, 168, 255, 0.14), transparent 70%),
    var(--ink); }
.login-art img { border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 10px 26px rgba(0, 0, 0, 0.4); }
.login-panel h1 { font-weight: 800; font-size: 32px; letter-spacing: -0.02em; }
.login-mark { width: 52px; height: 42px; }

/* ---------- sidebar (desktop) ---------- */
.side { display: none; }
@media (min-width: 700px) and (max-width: 1099px) {
    /* tablets keep the bottom tab bar: the top bar no longer carries navigation */
    :root { --tabbar-h: 60px; }
    .tabbar { display: grid; }
    #main { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + var(--s-8)); }
    .site-foot { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + var(--s-4)); }
}
@media (min-width: 700px) {
    .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; padding: 34px 36px; min-height: 300px; }
    .hero-title { font-size: 46px; }
    .hero-text { font-size: 16px; }
    .hero-actions .btn { flex: 0 0 auto; }
    .hero-art { display: block; position: relative; height: 240px; }
    .hero-art img { position: absolute; top: 50%; left: 50%; width: 46%; height: auto; max-width: none; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-xl); box-shadow: 0 22px 50px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
    .hero-art img:nth-child(1) { transform: translate(-112%, -44%) rotate(-9deg); width: 40%; filter: brightness(0.82); }
    .hero-art img:nth-child(3) { transform: translate(12%, -44%) rotate(9deg); width: 40%; filter: brightness(0.82); }
    .hero-art img:nth-child(2) { transform: translate(-50%, -52%); z-index: 1; }
    .section-head h2 { font-size: 21px; }
}
@media (min-width: 1100px) {
    :root { --side-w: 252px; --gutter: 28px; }
    #app { padding-left: var(--side-w); }
    .topbar .brand { display: none; }
    .top-search { display: inline-flex; visibility: visible !important; width: min(420px, 34vw); margin-left: 0; justify-content: flex-start; }
    .top-search span, .top-search kbd { display: inline; }
    .top-actions { margin-left: auto; }
    .side {
        position: fixed; z-index: 46; top: 0; bottom: 0; left: 0; width: var(--side-w);
        display: flex; flex-direction: column; gap: 4px;
        padding: 0 12px calc(14px + var(--safe-b)) calc(12px + var(--safe-l));
        background: linear-gradient(180deg, #0d141e, #0a0f17);
        border-right: 1px solid var(--line);
        overflow-y: auto; scrollbar-width: none;
    }
    .side::-webkit-scrollbar { display: none; }
    .side-brand { display: flex; align-items: center; gap: 10px; height: var(--top-h); padding: 0 10px; flex-shrink: 0; }
    .side-brand .brand-mark { width: 32px; height: 26px; }
    .side-nav { display: grid; gap: 2px; }
    .side-label { margin: 16px 12px 6px; font: 700 10.5px/1 var(--font-ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
    .side-link {
        position: relative; display: flex; align-items: center; gap: 12px; width: 100%;
        min-height: 42px; padding: 0 12px; border-radius: var(--r-md);
        color: var(--text-2); font-size: 14.5px; font-weight: 600; text-align: left;
        transition: background-color var(--t-press) var(--ease-out), color var(--t-press) var(--ease-out);
    }
    .side-link > svg:first-child { width: 20px; height: 20px; flex-shrink: 0; color: var(--text-3); transition: color var(--t-press) var(--ease-out); }
    .side-link > span:not(.count-badge):not(.side-meta) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .side-link:hover { background: var(--s1); color: var(--text); }
    .side-link:hover > svg:first-child { color: var(--text-2); }
    .side-link[aria-current="page"] { background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.16), rgba(var(--accent-rgb), 0.04)); color: var(--text); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.18); }
    .side-link[aria-current="page"] > svg:first-child { color: var(--gold); }
    .side-link[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.8); }
    .side-ext { width: 14px; height: 14px; color: var(--text-3); flex-shrink: 0; }
    .side-meta { font-size: 12px; font-weight: 500; color: var(--text-3); }
    .side-foot { margin-top: auto; padding: 16px 12px 0; font-size: 12px; color: var(--text-3); }
    .site-foot { padding-left: var(--gutter); padding-right: var(--gutter); }
    .hero { padding: 40px 44px; min-height: 320px; }
    .hero-title { font-size: 54px; }
    /* the wallet dock becomes a right rail on wide screens only */
    .floor-layout { grid-template-columns: minmax(0, 1fr); }
    .dock { display: none; }
}
@media (min-width: 1500px) {
    .floor-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s-8); }
    .dock { display: grid; }
    .dock-list { background: var(--s1); }
}
@media (max-width: 699px) {
    .gcard.is-spotlight .gcard-name { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
    .gcard-link:hover .gcard-art { transform: none !important; }
}

/* ---------- only show what is live ---------- */
/* The community wager meter is a dated event: its card and its Rewards tab appear only while a round runs or has just settled. */
.meter-card:not([data-state="active"]):not([data-state="settled"]) { display: none; }
body:not([data-meter="active"]):not([data-meter="settled"]) #rewardsTabs [data-tab="community"] { display: none; }

/* ---------- "More on AXOM" tiles ---------- */
.more-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.more-tile {
    display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; align-items: center;
    padding: 14px; text-align: left; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--s1);
    transition: border-color var(--t-press) var(--ease-out), background-color var(--t-press) var(--ease-out), transform var(--t-card) var(--ease-out);
}
.more-tile:hover { border-color: var(--line-3); background: var(--s2); transform: translateY(-2px); }
.more-icon { grid-row: 1 / 3; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(var(--accent-rgb), 0.13); color: var(--gold); }
.more-icon.is-gold { background: var(--au-tint); color: var(--au); }
.more-icon.is-blue { background: var(--teal-tint); color: var(--teal); }
.more-icon svg { width: 20px; height: 20px; }
.more-tile b { font: 700 14.5px/1.25 var(--font-display); align-self: end; }
.more-tile small { font-size: 12.5px; line-height: 1.35; color: var(--text-3); align-self: start; }
@media (max-width: 419px) { .more-tile { grid-template-columns: minmax(0, 1fr); } .more-icon { grid-row: auto; margin-bottom: 8px; } }
@media (min-width: 700px) { .more-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } .more-tile { padding: 18px; } }
@media (min-width: 1100px) {
    .lobby-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* the challenge button sits clear of the sidebar */
    .ax-challenge-fab { left: calc(var(--side-w) + 24px) !important; }
}
@media (min-width: 1360px) { .more-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } .more-tile { grid-template-columns: minmax(0, 1fr); } .more-icon { grid-row: auto; margin-bottom: 10px; } }
