/* ==========================================================================
   Matchday Pro — dark data-terminal theme (v3)
   Dense, probability-driven layout in the spirit of a quant sports
   terminal. Win probabilities, pick, and projected score are entered
   manually per match (Match.win_prob_home/draw/away, pick,
   proj_home/away_score) — no automated model or external API involved.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700;800&family=JetBrains+Mono:wght@500;600;700&display=swap');

:root {
    /* Surfaces -- dark, layered slate rather than pure black */
    --bg: #0a0f1a;
    --bg-panel: #101825;
    --bg-raised: #16202f;
    --bg-inset: #0d1420;
    --border: #233047;
    --border-bright: #34435f;

    /* Text */
    --text: #eef2f8;
    --text-muted: #8994ab;
    --text-faint: #5c6883;

    /* Brand */
    --green: #22c55e;
    --green-dim: #16a34a;
    --green-bg: rgba(34, 197, 94, 0.12);
    --gold: #f2b544;
    --gold-bg: rgba(242, 181, 68, 0.12);
    --blue: #4d9fef;
    --blue-bg: rgba(77, 159, 239, 0.12);
    --red: #f0554a;
    --red-bg: rgba(240, 85, 74, 0.12);

    --row-hover: #131c2b;

    --radius: 12px;
    --radius-sm: 8px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);

    --ring: 0 0 0 3px rgba(34, 197, 94, 0.28);

    --font-display: "Space Grotesk", system-ui, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;

    /* Legacy aliases so older component rules below keep working */
    --amber: var(--gold);
    --amber-light: var(--gold-bg);
    --green-light: var(--green-bg);
    --blue-light: var(--blue-bg);
    --red-light: var(--red-bg);
    --navy: var(--blue);
    --navy-light: var(--blue-bg);
    --header: var(--bg-panel);
    --header-text: var(--text);
    --header-bg: var(--bg-panel);
    --gold-dark: #b9840a;
    --border-dark: var(--border-bright);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

a {
    color: var(--green);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover {
    color: var(--link-hover);
}

::selection {
    background: rgba(34, 197, 94, 0.3);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}

::-webkit-scrollbar { height: 8px; width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 4px; }

/* ---------- Header ---------- */
.site-header {
    background: var(--bg-panel);
    color: var(--text);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.header-top {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    letter-spacing: -0.01em;
}
.logo::before {
    content: "MP";
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--green);
    color: #06210f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
}
.logo span {
    color: var(--green);
}
.logo:hover {
    color: var(--text);
}

.header-nav {
    display: none;
    align-items: center;
    gap: 1.4rem;
}
@media (min-width: 900px) {
    .header-nav { display: flex; }
}

.header-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.15s ease;
}
.header-nav a:hover {
    color: var(--text);
}
.header-nav a.active {
    color: var(--text);
}
.header-nav .vip-link {
    color: var(--gold);
    font-weight: 600;
}
.header-nav .vip-link:hover {
    color: var(--gold-hover);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.badge-vip {
    background: var(--gold);
    color: #241a00;
    padding: 0.2rem 0.55rem;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 4px;
    font-family: var(--font-mono);
}

/* ---------- Mobile nav toggle + drawer ---------- */
.nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    cursor: pointer;
}
.nav-toggle svg { width: 18px; height: 18px; }
@media (min-width: 900px) {
    .nav-toggle { display: none; }
}

.mobile-nav {
    display: none;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    background: var(--bg-panel);
    border-top: 1px solid transparent;
    transition: max-height 0.2s ease;
}
.mobile-nav.open {
    display: flex;
    max-height: 420px;
    border-top-color: var(--border);
}
.mobile-nav a,
.mobile-nav .mobile-nav-logout {
    padding: 0.85rem 1.25rem;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border);
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
    text-align: left;
    width: 100%;
    cursor: pointer;
}
.mobile-nav a.active { color: var(--text); font-weight: 700; }
.mobile-nav a.vip-link { color: var(--gold); font-weight: 700; }
.mobile-nav form { margin: 0; }
@media (min-width: 900px) {
    .mobile-nav { display: none !important; }
}

