/* ==========================================================================
   GIVNI Play — design system
   Dark premium, playing-card motif.
   Player app: mobile-first. Admin: desktop console.
   ========================================================================== */

:root {
    --bg: #060910;
    --bg-soft: #0a101c;
    --panel: #0d1626;
    --panel-2: #121d32;
    --panel-3: #182642;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);
    --text: #f2f5fd;
    --muted: #94a1bb;
    --dim: #6c7a96;
    --gold: #e9b64b;
    --gold-2: #f8d98f;
    --gold-dim: rgba(233, 182, 75, 0.14);
    --red: #ff5d73;
    --red-dim: rgba(255, 93, 115, 0.14);
    --green: #2ed3a0;
    --green-dim: rgba(46, 211, 160, 0.14);
    --blue: #57a9ff;
    --blue-dim: rgba(87, 169, 255, 0.14);
    --violet: #9b8bfa;
    --violet-dim: rgba(155, 139, 250, 0.14);
    --radius-sm: 12px;
    --radius: 18px;
    --radius-lg: 26px;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.6);
    --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --display: "Fraunces", "Playfair Display", Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.theme-public {
    background:
        radial-gradient(1100px 600px at 15% -10%, rgba(233, 182, 75, 0.10), transparent 60%),
        radial-gradient(900px 500px at 95% 0%, rgba(155, 139, 250, 0.10), transparent 55%),
        radial-gradient(700px 500px at 50% 110%, rgba(46, 211, 160, 0.06), transparent 60%),
        var(--bg);
    min-height: 100vh;
}

.theme-public::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0 1px, transparent 1px 3px);
    opacity: 0.5;
    z-index: 0;
}

h1, h2, h3, h4, h5, h6, p {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

img, svg {
    display: block;
    max-width: 100%;
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

::selection {
    background: var(--gold);
    color: #10131b;
}

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 99px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.24); }

/* --------------------------------------------------------------- utilities */

.mono {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
}

.muted { color: var(--muted); }
.dim { color: var(--dim); }
.gold { color: var(--gold); }
.green { color: var(--green); }
.red { color: var(--red); }

.stars {
    color: var(--gold);
    letter-spacing: 2px;
}

/* ----------------------------------------------------------------- buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    white-space: nowrap;
    text-align: center;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
    background: linear-gradient(180deg, var(--gold-2), var(--gold));
    color: #17120a;
    box-shadow: 0 10px 28px rgba(233, 182, 75, 0.28);
}

.btn-primary:hover { box-shadow: 0 14px 34px rgba(233, 182, 75, 0.4); transform: translateY(-1px); }

.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--line-strong);
    color: var(--text);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); }

.btn-dark {
    background: #10131b;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.12);
}

.btn-sm { min-height: 34px; padding: 0 14px; font-size: 13px; }
.btn-xs { min-height: 28px; padding: 0 11px; font-size: 12px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-danger { background: rgba(255, 93, 115, 0.16); color: #ff9aa9; border-color: rgba(255, 93, 115, 0.3); }
.btn-danger:hover { background: rgba(255, 93, 115, 0.26); }

/* ------------------------------------------------------------------ badges */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid transparent;
    white-space: nowrap;
}

.badge-gold { background: var(--gold-dim); color: var(--gold-2); border-color: rgba(233, 182, 75, 0.25); }
.badge-green { background: var(--green-dim); color: var(--green); border-color: rgba(46, 211, 160, 0.25); }
.badge-red { background: var(--red-dim); color: #ff9aa9; border-color: rgba(255, 93, 115, 0.25); }
.badge-blue { background: var(--blue-dim); color: #9ccaff; border-color: rgba(87, 169, 255, 0.25); }
.badge-violet { background: var(--violet-dim); color: #c0b7ff; border-color: rgba(155, 139, 250, 0.25); }
.badge-muted { background: rgba(255, 255, 255, 0.06); color: var(--muted); border-color: var(--line); }

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 93, 115, 0.14);
    color: #ff9aa9;
    border: 1px solid rgba(255, 93, 115, 0.25);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 0 currentColor;
    animation: pulse 1.6s infinite;
}

/* ------------------------------------------------------------------ forms */

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 16px;
}

.field > label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.input,
.select,
textarea.input {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    border-radius: 13px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.input::placeholder { color: var(--dim); }

.input:focus,
.select:focus,
textarea.input:focus {
    border-color: rgba(233, 182, 75, 0.55);
    box-shadow: 0 0 0 3px rgba(233, 182, 75, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

.select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 36px;
}

.field-error {
    color: #ff9aa9;
    font-size: 12px;
}

.form-hint { color: var(--dim); font-size: 12px; }

.check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--muted);
    cursor: pointer;
}

.check input {
    width: 17px;
    height: 17px;
    accent-color: var(--gold);
}

/* ------------------------------------------------------------------ alerts */

.flash-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 18px 0;
    position: relative;
    z-index: 2;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 13.5px;
    border: 1px solid transparent;
    margin-bottom: 10px;
}

.alert-success { background: rgba(46, 211, 160, 0.10); border-color: rgba(46, 211, 160, 0.28); color: #8ef0cb; }
.alert-error, .alert-danger { background: rgba(255, 93, 115, 0.10); border-color: rgba(255, 93, 115, 0.28); color: #ffb1bc; }
.alert-info { background: rgba(87, 169, 255, 0.10); border-color: rgba(87, 169, 255, 0.28); color: #a9d3ff; }
.alert-warning { background: rgba(233, 182, 75, 0.10); border-color: rgba(233, 182, 75, 0.28); color: var(--gold-2); }

/* --------------------------------------------------------------- app shell */

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(6, 9, 16, 0.78);
    backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid var(--line);
}

.app-topbar__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, var(--gold-2), var(--gold));
    color: #16110a;
    font-size: 19px;
    box-shadow: 0 8px 22px rgba(233, 182, 75, 0.32);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-text strong {
    font-family: var(--display);
    font-size: 19px;
    letter-spacing: 0.02em;
}

.brand-text span {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--gold);
    margin-top: 3px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 14px;
}

.nav-links a {
    padding: 8px 13px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--muted);
    transition: color 0.16s ease, background 0.16s ease;
}

.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-links a.is-active { color: var(--text); background: rgba(255, 255, 255, 0.07); }

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.coin-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px 7px 8px;
    border-radius: 999px;
    background: rgba(233, 182, 75, 0.10);
    border: 1px solid rgba(233, 182, 75, 0.28);
    font-size: 13px;
    font-weight: 700;
    color: var(--gold-2);
    white-space: nowrap;
}

.coin-chip .coin {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, var(--gold-2), var(--gold));
    color: #3b2a08;
    font-size: 11px;
    font-weight: 900;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, #29384f, #182642);
    border: 1px solid var(--line-strong);
    font-size: 12px;
    font-weight: 800;
    color: var(--gold-2);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-user form { margin: 0; }

.app-main {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    padding: 22px 18px 110px;
}

.app-footer {
    border-top: 1px solid var(--line);
    padding: 26px 18px 34px;
    color: var(--dim);
    font-size: 12.5px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.app-footer .suits {
    color: var(--muted);
    letter-spacing: 6px;
    margin-bottom: 8px;
}

/* Mobile bottom tab bar */
.bottom-nav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    background: rgba(9, 14, 24, 0.94);
    backdrop-filter: blur(18px);
    border-top: 1px solid var(--line);
    padding: 7px 4px calc(7px + env(safe-area-inset-bottom, 0px));
    grid-template-columns: repeat(5, 1fr);
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 2px;
    color: var(--dim);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    border-radius: 12px;
}

.bottom-nav a svg { width: 21px; height: 21px; stroke-width: 1.7; }
.bottom-nav a.is-active { color: var(--gold); }
.bottom-nav a.is-active svg { filter: drop-shadow(0 0 6px rgba(233, 182, 75, 0.45)); }

/* ------------------------------------------------------------------- hero */

.hero {
    position: relative;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 34px;
    align-items: center;
    padding: 30px 0 38px;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 -1px 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.hero-title {
    font-family: var(--display);
    font-size: clamp(36px, 5.4vw, 62px);
    line-height: 1.02;
    letter-spacing: -0.02em;
    font-weight: 600;
    margin: 14px 0 16px;
}

.hero-title em {
    font-style: italic;
    color: var(--gold-2);
}

.hero-sub {
    color: var(--muted);
    font-size: 15.5px;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 24px;
    font-size: 12px;
    color: var(--dim);
}

.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }

.hero-art {
    position: relative;
    min-height: 300px;
    display: grid;
    place-items: center;
}

.hero-art::before {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(233, 182, 75, 0.18), transparent 65%);
    filter: blur(10px);
}

.card-fan {
    position: relative;
    width: 240px;
    height: 290px;
}

.card-fan .playing-card {
    position: absolute;
    width: 160px;
    height: 224px;
    top: 26px;
    left: 40px;
    transform-origin: bottom center;
    animation: float 7s ease-in-out infinite;
}

.card-fan .playing-card:nth-child(1) { transform: rotate(-15deg) translate(-56px, 12px); animation-delay: -1.4s; }
.card-fan .playing-card:nth-child(2) { transform: rotate(1deg); z-index: 2; }
.card-fan .playing-card:nth-child(3) { transform: rotate(16deg) translate(58px, 12px); animation-delay: -3.2s; }

/* ---------------------------------------------------------- playing cards */

.playing-card {
    position: relative;
    aspect-ratio: 2.5 / 3.5;
    border-radius: 14px;
    padding: 12px;
    background: linear-gradient(160deg, #fffdf7, #eee3cd);
    color: #141821;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.75);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.playing-card::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 9px;
    border: 1px solid rgba(20, 24, 33, 0.08);
    pointer-events: none;
}

.playing-card.red { color: #b32036; }

.pc-corner {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    font-family: var(--display);
    font-weight: 700;
    font-size: 18px;
}

.pc-corner span:last-child { font-size: 15px; margin-top: 1px; }

.pc-corner.bottom { transform: rotate(180deg); align-self: flex-end; }

.pc-center {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 46px;
    line-height: 1;
    opacity: 0.92;
}

.playing-card.sm { width: 56px; height: 78px; padding: 6px; border-radius: 9px; }
.playing-card.sm .pc-corner { font-size: 11px; }
.playing-card.sm .pc-corner span:last-child { font-size: 9px; }
.playing-card.sm .pc-center { font-size: 21px; }

.playing-card.back {
    background:
        repeating-linear-gradient(45deg, rgba(233, 182, 75, 0.12) 0 2px, transparent 2px 7px),
        linear-gradient(160deg, #17233a, #0c1322);
    border: 1px solid rgba(233, 182, 75, 0.3);
}

/* --------------------------------------------------------------- stat strip */

.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 8px 0 40px;
}

.stat {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
}

.stat b {
    display: block;
    font-family: var(--display);
    font-size: 27px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.stat span {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dim);
}

/* ---------------------------------------------------------------- sections */

.section { margin: 0 0 42px; }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--display);
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.section-sub {
    color: var(--dim);
    font-size: 13px;
    margin-top: 4px;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--gold);
    white-space: nowrap;
}