/* ---------- Day tabs (free/vip tips list day filter) ---------- */
.day-tabs-wrap {
    margin-bottom: 1.25rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.day-tabs-wrap::-webkit-scrollbar { display: none; }
.day-tabs {
    display: inline-flex;
    gap: 0.4rem;
    padding: 0.3rem;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
}
.day-tab {
    padding: 0.45rem 1rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}
.day-tab:hover {
    color: var(--text);
    background: var(--bg-raised);
}
.day-tab.is-active {
    background: var(--green);
    color: #06210f;
}

/* ---------- Sub-nav (on-page section jump links, real anchors — not
   fake dynamic filters we can't back without more view logic) ---------- */
.subnav {
    background: var(--overlay-bg);
    border-bottom: 1px solid var(--border);
}
.subnav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.subnav-inner::-webkit-scrollbar { display: none; }
.subnav a {
    padding: 0.7rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}
.subnav a:hover {
    color: var(--text);
}
.subnav a.subnav-active {
    color: var(--green);
    border-bottom-color: var(--green);
}

/* ---------- Messages ---------- */
.messages {
    max-width: 1280px;
    margin: 1.25rem auto 0;
    padding: 0 1.5rem;
}

.alert {
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid transparent;
}
.alert-success { background: var(--green-bg); border-color: rgba(34,197,94,0.3); color: var(--alert-success-text); }
.alert-error   { background: var(--red-bg);   border-color: rgba(240,85,74,0.3); color: var(--alert-error-text); }
.alert-info    { background: var(--blue-bg);  border-color: rgba(77,159,239,0.3); color: var(--alert-info-text); }

/* ---------- Layout ---------- */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.75rem 1.5rem 3rem;
    flex: 1;
    width: 100%;
}

.page-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

/* ---------- Dashboard shell (home page 3-column layout) ---------- */
.dash-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 1024px) {
    .dash-grid {
        grid-template-columns: 200px minmax(0, 1fr) 300px;
        align-items: start;
    }
}

.side-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.side-panel:hover {
    border-color: var(--border-bright);
    box-shadow: var(--shadow-md);
}
.side-panel + .side-panel {
    margin-top: 1.25rem;
}
.side-panel h3 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-faint);
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.side-panel h3 svg {
    color: var(--green);
    width: 14px;
    height: 14px;
}

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

/* League quick-nav (real counts, computed from today's matches) */
.league-list {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.85rem;
}
.league-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.6rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}
.league-list a:hover {
    background: var(--bg-raised);
    color: var(--text);
}
.league-list a.league-active {
    background: var(--green-bg);
    color: var(--green);
    font-weight: 600;
}
.league-list .count {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-faint);
}

/* ---------- Section headers ---------- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2rem 0 1rem;
    gap: 1rem;
}
.dash-grid .section-header:first-child,
.dash-main > .section-header:first-child {
    margin-top: 0;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.section-header h2 svg {
    color: var(--green);
    width: 18px;
    height: 18px;
}
.section-header .section-meta {
    font-size: 0.8rem;
    color: var(--text-faint);
}
.section-header .section-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--green);
}

/* ---------- Dense predictions table (league-grouped match rows) ---------- */
.pred-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.pred-head {
    display: grid;
    grid-template-columns: 2.2fr 2fr 0.9fr;
    gap: 0.5rem;
    padding: 0.75rem 1.1rem;
    background: var(--bg-inset);
    border-bottom: 1px solid var(--border);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-faint);
}
.pred-head .center { text-align: center; }

.league-group-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
}
.league-group-header .flag {
    background: var(--bg-inset);
}
.league-group-header .country {
    color: var(--text-faint);
    font-weight: 500;
}