.link-arrow:hover { color: var(--gold-2); }

.rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(300px, 340px);
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

/* -------------------------------------------------------------- match card */

.match-card {
    position: relative;
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(255, 255, 255, 0.05), transparent 55%),
        linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.match-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }

.match-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--accent, var(--gold)), transparent);
    opacity: 0.85;
}

.match-card.sport-cricket { --accent: #2ed3a0; }
.match-card.sport-football { --accent: #57a9ff; }

.mc-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dim);
}

.mc-league { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.mc-league span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sport-glyph {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    font-size: 10px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--accent, var(--gold));
}

.mc-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    margin: 16px 0 14px;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    min-width: 0;
    text-align: center;
}

.team-badge {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #fff;
    background: linear-gradient(160deg, #2a3a55, #17233a);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.team-badge.away { background: linear-gradient(160deg, #43304f, #241a2f); }
.team-badge.cricket { background: linear-gradient(160deg, #1d4a3d, #102a23); }
.team-badge.football { background: linear-gradient(160deg, #243c62, #12203a); }

.team-name {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.mc-score {
    font-family: var(--display);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text);
    padding: 0 4px;
    text-align: center;
    min-width: 58px;
}

.mc-score small { display: block; font-family: var(--font); font-size: 9px; color: var(--dim); letter-spacing: 0.14em; text-transform: uppercase; margin-top: 2px; }

.mc-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-size: 11.5px;
    color: var(--dim);
}

.mc-foot strong { color: var(--text); font-weight: 600; }

.mc-countdown {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--gold-2);
    letter-spacing: 0.03em;
}

/* -------------------------------------------------------------- game cards */

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
}

.game-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border-radius: var(--radius);
    background:
        radial-gradient(90% 90% at 100% 0%, var(--accent-dim, rgba(233, 182, 75, 0.10)), transparent 60%),
        linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--line);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.game-card:hover { transform: translateY(-3px); border-color: var(--line-strong); }

.game-card .suit-watermark {
    position: absolute;
    right: -6px;
    bottom: -18px;
    font-size: 96px;
    line-height: 1;
    color: var(--accent, var(--gold));
    opacity: 0.07;
    pointer-events: none;
}

.game-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.game-name {
    font-family: var(--display);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.game-tagline {
    color: var(--dim);
    font-size: 12.5px;
    margin-top: 4px;
    max-width: 30ch;
}

.game-suit {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-size: 20px;
    color: var(--accent, var(--gold));
    background: var(--accent-dim, rgba(233, 182, 75, 0.12));
    border: 1px solid var(--line);
    flex: 0 0 auto;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 30px;
    height: 28px;
    padding: 0 8px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--muted);
}

.chip.suit-red { color: #ff8b9c; }
.chip.suit-black { color: #dbe4f6; }

.game-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.game-foot .draw-time { font-size: 11.5px; color: var(--dim); }
.game-foot .draw-time b { color: var(--gold-2); font-variant-numeric: tabular-nums; }

/* accent tokens */
.accent-gold { --accent: var(--gold); --accent-dim: rgba(233, 182, 75, 0.12); }
.accent-crimson { --accent: #ff6b7f; --accent-dim: rgba(255, 93, 115, 0.12); }
.accent-violet { --accent: var(--violet); --accent-dim: rgba(155, 139, 250, 0.12); }
.accent-rose { --accent: #ff8bb0; --accent-dim: rgba(255, 139, 176, 0.12); }
.accent-emerald { --accent: var(--green); --accent-dim: rgba(46, 211, 160, 0.12); }
.accent-azure { --accent: var(--blue); --accent-dim: rgba(87, 169, 255, 0.12); }

/* -------------------------------------------------------------- draw cards */

.draw-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 14px;
}

.draw-card {
    position: relative;
    padding: 18px;
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--line);
    overflow: hidden;
}

.draw-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent, var(--gold)), transparent);
    opacity: 0.65;
}

.draw-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.draw-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.draw-title .suit { color: var(--accent, var(--gold)); font-size: 17px; }
.draw-title strong { font-size: 14px; letter-spacing: 0.01em; }

.draw-clock {
    font-family: var(--display);
    font-size: 34px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    line-height: 1;
}

.draw-clock small { font-family: var(--font); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); display: block; margin-top: 5px; }

.draw-progress {
    height: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
    margin: 12px 0 13px;
}

.draw-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent, var(--gold)), var(--gold-2));
    transition: width 1s linear;
}

.draw-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.draw-meta { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--dim); }
.draw-meta b { color: var(--text); font-weight: 600; }