.match-line {
    display: grid;
    grid-template-columns: 2.2fr 2fr 0.9fr;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-bottom: 1px solid var(--border);
    align-items: center;
    transition: background 0.12s ease;
    border-left: 2px solid transparent;
}
.match-line:last-child {
    border-bottom: none;
}
.match-line:hover {
    background: var(--row-hover);
    border-left-color: var(--green);
}

.match-fixture {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.match-fixture .kickoff {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-faint);
    width: 38px;
    flex-shrink: 0;
}
.match-fixture .teams {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}
.match-fixture .teams .home {
    font-weight: 600;
    font-size: 0.9rem;
}
.match-fixture .teams .away {
    color: var(--text-muted);
    font-size: 0.85rem;
}
.match-fixture .teams .away::before {
    content: "vs ";
    color: var(--text-faint);
    font-weight: 400;
}

.tip-cell {
    font-size: 0.85rem;
    color: var(--text);
}
.odds-cell {
    display: inline-block;
    justify-self: center;
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--green);
    background: var(--green-bg);
    border: 1px solid rgba(34, 197, 94, 0.4);
    border-radius: var(--radius-sm);
    padding: 0.15rem 0.55rem;
}

.pred-pending {
    grid-column: span 2;
    text-align: center;
    color: var(--text-faint);
    font-size: 0.8rem;
}

.vip-pick-link {
    color: var(--gold);
    font-weight: 600;
    text-decoration: none;
}
.vip-pick-link:hover { text-decoration: underline; }
.vip-lock {
    display: inline-block;
    justify-self: center;
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 0.75rem;
    color: var(--gold);
    background: var(--gold-bg);
    border: 1px solid rgba(242, 181, 68, 0.4);
    border-radius: var(--radius-sm);
    padding: 0.15rem 0.55rem;
}


/* ---------- Team / league cells (kept for tips_list / tip_detail) ---------- */
.league-cell {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.league-name {
    color: var(--text-muted);
}
.flag {
    min-width: 26px;
    height: 20px;
    padding: 0 5px;
    border-radius: 4px;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}
.match-teams {
    font-weight: 600;
    color: var(--text);
}
.match-time {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ---------- Tags / odds ---------- */
.prediction-tag {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.tag-green { background: var(--green-bg); color: var(--green); }
.tag-amber { background: var(--gold-bg); color: var(--gold); }

.odds-box {
    display: inline-block;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text);
    font-size: 0.85rem;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    padding: 0.25rem 0.6rem;
    border-radius: 5px;
}

.empty-cell {
    text-align: center;
    color: var(--text-faint);
    padding: 4rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}
.empty-cell::before {
    content: "";
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c6883' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}
.empty-cell .empty-title {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.95rem;
}
.empty-cell .empty-sub {
    font-size: 0.82rem;
    max-width: 320px;
    line-height: 1.5;
}

/* ---------- Pick cards (curated free/VIP picks in the sidebar) ---------- */
.pick-card {
    display: block;
    padding: 0.9rem;
    border-radius: var(--radius-sm);
    background: var(--bg-raised);
    border: 1px solid var(--border);
    margin-bottom: 0.7rem;
}
.pick-card:last-child { margin-bottom: 0; }
.pick-card .pick-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    color: var(--text-faint);
    margin-bottom: 0.4rem;
}
.pick-card .pick-match {
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 0.5rem;
}
.pick-card .pick-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pick-card.locked {
    position: relative;
}
.pick-card.locked .pick-match,
.pick-card.locked .odds-box {
    filter: blur(4px);
    user-select: none;
}
.pick-card.locked .lock-cta {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--scrim-bg);
    border-radius: var(--radius-sm);
}

.btn-lock {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--gold);
    color: #241a00;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
}
.btn-lock:hover {
    background: #f8cd7c;
    color: #241a00;
}

.disclaimer {
    font-size: 0.72rem;
    color: var(--text-faint);
    line-height: 1.6;
    padding: 0 0.25rem;
}

/* ---------- Data table (tips_list / tip_detail) ---------- */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-panel);
    font-size: 0.9rem;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}
.data-table th {
    background: var(--bg-inset);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 700;
    color: var(--text-faint);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}
.data-table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.data-table tbody tr {
    transition: background 0.12s ease;
    border-left: 2px solid transparent;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover {
    background: var(--row-hover);
    border-left-color: var(--green);
}
.data-table .center { text-align: center; }
.clickable-row { cursor: pointer; }

.vip-locked-row td { color: var(--text-faint); }
.vip-locked-row .match-teams,
.vip-locked-row .prediction-tag,
.vip-locked-row .odds-box {
    filter: blur(4px);
    opacity: 0.6;
    user-select: none;
}

/* ---------- Tip detail ---------- */
.tip-detail-layout {
    display: grid;
    gap: 1.5rem;
    max-width: 680px;
    margin: 0 auto;
}
.detail-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.panel-header {
    padding: 1.4rem 1.6rem;
    background: var(--bg-inset);
    border-bottom: 1px solid var(--border);
}
.panel-header h1 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
}
.panel-body { padding: 1.6rem; }

.detail-meta {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.4rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.detail-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-pill);
}
.detail-meta svg { color: var(--green); }

.leg-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}
.leg-info { display: flex; flex-direction: column; gap: 0.25rem; }
.leg-fixture-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.leg-odds {
    display: inline-flex;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text);
    background: var(--bg-inset);
    border: 1px solid var(--border);
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.88rem;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1;
}
.btn:active { transform: scale(0.98); }

.btn-green { background: var(--green); color: #06210f; box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.btn-green:hover { background: #4ade80; color: #06210f; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(34,197,94,0.28); }

.btn-outline-light {
    background: var(--bg-raised);
    color: var(--text);
    border: 1px solid var(--border-bright);
}
.btn-outline-light:hover { background: var(--bg-panel); border-color: var(--green); transform: translateY(-1px); }

.btn-gold { background: var(--gold); color: #241a00; box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.btn-gold:hover { background: #f8cd7c; color: #241a00; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(242,181,68,0.28); }

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-bright);
}
.btn-outline:hover { background: var(--bg-raised); }

/* ---------- Upgrade / pricing ---------- */
.upgrade-page {
    max-width: 640px;
    margin: 2.5rem auto;
    text-align: center;
}
.upgrade-page > h1 {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 700;
}
.upgrade-intro {
    color: var(--text-muted);
    margin: 0.75rem 0 2.25rem;
}
.pricing-row {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0;
}
.price-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.6rem;
    width: 235px;
    text-align: left;
    background: var(--bg-panel);
}
.price-card.featured {
    border-color: var(--green);
    box-shadow: var(--shadow-md);
    position: relative;
}
.price-card.featured::before {
    content: "MOST POPULAR";
    position: absolute;
    top: -11px;
    left: 16px;
    background: var(--green);
    color: #06210f;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
}
.price-card h3 { font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.price { font-family: var(--font-mono); font-size: 1.9rem; font-weight: 700; margin-bottom: 1rem; }
.price span { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; font-family: var(--font-body); }
.price-card ul { list-style: none; font-size: 0.87rem; color: var(--text-muted); }
.price-card ul li { padding: 0.35rem 0; padding-left: 1.4rem; position: relative; }
.price-card ul li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }

/* ---------- Auth ---------- */
.auth-box {
    max-width: 380px;
    margin: 3.5rem auto;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}
.auth-box h1 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: 0.4rem; }
.auth-intro { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.6rem; }
.auth-box form p { margin-bottom: 1rem; }
.auth-box label { display: block; font-size: 0.78rem; font-weight: 600; margin-bottom: 0.3rem; color: var(--text-muted); }
.auth-box input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-inset);
    color: var(--text);
}
.auth-box input:focus { outline: none; border-color: var(--green); box-shadow: var(--ring); }
.auth-box .btn { width: 100%; margin-top: 0.6rem; }
.auth-box .helptext,
.auth-box ul.errorlist { font-size: 0.78rem; color: var(--text-faint); list-style: none; margin-top: 0.25rem; }
.auth-box ul.errorlist { color: var(--red); font-weight: 600; }
.auth-switch { text-align: center; margin-top: 1.4rem; font-size: 0.87rem; color: var(--text-muted); }
.auth-switch a { font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 1.75rem 1.5rem;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-faint);
}