.draw-result {
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-face {
    width: 46px;
    height: 62px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 5px 4px;
    background: linear-gradient(160deg, #fffdf7, #eee3cd);
    color: #141821;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
    font-family: var(--display);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: -0.01em;
    line-height: 1;
    overflow: hidden;
}

.result-face > span:first-child {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-face.red { color: #b32036; }
.result-face .rf-suit { font-size: 15px; }
.result-face.bottom { transform: rotate(180deg); }

.draw-winner-pending {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    color: var(--dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ---------------------------------------------------------------- winners */

.winner-spotlight {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: center;
    padding: 20px;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(80% 120% at 0% 0%, rgba(233, 182, 75, 0.16), transparent 60%),
        linear-gradient(160deg, var(--panel-2), var(--panel));
    border: 1px solid rgba(233, 182, 75, 0.22);
    margin-bottom: 14px;
}

.winner-spotlight .big-card {
    width: 86px;
    height: 120px;
    border-radius: 11px;
    font-size: 16px;
}

.winner-spotlight .big-card .pc-center { font-size: 34px; }

.winner-spotlight h3 { font-family: var(--display); font-size: 24px; font-weight: 600; }
.winner-spotlight p { color: var(--muted); font-size: 13px; margin-top: 4px; }

.winner-list { display: flex; flex-direction: column; }

.winner-row {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.winner-row:last-child { border-bottom: 0; }

.winner-row .who { min-width: 0; }
.winner-row .who b { display: block; font-size: 13.5px; font-weight: 600; }
.winner-row .who span { display: block; font-size: 11.5px; color: var(--dim); margin-top: 1px; }

.winner-row .what { text-align: right; }
.winner-row .what b { display: block; font-family: var(--display); font-size: 17px; color: var(--gold-2); }
.winner-row .what span { font-size: 10.5px; color: var(--dim); }

/* ----------------------------------------------------------------- markets */

.market {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}

.market-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.market-head h3 { font-size: 14px; font-weight: 600; }
.market-head span { font-size: 11px; color: var(--dim); }

.picks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 8px;
}

.pick {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 11px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.pick:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.07); }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick .pick-label { font-size: 12.5px; font-weight: 600; }
.pick .pick-odds { font-size: 12px; font-weight: 700; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.pick.is-selected { border-color: rgba(233, 182, 75, 0.55); background: rgba(233, 182, 75, 0.10); box-shadow: 0 0 0 2px rgba(233, 182, 75, 0.10); }
.pick.is-locked { opacity: 0.65; cursor: not-allowed; }

.stake-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: end;
    margin-top: 12px;
}

.stake-quick { display: flex; gap: 6px; flex-wrap: wrap; }

.stake-chip {
    min-width: 46px;
    height: 30px;
    padding: 0 10px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
}

.stake-chip:hover { color: var(--text); border-color: var(--line-strong); }

.my-pick {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 11px;
    background: rgba(46, 211, 160, 0.08);
    border: 1px solid rgba(46, 211, 160, 0.22);
    font-size: 12px;
    color: #9cf0d3;
}

/* -------------------------------------------------------------- auth pages */

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    position: relative;
    z-index: 1;
}

.auth-aside {
    position: relative;
    padding: 54px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid var(--line);
    overflow: hidden;
}

.auth-aside::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    left: -160px;
    bottom: -220px;
    background: radial-gradient(circle, rgba(233, 182, 75, 0.16), transparent 65%);
}

.auth-aside .brand { margin-bottom: 40px; }

.auth-quote {
    font-family: var(--display);
    font-size: clamp(30px, 3.6vw, 46px);
    line-height: 1.08;
    letter-spacing: -0.02em;
    max-width: 15ch;
    position: relative;
    z-index: 1;
}

.auth-points { margin-top: 26px; display: grid; gap: 10px; position: relative; z-index: 1; }

.auth-point {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--muted);
}

.auth-point i {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(233, 182, 75, 0.12);
    color: var(--gold);
    font-style: normal;
    font-size: 11px;
    flex: 0 0 auto;
}

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.auth-card {
    width: 100%;
    max-width: 410px;
}

.auth-card h1 {
    font-family: var(--display);
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.auth-card > p {
    color: var(--muted);
    font-size: 13.5px;
    margin: 6px 0 24px;
}

.auth-switch {
    text-align: center;
    color: var(--dim);
    font-size: 13px;
    margin-top: 18px;
}

.auth-switch a { color: var(--gold); font-weight: 600; }

.auth-demo {
    margin-top: 20px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px dashed var(--line-strong);
    font-size: 11.5px;
    color: var(--dim);
    line-height: 1.6;
}

.auth-demo b { color: var(--muted); }

/* ------------------------------------------------------------- app-specific */

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin: 8px 0 22px;
}

.page-head h1 {
    font-family: var(--display);
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.page-head p { color: var(--dim); font-size: 13px; margin-top: 3px; }

.segmented {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
}

.segmented a {
    padding: 7px 13px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--dim);
}

.segmented a.is-active { background: rgba(255, 255, 255, 0.09); color: var(--text); }

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
}

.pick-list { display: flex; flex-direction: column; gap: 10px; }

.pick-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 15px 16px;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--line);
}

.pick-row .pr-main { min-width: 0; }
.pick-row .pr-league { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.pick-row .pr-match { font-size: 14px; font-weight: 600; margin: 3px 0 6px; }
.pick-row .pr-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11.5px; color: var(--dim); }
.pick-row .pr-meta b { color: var(--muted); font-weight: 600; }
.pick-row .pr-side { text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.pick-row .pr-return { font-family: var(--display); font-size: 19px; color: var(--gold-2); }

.balance-hero {
    position: relative;
    padding: 24px;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(90% 120% at 100% 0%, rgba(233, 182, 75, 0.22), transparent 60%),
        linear-gradient(150deg, #182642, #0d1626);
    border: 1px solid rgba(233, 182, 75, 0.24);
    overflow: hidden;
    margin-bottom: 18px;
}

.balance-hero .bh-label { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-2); }
.balance-hero .bh-value { font-family: var(--display); font-size: 44px; font-weight: 600; line-height: 1.1; margin: 6px 0 2px; }
.balance-hero .bh-value small { font-family: var(--font); font-size: 13px; color: var(--muted); font-weight: 500; }
.balance-hero .bh-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.balance-hero .bh-grid div { padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(255, 255, 255, 0.06); }
.balance-hero .bh-grid span { display: block; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.balance-hero .bh-grid b { font-size: 15px; font-weight: 700; }

.ledger { display: flex; flex-direction: column; }

.ledger-row {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.ledger-row:last-child { border-bottom: 0; }

.ledger-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
}

.ledger-icon.plus { color: var(--green); background: var(--green-dim); border-color: rgba(46, 211, 160, 0.22); }
.ledger-icon.minus { color: var(--red); background: var(--red-dim); border-color: rgba(255, 93, 115, 0.22); }

.ledger-row .lr-desc { font-size: 13px; font-weight: 500; }
.ledger-row .lr-date { font-size: 11px; color: var(--dim); margin-top: 1px; }
.ledger-row .lr-amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.ledger-row .lr-amount.plus { color: var(--green); }
.ledger-row .lr-amount.minus { color: #ff9aa9; }

.rank-row {
    display: grid;
    grid-template-columns: 30px 38px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.rank-row:last-child { border-bottom: 0; }
.rank-num { font-family: var(--display); font-size: 17px; color: var(--dim); text-align: center; }
.rank-row.top .rank-num { color: var(--gold); }
.rank-row .rr-name { font-size: 13.5px; font-weight: 600; }
.rank-row .rr-sub { font-size: 11px; color: var(--dim); }
.rank-row .rr-coins { font-weight: 700; color: var(--gold-2); font-variant-numeric: tabular-nums; }

.option-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 84px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    cursor: pointer;
}

.option-tile input { position: absolute; opacity: 0; }
.option-tile .ot-symbol { font-family: var(--display); font-size: 26px; font-weight: 700; line-height: 1; }
.option-tile .ot-label { font-size: 11px; font-weight: 600; color: var(--muted); }
.option-tile:hover { border-color: var(--line-strong); }
.option-tile.is-selected { border-color: rgba(233, 182, 75, 0.6); background: rgba(233, 182, 75, 0.1); }

/* empty state */
.empty {
    text-align: center;
    padding: 44px 20px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    color: var(--dim);
}

.empty .empty-icon { font-size: 30px; margin-bottom: 10px; color: var(--gold); opacity: 0.7; }
.empty h3 { font-family: var(--display); font-size: 20px; color: var(--text); margin-bottom: 5px; }
.empty p { font-size: 13px; }

/* --------------------------------------------------------------- pagination */

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: center;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 600;
}

.pagination a:hover { color: var(--text); border-color: var(--line-strong); }
.pagination .active span, .pagination span[aria-current="page"] { background: var(--gold); border-color: var(--gold); color: #17120a; }
.pagination .disabled span { opacity: 0.4; }

/* ==========================================================================
   ADMIN — desktop console
   ========================================================================== */

.theme-admin {
    background:
        radial-gradient(900px 480px at 100% -10%, rgba(233, 182, 75, 0.05), transparent 60%),
        #070b13;
    min-height: 100vh;
}

.admin-shell {
    display: grid;
    grid-template-columns: 262px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 262px;
    z-index: 70;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 14px;
    background: linear-gradient(180deg, #0a111d, #070b13);
    border-right: 1px solid var(--line);
    overflow-y: auto;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 18px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 8px;
}

.admin-brand .brand-mark { width: 36px; height: 36px; border-radius: 11px; }

.admin-brand .brand-text strong { font-size: 18px; }
.admin-brand .brand-text span { font-size: 8.5px; }

.admin-nav-label {
    padding: 14px 12px 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--dim);
}

.admin-nav { display: flex; flex-direction: column; gap: 2px; }

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 11px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--muted);
    border: 1px solid transparent;
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-nav a svg { width: 18px; height: 18px; stroke-width: 1.7; opacity: 0.85; }
.admin-nav a:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.admin-nav a.is-active { background: rgba(233, 182, 75, 0.10); color: var(--gold-2); border-color: rgba(233, 182, 75, 0.18); }
.admin-nav a.is-active svg { opacity: 1; }

.admin-nav .nav-count {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
}

.admin-sidebar-foot {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.admin-sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
}

.admin-sidebar-user .who { min-width: 0; }
.admin-sidebar-user .who b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-sidebar-user .who span { font-size: 10.5px; color: var(--dim); }

.admin-main {
    grid-column: 2;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 13px 26px;
    background: rgba(7, 11, 19, 0.82);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

.admin-topbar .crumbs { font-size: 12px; color: var(--dim); }
.admin-topbar .crumbs b { color: var(--text); font-weight: 600; }
.admin-topbar .top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.admin-content {
    padding: 26px;
    max-width: 1500px;
    width: 100%;
}

.admin-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.admin-page-head h1 {
    font-family: var(--display);
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.admin-page-head p { color: var(--dim); font-size: 13px; margin-top: 3px; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.stat-card {
    position: relative;
    padding: 18px;
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--line);
    overflow: hidden;
}

.stat-card .sc-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.stat-card .sc-value { font-family: var(--display); font-size: 32px; font-weight: 600; line-height: 1.1; margin: 8px 0 3px; }
.stat-card .sc-sub { font-size: 11.5px; color: var(--muted); }
.stat-card .sc-icon {
    position: absolute;
    right: 14px;
    top: 14px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    color: var(--gold);
}

.stat-card .sc-icon svg { width: 18px; height: 18px; stroke-width: 1.7; }
.stat-card.accent-green .sc-icon { color: var(--green); }
.stat-card.accent-blue .sc-icon { color: var(--blue); }
.stat-card.accent-violet .sc-icon { color: var(--violet); }
.stat-card.accent-red .sc-icon { color: var(--red); }

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 18px;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--line);
}

.panel-head h2 { font-size: 14px; font-weight: 600; letter-spacing: 0.01em; }
.panel-head p { font-size: 11.5px; color: var(--dim); margin-top: 2px; }
.panel-body { padding: 18px; }
.panel-body.flush { padding: 0; }
.panel-foot { padding: 12px 18px; border-top: 1px solid var(--line); }

.table-wrap { overflow-x: auto; }

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
    text-align: left;
    padding: 11px 14px;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dim);
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
    white-space: nowrap;
}
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .cell-main { font-weight: 600; }
.data-table .cell-sub { font-size: 11px; color: var(--dim); }