/* ---------- Live ticker ---------- */
.live-ticker {
    display: flex;
    align-items: center;
    background: var(--bg-inset);
    height: 36px;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}
.ticker-label {
    background: var(--red);
    color: #fff;
    padding: 0 1rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}
.ticker-label::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    animation: pulse 1.4s infinite;
}
.ticker-wrap { flex: 1; overflow: hidden; white-space: nowrap; }
.ticker-move { display: inline-block; animation: ticker 30s linear infinite; }
.ticker-item {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 0 1.75rem;
    border-right: 1px solid var(--border);
}
.live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    margin-left: 0.5rem;
    animation: pulse 1.5s infinite;
}
@keyframes ticker { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ---------- Tips ticker (home page only) ----------
   Reuses the live-ticker's visual language (mono font, bordered pills,
   scrolling marquee) but for today's free/VIP picks rather than live
   scores -- distinguished by a green "TIPS" label instead of red "LIVE"
   so the two never get visually confused if both are on screen. */
.tips-ticker {
    display: flex;
    align-items: center;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    height: 40px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.tips-ticker .ticker-label {
    background: var(--green);
    color: #06170d;
}
.tips-ticker .ticker-label::before { background: #06170d; }
.tips-ticker .ticker-move { animation-duration: 38s; }
.tips-ticker .ticker-item { display: inline-flex; align-items: center; gap: 0.5rem; }
.tips-ticker .ticker-item a { color: inherit; }
.tips-ticker .ticker-item a:hover { color: var(--text); }
.tips-ticker .odds-tag {
    font-weight: 700;
    color: var(--green);
}
.tips-ticker .vip-tag {
    font-weight: 700;
    color: var(--gold);
}
.tips-ticker:hover .ticker-move { animation-play-state: paused; }

/* ---------- Skeleton loader ---------- */
#page-loader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.loader-content { width: min(400px, 80vw); }
.skeleton {
    background: linear-gradient(90deg, var(--bg-raised) 25%, var(--border) 50%, var(--bg-raised) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 6px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-text { height: 14px; margin-bottom: 10px; }
.skeleton-title { height: 22px; width: 55%; margin-bottom: 14px; }

/* ---------- Error pages ---------- */
.error-page { display: flex; align-items: center; justify-content: center; padding: 5rem 1rem; }
.error-card {
    width: 100%;
    max-width: 460px;
    text-align: center;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.75rem 2rem;
}
.error-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    background: var(--gold-bg);
    padding: 0.35rem 0.8rem;
    border-radius: 5px;
}
.error-code {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 10vw, 5.5rem);
    font-weight: 800;
    margin: 1.1rem 0 0.4rem;
}
.error-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.error-text { color: var(--text-muted); line-height: 1.6; margin-bottom: 1.75rem; }
.error-actions { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .pred-head, .match-line {
        grid-template-columns: 1.6fr 1.6fr 0.7fr;
    }
    .header-top { padding: 0 1rem; }
    .container { padding: 1.25rem 1rem 2.5rem; }
    .page-title { font-size: 1.3rem; }
    .header-user span,
    .header-user > a[href*="password_change"] { display: none; }
    .header-user .badge-vip { margin-right: 0; }
    .section-header { margin: 1.5rem 0 0.85rem; flex-wrap: wrap; gap: 0.4rem; }
    .section-header h2 { font-size: 0.95rem; }
    .sticky-side { position: static; }
    .side-panel { padding: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
    .ticker-move, .live-dot, .skeleton, .ticker-label::before { animation: none; }
    .tips-ticker .ticker-wrap { overflow-x: auto; }
}