.table-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.mini-face {
    width: 30px;
    height: 40px;
    border-radius: 6px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 3px 2px;
    background: linear-gradient(160deg, #fffdf7, #eee3cd);
    color: #141821;
    font-family: var(--display);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1;
    overflow: hidden;
}

.mini-face > span:first-child {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-face.red { color: #b32036; }
.mini-face.bottom { transform: rotate(180deg); }

.inline-form { display: inline-flex; align-items: center; gap: 6px; }

.sport-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
    color: var(--muted);
}

.sport-dot i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.sport-dot.cricket i { background: var(--green); }

/* Bootstrap overrides so the existing admin screens inherit the dark shell */

.theme-admin .card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    box-shadow: none;
    margin-bottom: 18px;
    overflow: hidden;
}

.theme-admin .card:hover { transform: none; box-shadow: none; }
.theme-admin .card-header { background: transparent !important; border-bottom: 1px solid var(--line); color: var(--text); padding: 14px 18px; }
.theme-admin .card-body { padding: 18px; }
.theme-admin .card-footer { background: transparent; border-top: 1px solid var(--line); }
.theme-admin .card-title { color: var(--text); font-size: 14px; font-weight: 600; }

.theme-admin .page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 0 0 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.theme-admin .page-title { font-family: var(--display); font-size: 30px; font-weight: 600; color: var(--text); margin: 0; }
.theme-admin .breadcrumb { margin: 4px 0 0; font-size: 12px; }
.theme-admin .breadcrumb-item a { color: var(--dim); }
.theme-admin .breadcrumb-item.active { color: var(--muted); }
.theme-admin .breadcrumb-item + .breadcrumb-item::before { color: var(--dim); }

.theme-admin .table {
    color: var(--text);
    --bs-table-color: var(--text);
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--line);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.03);
    margin-bottom: 0;
    font-size: 13px;
}

.theme-admin .table > :not(caption) > * > * { background: transparent; color: var(--text); border-color: var(--line); padding: 11px 12px; }
.theme-admin .table thead th { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); font-weight: 700; border-bottom: 1px solid var(--line); }
.theme-admin .table-light { --bs-table-bg: rgba(255, 255, 255, 0.02); }
.theme-admin .table-striped > tbody > tr:nth-of-type(odd) > * { background: rgba(255, 255, 255, 0.015); }
.theme-admin .table-bordered > :not(caption) > * > * { border-color: var(--line); }

.theme-admin .form-control,
.theme-admin .form-select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    color: var(--text);
    min-height: 42px;
    font-size: 13px;
}

.theme-admin .form-control::placeholder { color: var(--dim); }
.theme-admin .form-control:focus,
.theme-admin .form-select:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(233, 182, 75, 0.5);
    box-shadow: 0 0 0 3px rgba(233, 182, 75, 0.12);
    color: var(--text);
}

.theme-admin .form-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); margin-bottom: 5px; }
.theme-admin .form-text, .theme-admin .text-muted { color: var(--muted) !important; }
.theme-admin .input-group-text { background: rgba(255, 255, 255, 0.05); border-color: var(--line-strong); color: var(--muted); }
.theme-admin .form-check-input { background-color: rgba(255, 255, 255, 0.08); border-color: var(--line-strong); }
.theme-admin .form-check-input:checked { background-color: var(--gold); border-color: var(--gold); }
.theme-admin .form-check-label { color: var(--muted); font-size: 13px; }
.theme-admin .custom-control-label { color: var(--muted); }

.theme-admin .btn { border-radius: 10px; font-size: 12.5px; font-weight: 600; min-height: 38px; }
.theme-admin .btn-primary { background: linear-gradient(180deg, var(--gold-2), var(--gold)); border-color: transparent; color: #17120a; box-shadow: 0 8px 20px rgba(233, 182, 75, 0.2); }
.theme-admin .btn-primary:hover { background: var(--gold-2); color: #17120a; }
.theme-admin .btn-secondary { background: rgba(255, 255, 255, 0.08); border-color: var(--line-strong); color: var(--text); }
.theme-admin .btn-success { background: rgba(46, 211, 160, 0.18); border-color: rgba(46, 211, 160, 0.3); color: #8ef0cb; }
.theme-admin .btn-danger { background: rgba(255, 93, 115, 0.16); border-color: rgba(255, 93, 115, 0.3); color: #ff9aa9; }
.theme-admin .btn-warning { background: rgba(233, 182, 75, 0.16); border-color: rgba(233, 182, 75, 0.3); color: var(--gold-2); }
.theme-admin .btn-info { background: rgba(87, 169, 255, 0.16); border-color: rgba(87, 169, 255, 0.3); color: #a9d3ff; }
.theme-admin .btn-light { background: rgba(255, 255, 255, 0.08); border-color: var(--line); color: var(--text); }
.theme-admin .btn-outline-secondary { border-color: var(--line-strong); color: var(--muted); }
.theme-admin .btn-outline-danger { border-color: rgba(255, 93, 115, 0.35); color: #ff9aa9; }
.theme-admin .btn-sm { min-height: 30px; padding: 0 10px; font-size: 11.5px; }

.theme-admin .alert { border-radius: 12px; font-size: 13px; }
.theme-admin .alert-success { background: rgba(46, 211, 160, 0.08); border-color: rgba(46, 211, 160, 0.25); color: #8ef0cb; }
.theme-admin .alert-danger { background: rgba(255, 93, 115, 0.08); border-color: rgba(255, 93, 115, 0.25); color: #ffb1bc; }
.theme-admin .alert-info { background: rgba(87, 169, 255, 0.08); border-color: rgba(87, 169, 255, 0.25); color: #a9d3ff; }
.theme-admin .alert-warning { background: rgba(233, 182, 75, 0.08); border-color: rgba(233, 182, 75, 0.25); color: var(--gold-2); }

.theme-admin .badge { border-radius: 7px; font-size: 10px; }
.theme-admin .badge.bg-success { background: rgba(46, 211, 160, 0.16) !important; color: #8ef0cb; }
.theme-admin .badge.bg-danger { background: rgba(255, 93, 115, 0.16) !important; color: #ff9aa9; }
.theme-admin .badge.bg-warning { background: rgba(233, 182, 75, 0.16) !important; color: var(--gold-2); }
.theme-admin .badge.bg-info { background: rgba(87, 169, 255, 0.16) !important; color: #a9d3ff; }
.theme-admin .badge.bg-primary { background: rgba(155, 139, 250, 0.16) !important; color: #c0b7ff; }
.theme-admin .badge.bg-secondary { background: rgba(255, 255, 255, 0.08) !important; color: var(--muted); }
.theme-admin .badge.bg-light { background: rgba(255, 255, 255, 0.06) !important; color: var(--muted); }

.theme-admin .bg-white { background: var(--panel) !important; }
.theme-admin .bg-light { background: rgba(255, 255, 255, 0.04) !important; }
.theme-admin .bg-primary { background: rgba(155, 139, 250, 0.14) !important; }
.theme-admin .bg-success { background: rgba(46, 211, 160, 0.14) !important; }
.theme-admin .bg-info { background: rgba(87, 169, 255, 0.14) !important; }
.theme-admin .bg-warning { background: rgba(233, 182, 75, 0.14) !important; }
.theme-admin .bg-danger { background: rgba(255, 93, 115, 0.14) !important; }
.theme-admin .border, .theme-admin .border-top, .theme-admin .border-bottom { border-color: var(--line) !important; }
.theme-admin .text-dark { color: var(--text) !important; }
.theme-admin .text-primary { color: #c0b7ff !important; }
.theme-admin .text-success { color: var(--green) !important; }
.theme-admin .text-info { color: #a9d3ff !important; }

.theme-admin .dropdown-menu { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.theme-admin .dropdown-item { color: var(--muted); font-size: 13px; }
.theme-admin .dropdown-item:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.theme-admin .dropdown-divider { border-color: var(--line); }

.theme-admin .dataTables_wrapper .dataTables_filter input,
.theme-admin .dataTables_wrapper .dataTables_length select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line-strong);
    color: var(--text);
    border-radius: 9px;
    padding: 5px 9px;
}

.theme-admin .dataTables_wrapper .dataTables_info,
.theme-admin .dataTables_wrapper .dataTables_length,
.theme-admin .dataTables_wrapper .dataTables_filter { color: var(--dim); font-size: 12px; }

.theme-admin .tooltip-inner { background: #1b2740; }
.theme-admin .tooltip.bs-tooltip-top .tooltip-arrow::before { border-top-color: #1b2740; }

/* Admin drawer toggle */
.admin-drawer-toggle { display: none; }

@media (max-width: 1080px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar { transform: translateX(-100%); transition: transform 0.24s ease; width: 262px; }
    .admin-sidebar.is-open { transform: translateX(0); box-shadow: 0 0 60px rgba(0, 0, 0, 0.6); }
    .admin-main { grid-column: 1; }
    .admin-drawer-toggle { display: inline-flex; }
    .admin-content { padding: 20px 16px; }
}

/* ==========================================================================
   Responsive — player app
   ========================================================================== */

@media (max-width: 860px) {
    .app-main { padding: 16px 14px 104px; }
    .app-topbar__inner { padding: 10px 14px; gap: 10px; }
    .nav-links { display: none; }
    .bottom-nav { display: grid; }
    .hero { grid-template-columns: 1fr; gap: 8px; padding: 18px 0 26px; }
    .hero-art { min-height: 240px; order: -1; }
    .hero-title { font-size: clamp(34px, 10vw, 46px); }
    .hero-sub { font-size: 14px; }
    .card-fan { width: 210px; height: 240px; }
    .card-fan .playing-card { width: 132px; height: 185px; left: 39px; }
    .card-fan .playing-card:nth-child(1) { transform: rotate(-14deg) translate(-44px, 10px); }
    .card-fan .playing-card:nth-child(3) { transform: rotate(15deg) translate(46px, 10px); }
    .stats-strip { grid-template-columns: repeat(2, 1fr); margin-bottom: 30px; }
    .stat b { font-size: 23px; }
    .section { margin-bottom: 32px; }
    .section-head { align-items: center; }
    .rail { grid-auto-columns: minmax(270px, 84vw); }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .auth-main { padding: 26px 18px 60px; align-items: flex-start; }
    .app-footer { padding-bottom: 100px; }
    .page-head { flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 2px; }
    .pick-row { grid-template-columns: 1fr; }
    .pick-row .pr-side { flex-direction: row; align-items: center; justify-content: space-between; }
    .balance-hero .bh-value { font-size: 38px; }
    .winner-spotlight { grid-template-columns: 70px 1fr; padding: 16px; }
    .winner-spotlight .big-card { width: 70px; height: 98px; }
    .winner-spotlight h3 { font-size: 20px; }
}

@media (max-width: 480px) {
    .brand-text strong { font-size: 17px; }
    .topbar-right .btn { padding: 0 13px; font-size: 12.5px; min-height: 38px; }
    .coin-chip { padding: 6px 10px 6px 6px; font-size: 12px; }
    .section-title { font-size: 23px; }
    .game-grid { grid-template-columns: 1fr; }
    .draw-grid { grid-template-columns: 1fr; }
    .market { padding: 14px; }
    .picks { grid-template-columns: repeat(2, 1fr); }
    .stake-row { grid-template-columns: 1fr; }
    .stake-row .btn { width: 100%; }
    .balance-hero .bh-grid { grid-template-columns: 1fr; }
    .hist-row { grid-template-columns: 1fr auto; }
}

/* --------------------------------------------------------------- layout helpers */

.icon-16 { width: 16px; height: 16px; }
.icon-18 { width: 18px; height: 18px; }
.icon-20 { width: 20px; height: 20px; }

.hide-sm { display: inline-flex; }

@media (max-width: 640px) {
    .hide-sm { display: none !important; }
}

.grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.grid-2-wide {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

@media (max-width: 640px) {
    .form-grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
}

.stack-14 { display: grid; gap: 14px; }
.stack-10 { display: grid; gap: 10px; }

.sticky-side { position: sticky; top: 84px; }

.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.section-tight { margin-bottom: 22px; }

.suit-spades, .suit-clubs { color: #dbe4f6; }
.suit-hearts, .suit-diamonds { color: #ff8b9c; }

.face-red { color: #b32036; }
.face-black { color: #141821; }

.option-tile .ot-symbol.red { color: #b32036; }
.option-tile .ot-symbol.black { color: #1b2230; }

.distribution { display: flex; flex-direction: column; gap: 7px; }

.distribution-row {
    display: grid;
    grid-template-columns: 28px 1fr 44px;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--dim);
}

.distribution-row b { color: var(--muted); font-weight: 600; text-align: right; }

.distribution-bar {
    height: 7px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.distribution-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(233, 182, 75, 0.5), var(--gold));
}

.mini-label {
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--dim);
}

.kv { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--dim); }
.kv b { font-weight: 600; }

.status-dot { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.status-dot i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.status-dot.is-live { color: #ff9aa9; }
.status-dot.is-live i { background: var(--red); animation: pulse 1.6s infinite; }
.status-dot.is-upcoming { color: var(--blue); }
.status-dot.is-upcoming i { background: var(--blue); }
.status-dot.is-completed { color: var(--dim); }

@media (max-width: 860px) {
    .grid-2, .grid-2-wide, .grid-3 { grid-template-columns: 1fr; }
    .sticky-side { position: static; }
}

/* --------------------------------------------------------------- animations */

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 93, 115, 0.55); }
    70% { box-shadow: 0 0 0 7px rgba(255, 93, 115, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 93, 115, 0); }
}

@keyframes float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -8px; }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-up { animation: fadeUp 0.45s ease both; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}