/* BetAssist v2 — Full Design System */

:root, [data-theme="dark"] {
    --bg: #1a1b1e;
    --bg-card: #222327;
    --bg-card-hover: #2a2b30;
    --bg-surface: #2c2d32;
    --bg-surface2: #35363c;
    --text: #e8e9ed;
    --text-secondary: #9a9ba1;
    --text-muted: #62636a;
    --accent: #00d26a;
    --accent-dim: rgba(0, 210, 106, 0.15);
    --yellow: #ffc107;
    --yellow-dim: rgba(255, 193, 7, 0.15);
    --red: #ff4757;
    --red-dim: rgba(255, 71, 87, 0.15);
    --blue: #4a9eff;
    --blue-dim: rgba(74, 158, 255, 0.15);
    --border: #33343a;
    --radius: 12px;
    --radius-sm: 8px;
    --nav-height: 64px;
    --header-height: 52px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="light"] {
    --bg: #f5f2eb;
    --bg-card: #ffffff;
    --bg-card-hover: #f9f7f3;
    --bg-surface: #f0ede6;
    --bg-surface2: #e8e5de;
    --text: #2c2a26;
    --text-secondary: #6b6860;
    --text-muted: #9e9a92;
    --border: #d8d4cc;
}

[data-theme="brand"] {
    --bg: #0e1f14;
    --bg-card: #142a1c;
    --bg-card-hover: #1a3524;
    --bg-surface: #1c3828;
    --bg-surface2: #234530;
    --text: #e8f0e8;
    --text-secondary: #a3c2a3;
    --text-muted: #6a8d6a;
    --accent: #c8a84e;
    --accent-dim: rgba(200, 168, 78, 0.18);
    --yellow: #d4af37;
    --yellow-dim: rgba(212, 175, 55, 0.18);
    --red: #e05555;
    --red-dim: rgba(224, 85, 85, 0.15);
    --blue: #5aad8a;
    --blue-dim: rgba(90, 173, 138, 0.15);
    --border: #2a4a34;
}

/* ── Light green theme (светлая зелёная) ── */
[data-theme="light-green"] {
    --bg: #e8f5e9;
    --bg-card: #f1f8e9;
    --bg-card-hover: #f9fbe7;
    --bg-surface: #dcedc8;
    --bg-surface2: #c8e6c9;
    --text: #1b5e20;
    --text-secondary: #2e7d32;
    --text-muted: #4caf50;
    --accent: #2e7d32;
    --accent-dim: rgba(46, 125, 50, 0.15);
    --yellow: #8bc34a;
    --yellow-dim: rgba(139, 195, 74, 0.2);
    --red: #c62828;
    --red-dim: rgba(198, 40, 40, 0.12);
    --blue: #1b5e20;
    --blue-dim: rgba(27, 94, 32, 0.12);
    --border: #a5d6a7;
}

[data-theme="light"] .section-card {
    border: 1px solid var(--border);
}

[data-theme="light"] .matrix-cell {
    border: 1px solid var(--border);
}

[data-theme="light"] .matrix-cell--high {
    border: 1px solid rgba(0, 180, 90, 0.35);
    background: rgba(0, 180, 90, 0.08);
}

[data-theme="light"] .matrix-summary__item {
    border: 1px solid var(--border);
}

[data-theme="light"] .ens-pred-card,
[data-theme="light"] .anl-model {
    border: 1px solid var(--border);
}

[data-theme="light"] .match-card {
    border: 1px solid var(--border);
}

[data-theme="light"] .line-card,
[data-theme="light"] .line-item {
    border: 1px solid var(--border);
}

/* ── Light green theme overrides ── */
[data-theme="light-green"] .section-card,
[data-theme="light-green"] .matrix-cell,
[data-theme="light-green"] .matrix-summary__item,
[data-theme="light-green"] .ens-pred-card,
[data-theme="light-green"] .anl-model,
[data-theme="light-green"] .match-card,
[data-theme="light-green"] .line-card,
[data-theme="light-green"] .line-item {
    border: 1px solid var(--border);
}

[data-theme="light-green"] .matrix-cell--high {
    border: 1px solid rgba(46, 125, 50, 0.5);
    background: rgba(46, 125, 50, 0.12);
}

[data-theme="light-green"] .section-card__title {
    color: var(--accent);
}

/* ── Brand (green+gold) theme overrides ── */

[data-theme="brand"] .section-card {
    border: 1px solid var(--border);
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(20, 42, 28, 0.95) 100%);
}

[data-theme="brand"] .section-card__title {
    color: var(--accent);
}

[data-theme="brand"] .matrix-cell {
    border: 1px solid var(--border);
}

[data-theme="brand"] .matrix-cell--high {
    border: 1px solid rgba(200, 168, 78, 0.4);
    background: rgba(200, 168, 78, 0.1);
}

[data-theme="brand"] .matrix-summary__item {
    border: 1px solid var(--border);
}

[data-theme="brand"] .ens-pred-card,
[data-theme="brand"] .anl-model {
    border: 1px solid var(--border);
}

[data-theme="brand"] .match-card {
    border: 1px solid var(--border);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(26, 53, 36, 0.9) 100%);
}

[data-theme="brand"] .line-card,
[data-theme="brand"] .line-item {
    border: 1px solid var(--border);
}

[data-theme="brand"] .nav {
    background: rgba(14, 31, 20, 0.96);
    border-top: 1px solid var(--border);
}

[data-theme="brand"] .header {
    background: rgba(14, 31, 20, 0.96);
    border-bottom: 1px solid var(--border);
}

[data-theme="brand"] .match-tab.active {
    color: var(--accent);
    border-color: var(--accent);
}

[data-theme="brand"] .stat-bar__label {
    color: var(--accent);
}

[data-theme="brand"] .line-cell.line-hot {
    background: rgba(200, 168, 78, 0.12);
    border-color: rgba(200, 168, 78, 0.35);
}

[data-theme="brand"] .line-cell.line-warm {
    background: rgba(90, 173, 138, 0.1);
    border-color: rgba(90, 173, 138, 0.3);
}

[data-theme="brand"] .ens-pred-card .ens-pred-card__prob {
    color: var(--accent);
}

[data-theme="brand"] .badge--positive {
    background: rgba(200, 168, 78, 0.15);
    color: #d4af37;
}

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

html, body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100dvh;
}

body {
    padding-bottom: calc(var(--nav-height) + var(--safe-bottom));
    padding-top: var(--header-height);
}

/* ── Header ──────────────────────────────────────────────────── */

.app-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
}

.theme-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    line-height: 0;
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
    opacity: 0.8;
    transition: opacity 0.15s;
}
.theme-btn:hover { opacity: 1; }
.theme-btn svg { display: block; }

.header-logo {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--accent);
}

.header-league {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 6px 12px;
    background: var(--bg-surface);
    border-radius: 20px;
    cursor: pointer;
    position: relative;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search-btn {
    background: var(--bg-surface);
    border: none;
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.header-search-btn:hover { background: var(--border); }

.search-bar {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0;
    background: var(--bg-card);
    padding: 8px 16px;
    z-index: 99;
    border-bottom: 1px solid var(--border);
    align-items: center;
    gap: 8px;
}
.search-bar.is-open { display: flex; }

.search-input {
    flex: 1;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
}
.search-input::placeholder { color: var(--text-secondary); }
.search-input:focus { border-color: var(--accent); }

.search-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
}

/* ── Team Name with EN subtitle ──────────────────────────────── */
.mc-team-name { display: flex; flex-direction: column; gap: 1px; overflow: hidden; }
.mc-team-name__ru { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-team-name__en { font-size: 10px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── League Dropdown ────────────────────────────────────────── */

.league-dropdown {
    position: fixed;
    top: var(--header-height);
    left: 8px;
    right: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    z-index: 150;
    max-height: 70vh;
    overflow-y: auto;
    padding: 6px 0;
    display: none;
}

.league-dropdown.is-open { display: block; }

.league-dropdown__section {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 10px 14px 4px;
}

.league-dropdown__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.1s;
    color: var(--text);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: var(--font);
}

.league-dropdown__item:hover,
.league-dropdown__item:active {
    background: var(--bg-surface);
}

.league-dropdown__item.active {
    color: var(--accent);
}

.league-dropdown__item.active .ld-check {
    color: var(--accent);
}

.league-dropdown__item--all {
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2px;
}

.ld-check {
    flex-shrink: 0;
    width: 18px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

.ld-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.ld-ru {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ld-en {
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.league-overlay {
    position: fixed;
    inset: 0;
    z-index: 149;
    display: none;
}

.league-overlay.is-open { display: block; }

/* ── Content ─────────────────────────────────────────────────── */

.content {
    padding: 12px;
    min-height: calc(100dvh - var(--header-height) - var(--nav-height));
}

/* ── Bottom Nav ──────────────────────────────────────────────── */

.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: calc(var(--nav-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    display: flex;
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font);
    cursor: pointer;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.nav-item.active { color: var(--accent); }
.nav-icon { font-size: 18px; }
.nav-label { font-size: 9px; font-weight: 500; }

/* ── Section Headers ─────────────────────────────────────────── */

.section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 16px 0 8px;
}

.section-title:first-child { margin-top: 0; }

.league-group-header {
    text-align: center;
    padding: 12px 4px 8px;
    margin-top: 14px;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.15s;
}
.league-group-header:active { background: rgba(255,255,255,0.04); }
.league-group-header:first-child { margin-top: 0; }
.league-group-header__name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}
.league-hints {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin-top: 5px;
}
.league-hint-badge {
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.round-divider {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    padding: 10px 0 6px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.round-divider:first-child { border-top: none; margin-top: 0; }

/* ── Section Card ────────────────────────────────────────────── */

.section-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 10px;
}

.section-card__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 12px;
}

.results-source-card {
    transition: box-shadow 0.2s, border-color 0.2s;
}
.results-source-card:hover {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}
.results-source-card--selected {
    box-shadow: 0 0 0 2px var(--accent);
    border-color: var(--accent);
}

.market-league-row.selected {
    background: rgba(255, 255, 255, 0.06);
    border-left: 3px solid var(--accent);
}

/* ── Match Card (Feed) ───────────────────────────────────────── */

.match-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 10px 14px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.match-card:active { background: var(--bg-card-hover); }

.match-card__row {
    display: flex;
    align-items: center;
    gap: 3px;
}

.mc-team {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.mc-team--home { text-align: right; }
.mc-team--away { text-align: left; }
.mc-team.winner { color: var(--accent); font-weight: 600; }

.mc-score {
    font-size: 14px;
    font-weight: 700;
    min-width: 36px;
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0 2px;
}

.mc-score--live { color: var(--red); }

.match-card__footer {
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.team-logo {
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
}

.team-logo-ph {
    border-radius: 50%;
    background: var(--bg-surface);
    flex-shrink: 0;
}

.team-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-name.winner { color: var(--accent); font-weight: 600; }

.team-score {
    font-size: 15px;
    font-weight: 700;
    min-width: 20px;
    text-align: right;
    color: var(--text);
}

.team-score.winner { color: var(--accent); }

.match-time {
    font-size: 11px;
    color: var(--text-secondary);
}

.match-status-live {
    font-size: 11px;
    color: var(--red);
    font-weight: 600;
    animation: pulse 1.5s infinite;
}

.match-status-ft {
    font-size: 11px;
    color: var(--text-muted);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ── Badge ───────────────────────────────────────────────────── */

.badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

.badge--green { background: var(--accent-dim); color: var(--accent); }
.badge--yellow { background: var(--yellow-dim); color: var(--yellow); }
.badge--red { background: var(--red-dim); color: var(--red); }
.badge--neutral { background: var(--bg-surface); color: var(--text-secondary); }

/* ── Match Hero (Detail) ─────────────────────────────────────── */

.match-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 0 8px;
}

.match-hero__team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
}

.match-hero__team span {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-hero__team img,
.match-hero__team .team-logo-ph {
    border-radius: 50%;
}

.match-hero__team-en {
    display: block;
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 2px;
}

.match-hero__center {
    text-align: center;
    flex-shrink: 0;
    min-width: 80px;
}

.match-hero__score {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: 4px;
    white-space: nowrap;
}

.match-hero__ht {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.match-hero__status {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.match-hero__info {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding: 0 16px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-secondary);
    background: none;
    border: none;
    font-family: var(--font);
    cursor: pointer;
    padding: 8px 0;
    margin-bottom: 4px;
    -webkit-tap-highlight-color: transparent;
}

/* ── Match Tabs ──────────────────────────────────────────────── */

.match-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-bottom: 1px solid var(--border);
    margin: 0 -12px;
    padding: 0 12px;
    position: sticky;
    top: var(--header-height);
    background: var(--bg);
    z-index: 50;
}

.match-tabs::-webkit-scrollbar { display: none; }

.match-tab {
    background: none;
    border: none;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    padding: 10px 14px;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.match-tab.active {
    color: var(--accent);
}

.match-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0; left: 14px; right: 14px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

/* ── Stat Bar ────────────────────────────────────────────────── */

.stat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.stat-row:last-child { margin-bottom: 0; }

.stat-value {
    font-size: 13px;
    font-weight: 600;
    min-width: 36px;
    color: var(--text);
}

.stat-value.home { text-align: right; }
.stat-value.away { text-align: left; }

.stat-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
}

.stat-bar {
    display: flex;
    height: 5px;
    background: var(--bg-surface);
    border-radius: 3px;
    overflow: hidden;
}

.stat-bar__fill { height: 100%; transition: width 0.5s ease; }
.stat-bar__home { background: var(--accent); border-radius: 3px 0 0 3px; }
.stat-bar__away { background: var(--blue); border-radius: 0 3px 3px 0; }

.stats-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 13px;
}

.stats-team-name { font-weight: 600; color: var(--text); }
.stats-vs { color: var(--text-muted); font-size: 11px; }

/* ── Forecast Grid ───────────────────────────────────────────── */

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.forecast-cell {
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    padding: 10px;
    text-align: center;
}

.forecast-cell.green { border-left: 3px solid var(--accent); }

.forecast-cell__label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.forecast-cell__value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

/* ── H2H ─────────────────────────────────────────────────────── */

.h2h-summary {
    display: flex;
    justify-content: space-around;
    margin-bottom: 12px;
}

.h2h-stat { text-align: center; }

.h2h-stat__value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
}

.h2h-stat__label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.h2h-bar {
    display: flex;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 14px;
}

.h2h-bar__fill { height: 100%; transition: width 0.5s ease; }
.h2h-bar__home { background: var(--accent); }
.h2h-bar__draw { background: var(--text-muted); }
.h2h-bar__away { background: var(--blue); }

.h2h-match {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}

.h2h-match:last-child { border-bottom: none; }

.h2h-match__date {
    color: var(--text-muted);
    min-width: 50px;
    font-size: 11px;
}

.h2h-match__home,
.h2h-match__away {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.h2h-match__home { text-align: right; }
.h2h-match__away { text-align: left; }
.h2h-match__home.winner,
.h2h-match__away.winner { color: var(--accent); font-weight: 600; }

.h2h-match__score {
    font-weight: 700;
    min-width: 30px;
    text-align: center;
}

/* ── Form ─────────────────────────────────────────────────────── */

.form-team {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.form-team__name {
    font-size: 13px;
    font-weight: 600;
}

.form-team__dots {
    display: flex;
    gap: 4px;
}

.form-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
}

.form-dot.W { background: var(--accent); }
.form-dot.D { background: var(--yellow); color: #000; }
.form-dot.L { background: var(--red); }

.form-matches { margin-top: 4px; }

.form-match {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border-radius: 6px;
    margin-bottom: 3px;
    font-size: 12px;
}

.form-match--win { background: rgba(0, 210, 106, 0.06); }
.form-match--draw { background: rgba(255, 193, 7, 0.06); }
.form-match--loss { background: rgba(255, 71, 87, 0.06); }

.form-match__result {
    font-weight: 700;
    width: 16px;
    text-align: center;
}

.form-match--win .form-match__result { color: var(--accent); }
.form-match--draw .form-match__result { color: var(--yellow); }
.form-match--loss .form-match__result { color: var(--red); }

.form-match__score {
    font-weight: 600;
    min-width: 28px;
}

.form-match__opp {
    flex: 1;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Timeline ────────────────────────────────────────────────── */

.timeline { position: relative; }

.tl-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.tl-item:last-child { border-bottom: none; }

.tl-minute {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 36px;
    text-align: right;
}

.tl-icon {
    font-size: 16px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.tl-content { flex: 1; }

.tl-player {
    font-size: 13px;
    font-weight: 500;
}

.tl-detail {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-top: 1px;
}

.tl-item--home .tl-player { color: var(--accent); }
.tl-item--away .tl-player { color: var(--blue); }

/* ── Lineups ─────────────────────────────────────────────────── */

.lineup-group-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    margin: 10px 0 6px;
}

.lineup-group-title:first-child { margin-top: 0; }

.lineup-player {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.lineup-player:last-child { border-bottom: none; }
.lineup-player--sub { opacity: 0.7; }

.lineup-number {
    font-weight: 700;
    color: var(--text-muted);
    min-width: 24px;
    text-align: center;
}

.lineup-name { flex: 1; font-weight: 500; }

.lineup-pos {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ── Player Stats ────────────────────────────────────────────── */

.player-group-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 12px 0 6px;
}

.player-group-title:first-child { margin-top: 0; }

.players-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.players-table th {
    color: var(--text-muted);
    font-weight: 500;
    text-align: left;
    padding: 6px 4px;
    border-bottom: 1px solid var(--border);
    font-size: 11px;
}

.players-table td {
    padding: 7px 4px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.players-table tr:last-child td { border-bottom: none; }

.player-name {
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rating-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.rating-high { background: var(--accent-dim); color: var(--accent); }
.rating-mid { background: var(--yellow-dim); color: var(--yellow); }
.rating-low { background: var(--bg-surface); color: var(--text-muted); }

/* ── Strategies ──────────────────────────────────────────────── */

.strategy-card {
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 8px;
}

.strategy-card:last-child { margin-bottom: 0; }

.strategy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.strategy-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.strategy-match {
    font-size: 12px;
    color: var(--text-secondary);
}

.strategy-selection {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
    margin-top: 2px;
}

.strategy-rationale {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.3;
}

.strategy-status {
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
}

.strategy-status--won { color: var(--accent); }
.strategy-status--lost { color: var(--red); }

.see-more {
    text-align: center;
    font-size: 12px;
    color: var(--accent);
    padding: 8px 0 0;
    cursor: pointer;
}

/* ── Standings ───────────────────────────────────────────────── */

.standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.standings-table th {
    color: var(--text-muted);
    font-weight: 500;
    text-align: left;
    padding: 8px 4px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: calc(var(--header-height));
    background: var(--bg);
    z-index: 10;
}

.standings-table td {
    padding: 10px 4px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.standings-table tr:last-child td { border-bottom: none; }

.standings-rank {
    font-weight: 600;
    color: var(--text-secondary);
    width: 24px;
}

.standings-team {
    display: flex;
    align-items: center;
    gap: 6px;
}

.standings-team img {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.standings-goals { color: var(--text-secondary); }
.standings-pts { font-weight: 700; }

.form-indicator {
    display: inline-flex;
    gap: 2px;
}

/* ── Profile ─────────────────────────────────────────────────── */

.profile-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    margin-bottom: 12px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 12px;
}

.profile-name { font-size: 16px; font-weight: 600; }
.profile-tier { font-size: 12px; color: var(--accent); margin-top: 4px; }

.tariff-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 8px;
    border: 1px solid var(--border);
    transition: border-color 0.2s;
}

.tariff-card:active { border-color: var(--accent); }

.tariff-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tariff-name { font-size: 15px; font-weight: 600; }
.tariff-price { font-size: 16px; font-weight: 700; color: var(--accent); }

.tariff-features {
    list-style: none;
    font-size: 12px;
    color: var(--text-secondary);
}

.tariff-features li { padding: 2px 0; }
.tariff-features li::before { content: '✓ '; color: var(--accent); }

.tariff-card.vip { opacity: 0.5; }
.tariff-card.vip .tariff-price { color: var(--text-muted); }
.tariff-unavailable { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* ── Loading ─────────────────────────────────────────────────── */

.skeleton {
    background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-card-hover) 50%, var(--bg-surface) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card { height: 70px; margin-bottom: 8px; }

/* ── Empty state ─────────────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state-text { font-size: 14px; }

/* ── Utility ─────────────────────────────────────────────────── */

.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }

/* ── Scrollbar ───────────────────────────────────────────────── */

::-webkit-scrollbar { width: 0; height: 0; }

/* ── Lines Grid ──────────────────────────────────────────────── */

.section-card__sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: -8px;
    margin-bottom: 12px;
}

.lines-group { margin-bottom: 14px; }
.lines-group:last-child { margin-bottom: 0; }

.lines-group__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.lines-group__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.line-cell {
    background: var(--bg-surface);
    border-radius: 6px;
    padding: 8px 4px;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    border: 1px solid transparent;
    -webkit-tap-highlight-color: transparent;
}

.line-cell:active { background: var(--bg-surface2); }

.line-cell.line-hot {
    border-color: var(--accent);
    background: rgba(0, 210, 106, 0.06);
}

.line-cell.line-warm {
    border-color: var(--yellow);
    background: rgba(255, 193, 7, 0.04);
}

.line-cell__code {
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.line-cell__prob {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.line-hot .line-cell__prob { color: var(--accent); }
.line-warm .line-cell__prob { color: var(--yellow); }

.line-cell__odds {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 1px;
}

/* ── Line Modal ──────────────────────────────────────────────── */

.line-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.line-modal-overlay.is-visible { opacity: 1; }

.line-modal {
    background: var(--bg-card);
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 480px;
    padding: 12px 10px 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.line-modal-overlay.is-visible .line-modal { transform: translateY(0); }

.line-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 16px;
}

.line-modal__close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 0 4px;
}

.line-modal__body { display: flex; gap: 6px; }

.line-modal__stat {
    flex: 1;
    text-align: center;
    padding: 12px 6px;
    background: var(--bg-surface);
    border-radius: 8px;
}

.line-modal__stat span {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.line-modal__stat strong {
    font-size: 18px;
    color: var(--text);
}

/* ── Odds Row ────────────────────────────────────────────────── */

.odds-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}

.odds-row:last-child { border-bottom: none; }

.odds-bk {
    min-width: 80px;
    color: var(--text-secondary);
    font-size: 11px;
}

.odds-values {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.odds-val {
    background: var(--bg-surface);
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.odds-val small {
    color: var(--text-muted);
    font-weight: 400;
}

/* ── Matrix ──────────────────────────────────────────────────── */

.matrix-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.matrix-legend__item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-dot--home { background: var(--accent); }
.legend-dot--away { background: var(--blue); }

.matrix-group { margin-bottom: 12px; }
.matrix-group:last-child { margin-bottom: 0; }

.matrix-group__title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.matrix-group__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.matrix-cell {
    background: var(--bg-surface);
    border-radius: 6px;
    padding: 8px 4px;
    text-align: center;
}

.matrix-cell--high {
    background: rgba(0, 210, 106, 0.08);
    border: 1px solid rgba(0, 210, 106, 0.2);
}

.matrix-cell__code {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.matrix-cell__val {
    font-size: 15px;
    font-weight: 700;
}

.matrix-cell--high .matrix-cell__val { color: var(--accent); }

.matrix-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.matrix-summary__item {
    background: var(--bg-surface);
    border-radius: 6px;
    padding: 10px;
    text-align: center;
}

.matrix-summary__item span {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.matrix-summary__item strong {
    font-size: 18px;
}

.matrix-comparison { margin-top: 14px; }

/* ── Fav Button ──────────────────────────────────────────────── */

.fav-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 2px 6px;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s;
}

.fav-btn.is-fav { color: var(--yellow); }

/* ── Strategy Catalog ────────────────────────────────────────── */

.strategy-catalog-card {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 6px;
    border-left: 3px solid var(--accent);
}

.strategy-catalog__name {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 3px;
}

.strategy-catalog__desc {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ── Knowledge Base ──────────────────────────────────────────── */

.kb-card {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 6px;
}

.kb-card__name {
    font-weight: 600;
    font-size: 12px;
    color: var(--accent);
    margin-bottom: 2px;
}

.kb-card__desc {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ── Live Section ────────────────────────────────────────────── */

.live-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--red);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.live-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--red);
    animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.5); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(255, 71, 87, 0); }
}

.match-card--live {
    border-left: 3px solid var(--red);
}

.match-card--live .team-score {
    color: var(--red);
    font-weight: 800;
}

.nav-icon--live {
    font-size: 12px;
    position: relative;
}

/* ── Charts Tab ──────────────────────────────────────────────── */

.chart-season-toggle { margin-bottom: 8px; text-align: center; }
.btn-season-toggle { font-size: 12px; padding: 4px 12px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-surface); color: var(--text-primary); cursor: pointer; }
.btn-season-toggle:hover:not(:disabled) { background: var(--surface-elevated, rgba(255,255,255,0.08)); }
.btn-season-toggle:disabled { opacity: 0.6; cursor: wait; }

.radar-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
    font-size: 11px;
}

.radar-legend__item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
}

.radar-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Season Detail Table ─────────────────────────────────────── */

.season-table-wrap {
    width: 100%;
}

.season-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -12px;
    padding: 0 12px;
}

.season-detail-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    white-space: nowrap;
}

.season-detail-table th,
.season-detail-table td {
    padding: 6px 8px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.season-detail-table th {
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    position: sticky;
    top: 0;
    background: var(--bg-card);
}

.season-detail-table td:first-child,
.season-detail-table th:first-child {
    text-align: left;
}

.st-venue {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    text-align: center;
    line-height: 14px;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    background: var(--text-muted);
}

.st-venue:contains('Д') { background: var(--accent); }

.st-result {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    text-align: center;
    line-height: 18px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
}

.res-w { background: #2ecc71; }
.res-d { background: #f39c12; }
.res-l { background: #e74c3c; }

.empty-hint {
    text-align: center;
    padding: 16px;
    color: var(--text-muted);
    font-size: 12px;
}

/* ── Responsive 400+ ─────────────────────────────────────────── */

@media (min-width: 400px) {
    .forecast-grid { grid-template-columns: repeat(4, 1fr); }
    .lines-group__grid { grid-template-columns: repeat(4, 1fr); }
    .matrix-group__grid { grid-template-columns: repeat(6, 1fr); }
    .matrix-summary { grid-template-columns: repeat(4, 1fr); }
}

/* ── Team Matrix (Goaloo-style) ─────────────────────────────────── */

.tm-scroll-wrapper {
    margin: 0 -12px;
    padding: 0 12px;
}

.tm-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 11px;
    line-height: 1.3;
}

.tm-table th, .tm-table td {
    padding: 4px 6px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    text-align: center;
    vertical-align: middle;
}

.tm-sticky-col {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--bg-card);
    text-align: left !important;
    min-width: 110px;
    max-width: 130px;
    font-weight: 500;
}

.tm-sticky-col2 {
    position: sticky;
    left: 110px;
    z-index: 2;
    background: var(--bg-surface);
    font-weight: 600;
    min-width: 65px;
}

.tm-metric-col {
    color: var(--text-secondary);
    font-size: 11px;
}

.tm-avg-col {
    color: var(--accent);
    font-size: 11px;
}

.tm-match-col {
    min-width: 70px;
    max-width: 85px;
    padding: 4px 3px;
    font-weight: 400;
}

.tm-data-col {
    font-size: 10.5px;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.tm-match-date {
    font-size: 9px;
    color: var(--text-muted);
    margin-bottom: 1px;
}

.tm-match-opp {
    font-size: 10px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.tm-match-score {
    font-weight: 700;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.tm-win { color: #27ae60; background: rgba(39, 174, 96, 0.1); }
.tm-draw { color: #f39c12; background: rgba(243, 156, 18, 0.1); }
.tm-loss { color: #e74c3c; background: rgba(231, 76, 60, 0.1); }

.tm-section-row td {
    background: var(--bg-surface) !important;
    padding: 6px;
    font-size: 11px;
    color: var(--text);
    border-bottom: 2px solid var(--border);
}

.tm-header-row th {
    background: var(--bg-surface2);
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 3;
}

/* ── Ensemble Prediction Block ─────────────────────────────────── */

.ens-card { }
.ens-subtitle { font-size: 12px; color: var(--text-muted); margin: -4px 0 12px; }

.ens-primary { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.ens-pred-card { background: var(--bg-surface); border-radius: 10px; padding: 12px 14px; }
.ens-pred-header { display: flex; justify-content: space-between; align-items: center; }
.ens-pred-market { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.ens-pred-pct { font-size: 28px; font-weight: 700; }
.ens-pred-selection { font-size: 15px; font-weight: 600; margin: 4px 0; color: var(--text); }
.ens-pred-meta { font-size: 11px; color: var(--text-muted); }
.ens-votes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ens-vote { font-size: 11px; padding: 2px 8px; background: var(--bg-surface2); border-radius: 12px; color: var(--text-muted); }
.ens-vote--win { background: rgba(39,174,96,0.15); color: #27ae60; font-weight: 600; }

.ens-secondary { margin-top: 8px; }
.ens-sec-title { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.ens-sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.ens-sec-cell { background: var(--bg-surface); border-radius: 8px; padding: 10px; text-align: center; }
.ens-sec-market { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.ens-sec-sel { font-size: 14px; font-weight: 600; }
.ens-sec-meta { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

.ens-cta { text-align: center; margin-top: 12px; font-size: 13px; color: var(--accent);
    cursor: pointer; padding: 8px; border-radius: 8px; transition: background 0.2s; }
.ens-cta:hover { background: rgba(52,152,219,0.08); }

/* ── Analytics Tab ────────────────────────────────────────────── */

.anl-ens-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.anl-ens-item { background: var(--bg-surface); border-radius: 8px; padding: 10px; text-align: center; }
.anl-ens-mkt { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.anl-ens-val { font-size: 16px; font-weight: 700; }
.anl-ens-meta { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

.anl-model { background: var(--bg-surface); border-radius: 10px; padding: 12px; margin-bottom: 8px; }
.anl-model--off { opacity: 0.5; }
.anl-model--empty .anl-model-status { color: var(--text-muted); }
.anl-model-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.anl-model-name { font-size: 13px; font-weight: 600; color: var(--text); }
.anl-model-status { font-size: 11px; color: #27ae60; }
.anl-model-desc { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }

.anl-preds { display: flex; flex-direction: column; gap: 4px; }
.anl-pred-row { display: flex; align-items: center; gap: 8px; padding: 4px 8px; background: var(--bg-surface2); border-radius: 6px; }
.anl-pred-mkt { font-size: 11px; color: var(--text-muted); flex: 1; }
.anl-pred-sel { font-size: 12px; font-weight: 600; }
.anl-pred-pct { font-size: 13px; font-weight: 700; margin-left: auto; }

.anl-model-rationale { font-size: 11px; color: var(--text-muted); margin-top: 6px; font-style: italic;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.anl-ai-rationale { font-size: 13px; color: var(--text); margin-bottom: 10px; padding: 10px 12px;
    background: linear-gradient(135deg, rgba(52,152,219,0.06), rgba(155,89,182,0.06));
    border-radius: 8px; border-left: 3px solid #8e44ad; line-height: 1.5; }

/* ─── Live ──────────────────────────────────────────────────────── */
.live-score { color: #e74c3c !important; animation: livePulse 2s ease-in-out infinite; }
.live-status { color: #e74c3c !important; font-weight: 700; }
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: 0.7; } }
.live-update-bar { text-align: center; padding: 6px 12px; font-size: 11px; color: #e74c3c;
    background: rgba(231,76,60,0.08); border-radius: 8px; margin: 8px 0; }

/* ─── Auth Modal ───────────────────────────────────────────────── */
.auth-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.6);
    display: flex; align-items: center; justify-content: center; padding: 16px;
    opacity: 0; transition: opacity .2s; pointer-events: none; }
.auth-overlay.is-open { opacity: 1; pointer-events: auto; }
.auth-modal { background: var(--bg-card); border-radius: 16px; padding: 28px 24px 24px;
    max-width: 380px; width: 100%; position: relative; box-shadow: 0 16px 48px rgba(0,0,0,0.3); }
.auth-close { position: absolute; top: 12px; right: 16px; background: none; border: none;
    color: var(--text-secondary); font-size: 24px; cursor: pointer; padding: 4px; line-height: 1; }
.auth-title { font-size: 20px; font-weight: 700; color: var(--text); text-align: center; margin-bottom: 4px; }
.auth-subtitle { font-size: 13px; color: var(--text-secondary); text-align: center; margin-bottom: 20px; }
.auth-buttons { display: flex; flex-direction: column; gap: 10px; }
.auth-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 16px;
    border-radius: 10px; border: 1px solid var(--border); background: var(--bg-surface);
    color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; transition: background .15s; }
.auth-btn:hover { background: var(--accent); color: #fff; }
.auth-btn svg { flex-shrink: 0; }
.auth-btn--tg { border-color: #229ED9; } .auth-btn--tg:hover { background: #229ED9; }
.auth-btn--google { border-color: #4285F4; } .auth-btn--google:hover { background: #4285F4; }
.auth-btn--max { border-color: #FF6600; } .auth-btn--max:hover { background: #FF6600; }
.auth-btn--email { border-color: var(--accent); } .auth-btn--email:hover { background: var(--accent); }
.email-auth { display: flex; flex-direction: column; gap: 10px; }
.auth-input { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
    background: var(--bg-surface); color: var(--text); font-size: 15px; text-align: center; }
.auth-input::placeholder { color: var(--text-secondary); }
.btn-primary { padding: 12px 16px; border-radius: 10px; border: none; background: var(--accent);
    color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn-logout { margin-top: 12px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border);
    background: transparent; color: var(--text-secondary); font-size: 13px; cursor: pointer; width: 100%; }
.btn-logout:hover { background: rgba(231,76,60,0.1); color: #e74c3c; border-color: #e74c3c; }
.profile-email { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.profile-providers { margin-top: 8px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.provider-badge { font-size: 11px; padding: 3px 8px; border-radius: 6px;
    background: var(--bg-surface); border: 1px solid var(--border); color: var(--text-secondary); text-transform: capitalize; }
.profile-ref { font-size: 13px; margin-top: 8px; }
.profile-avatar-img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }

/* Tournament Table */
.tournament-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.tournament-table th { padding: 6px 4px; text-align: center; font-size: 10px; font-weight: 600; color: var(--text-secondary);
    border-bottom: 1px solid var(--border); white-space: nowrap; }
.tournament-table td { padding: 5px 4px; text-align: center; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tournament-table th:nth-child(3), .tournament-table td:nth-child(3) { text-align: left; }
.tournament-team-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.tournament-highlight { background: rgba(var(--accent-rgb, 46,204,113), 0.15); }
.tournament-highlight td { font-weight: 600; }
.tournament-wins { color: #7dcea0; font-weight: 600; }
.tournament-draws { color: #f4d03f; font-weight: 600; }
.tournament-losses { color: #e74c3c; font-weight: 600; }

/* Consensus Cards */
.consensus-card { padding: 12px; border-radius: 10px; margin-bottom: 8px; border-left: 4px solid var(--border); }
.consensus-strong { border-left-color: var(--green, #2ecc71); background: rgba(46,204,113,0.08); }
.consensus-medium { border-left-color: var(--yellow, #f1c40f); background: rgba(241,196,15,0.08); }
.consensus-weak { border-left-color: var(--orange, #e67e22); background: rgba(230,126,34,0.08); }
.consensus-skip { border-left-color: var(--red, #e74c3c); background: rgba(231,76,60,0.08); }
.consensus-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.consensus-market { font-weight: 600; font-size: 14px; }
.consensus-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; background: var(--surface-elevated, rgba(255,255,255,0.1)); }
.consensus-selection { font-size: 16px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.consensus-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11px; color: var(--text-secondary); }
.consensus-meta strong { color: var(--text-primary); }
.consensus-warning { margin-top: 6px; font-size: 11px; color: var(--orange, #e67e22); font-style: italic; }

/* Strategy Calculator */
.strat-calc { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.strat-calc__row { display: flex; align-items: center; gap: 8px; }
.strat-calc__row label { font-size: 13px; min-width: 110px; color: var(--text-secondary); }
.strat-input { flex: 1; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-primary); font-size: 14px; }
.strat-input:focus { outline: none; border-color: var(--accent); }

/* Strategy Results Grid */
.strat-results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin-top: 10px; }
.strat-result-card { padding: 10px; border-radius: 10px; background: var(--surface-elevated, rgba(255,255,255,0.05)); border: 1px solid var(--border); }
.strat-result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.strat-result-name { font-weight: 600; font-size: 12px; }
.strat-risk-badge { font-size: 10px; padding: 1px 6px; border-radius: 8px; font-weight: 600; }
.risk-low { background: rgba(46,204,113,0.2); color: #2ecc71; }
.risk-medium { background: rgba(241,196,15,0.2); color: #f1c40f; }
.risk-high { background: rgba(231,76,60,0.2); color: #e74c3c; }
.strat-result-stake { font-size: 18px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.strat-result-desc { font-size: 11px; color: var(--text-secondary); line-height: 1.4; }
.strat-result-extra { font-size: 11px; color: var(--text-tertiary, var(--text-secondary)); margin-top: 4px; font-style: italic; }

/* Consensus mini badges in ensemble */
.consensus-mini { font-size: 9px; padding: 1px 5px; border-radius: 6px; font-weight: 600; vertical-align: middle; margin-left: 4px; }
.consensus-mini--strong { background: rgba(46,204,113,0.2); color: #2ecc71; }
.consensus-mini--medium { background: rgba(241,196,15,0.2); color: #f1c40f; }
.consensus-mini--weak { background: rgba(230,126,34,0.2); color: #e67e22; }
.consensus-mini--skip { background: rgba(231,76,60,0.2); color: #e74c3c; }

/* Value Badges */
.value-badge { font-size: 10px; padding: 2px 6px; border-radius: 6px; font-weight: 600; vertical-align: middle; margin-left: 4px; background: rgba(255,255,255,0.1); color: var(--text-secondary); }
.value-badge--positive { background: rgba(46,204,113,0.2); color: #27ae60; animation: valuePulse 2s infinite; }
.value-badge--negative { background: rgba(231,76,60,0.15); color: #e74c3c; }
@keyframes valuePulse { 0%,100% { opacity: 1; } 50% { opacity: 0.7; } }

/* Value Bets Card */
.value-bets-card { border: 1px solid rgba(46,204,113,0.3); }
.value-bets-subtitle { font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; }
.value-bet-row { padding: 10px 12px; border-radius: 8px; margin-bottom: 6px; background: var(--surface-elevated, rgba(255,255,255,0.04)); border-left: 3px solid var(--border); }
.value-bet-row.value-hot { border-left-color: #27ae60; background: rgba(46,204,113,0.08); }
.value-bet-row.value-warm { border-left-color: #f39c12; background: rgba(243,156,18,0.06); }
.value-bet-market { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.value-bet-compare { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 4px; }
.value-bet-our { color: #27ae60; font-weight: 600; }
.value-bet-arrow { color: var(--text-secondary); }
.value-bet-bk { color: var(--text-secondary); }
.value-bet-value { font-size: 12px; font-weight: 700; color: #27ae60; }

/* ROI Dashboard */
.roi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.roi-model-card { padding: 10px; border-radius: 10px; background: var(--surface-elevated, rgba(255,255,255,0.04)); border: 1px solid var(--border); }
.roi-model-card.roi-good { border-left: 3px solid #27ae60; }
.roi-model-card.roi-ok { border-left: 3px solid #f39c12; }
.roi-model-card.roi-bad { border-left: 3px solid #e74c3c; }
.roi-model-name { font-size: 12px; font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roi-model-wr { font-size: 18px; font-weight: 700; color: var(--accent); }
.roi-model-wr small { font-size: 11px; color: var(--text-secondary); font-weight: 400; }
.roi-model-markets { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.roi-market { font-size: 9px; padding: 1px 4px; border-radius: 4px; background: rgba(255,255,255,0.08); color: var(--text-secondary); }

/* Form Sparkline */
.form-spark { vertical-align: middle; margin-left: 6px; }

/* Prematch Share */
.match-hero__actions { text-align: center; margin: 8px 0 4px; }
.btn-share { background: var(--surface-elevated, rgba(255,255,255,0.08)); border: 1px solid var(--border); color: var(--text-secondary); padding: 6px 14px; border-radius: 20px; font-size: 12px; cursor: pointer; transition: all 0.2s; }
.btn-share:active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Toast */
.toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--surface-elevated, #333); color: #fff; padding: 10px 20px; border-radius: 20px; font-size: 13px; z-index: 9999; opacity: 0; transition: all 0.3s; pointer-events: none; }
.toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Live Prediction Mini */
.live-pred-mini { padding: 8px 12px; margin: -4px 0 8px; background: rgba(231,76,60,0.06); border-radius: 0 0 12px 12px; font-size: 11px; color: var(--text-secondary); }
.lp-header { margin-bottom: 6px; }
.lp-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.lp-chip { display: inline-block; padding: 3px 7px; border-radius: 6px; font-size: 10.5px; font-weight: 600; background: rgba(255,255,255,0.06); cursor: default; transition: opacity 0.15s; }
.lp-chip:active { opacity: 0.7; }
.lp-over { color: #27ae60; background: rgba(39,174,96,0.12); }
.lp-under { color: #e74c3c; background: rgba(231,76,60,0.12); }
.lp-neutral { color: var(--text-secondary); background: rgba(255,255,255,0.05); }

/* Starting Soon Badge */
.starting-soon-badge { display: inline-block; padding: 3px 10px; margin: 4px 0 -4px 12px; border-radius: 8px; font-size: 11px; font-weight: 600; color: #f39c12; background: rgba(243,156,18,0.12); }

/* Feed Value Badges */
.mc-value-hint { display: flex; justify-content: center; padding: 2px 0 4px; }
.mc-value-badge { font-size: 10px; padding: 2px 8px; border-radius: 10px; background: linear-gradient(135deg, rgba(46,204,113,0.15), rgba(52,152,219,0.12)); color: #27ae60; font-weight: 600; letter-spacing: 0.2px; }

/* Value Bets Page */
.vb-section-title { font-size: 14px; font-weight: 700; margin: 16px 0 8px; color: var(--text-primary); }
.vb-card { padding: 12px; border-radius: 12px; margin-bottom: 8px; background: var(--surface-card, rgba(255,255,255,0.06)); border: 1px solid var(--border); position: relative; }
.vb-card--hot { border-left: 4px solid #27ae60; }
.vb-card--warm { border-left: 4px solid #f39c12; }
.vb-card__teams { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.vb-card__date { font-size: 11px; color: var(--text-secondary); margin-bottom: 6px; }
.vb-card__bets { display: flex; flex-wrap: wrap; gap: 6px; }
.vb-card__bet { font-size: 11px; padding: 3px 8px; border-radius: 8px; background: rgba(46,204,113,0.12); color: #27ae60; font-weight: 600; }
.vb-card__confidence { font-size: 10px; color: var(--text-secondary); margin-top: 4px; }

/* Paywall */
.paywall-card { text-align: center; padding: 32px 20px; margin: 16px 0; background: var(--surface-card, rgba(255,255,255,0.06)); border: 1px solid var(--border); border-radius: 16px; }
.paywall-icon { font-size: 48px; margin-bottom: 12px; }
.paywall-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.paywall-text { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.5; }
.paywall-card .btn-primary { padding: 10px 24px; border-radius: 20px; font-size: 14px; }
.free-badge { font-size: 9px; padding: 1px 6px; border-radius: 6px; background: rgba(243,156,18,0.15); color: #f39c12; font-weight: 600; margin-left: 6px; vertical-align: middle; }

/* Tariff Buy Button */
.tariff-buy-btn { width: 100%; padding: 8px; margin-top: 8px; border: none; border-radius: 10px; background: var(--accent, #58a6ff); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity 0.2s; }
.tariff-buy-btn:active { opacity: 0.7; }
.tariff-current { text-align: center; font-size: 12px; color: var(--accent, #58a6ff); font-weight: 600; margin-top: 8px; }
.tariff-card--active { border: 2px solid var(--accent, #58a6ff); }

/* Tariff Cards - Payment */
.tariff-card--active { border: 2px solid var(--accent); }
.tariff-current { text-align: center; padding: 6px; font-size: 12px; color: var(--accent); font-weight: 600; }
.tariff-buy-btn { display: block; width: 100%; padding: 10px; margin-top: 8px; background: var(--accent); color: #fff; border: none; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.tariff-buy-btn:active { transform: scale(0.97); opacity: 0.9; }

/* Source badges */
.src-badge { display: inline-block; font-size: 8px; font-weight: 700; padding: 1px 4px; border-radius: 4px; vertical-align: super; margin-left: 2px; line-height: 1; }
.src-ens { background: rgba(46,204,113,0.2); color: #27ae60; }
.src-poi { background: rgba(52,152,219,0.2); color: #3498db; }

/* ── Accuracy Banner ──────────────────────────────────────────────── */
.accuracy-banner-wrap { margin: 8px 0; background: var(--surface, #1e1e2e); border-radius: 12px; cursor: pointer; transition: all 0.2s; overflow: hidden; }
[data-theme="light"] .accuracy-banner-wrap { background: var(--bg-card); border: 1px solid var(--border); }
.accuracy-banner-wrap:active { transform: scale(0.98); }
.accuracy-banner__header { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px 4px; font-size: 14px; font-weight: 700; color: var(--text); }
.accuracy-banner__block { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 16px 10px; }
.accuracy-banner__title { font-size: 13px; font-weight: 600; color: var(--text); }
.accuracy-banner__subtitle { font-size: 11px; color: var(--text-secondary); margin-left: auto; }
.accuracy-banner__pct { font-size: 24px; font-weight: 800; margin-left: 8px; }
.accuracy-banner__arrow { font-size: 18px; color: var(--text-secondary); }
.accuracy-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin: 8px 0; background: var(--surface, #1e1e2e); border-radius: 12px; cursor: pointer; transition: all 0.2s; }
[data-theme="light"] .accuracy-banner { background: var(--bg-card); border: 1px solid var(--border); }
.accuracy-banner:active { transform: scale(0.98); }
.accuracy-banner__left { flex: 1; }

/* ── Date filter bar ───────────────────────────────────────────────── */
.date-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 12px;
    margin: 4px 0;
}
.date-filter-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.date-filter-chip {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}
.date-filter-chip:hover {
    background: var(--bg-surface2);
    color: var(--text);
}
.date-filter-chip.active {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}
.date-filter-extra {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}
.date-filter-input {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text);
    font-size: 13px;
}
.date-filter-period {
    font-size: 12px;
    padding: 6px 10px;
}

/* ── Recommendations ─────────────────────────────────────────────── */
.recs-card { margin: 8px 0; }
.recs-subtitle { font-size: 11px; color: var(--text-secondary); margin: -4px 0 12px; }
.recs-grid { display: flex; flex-direction: column; gap: 8px; }
.rec-card { padding: 10px 12px; background: var(--surface, #1e1e2e); border-radius: 10px; cursor: pointer; transition: all 0.2s; }
.rec-card:active { transform: scale(0.98); }
.rec-match { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.rec-pred { font-size: 13px; color: var(--text); }
.rec-meta { font-size: 11px; color: var(--text-secondary); margin-top: 4px; }

/* ── Onboarding ──────────────────────────────────────────────────── */
.onboarding-banner { background: var(--surface, #1e1e2e); border-radius: 16px; margin: 8px 0 12px; padding: 20px 16px 16px; overflow: hidden; }
.onboarding-slide { display: none; text-align: center; }
.onboarding-slide.active { display: block; }
.onboarding-icon { font-size: 40px; margin-bottom: 12px; }
.onboarding-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.onboarding-text { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.onboarding-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; gap: 8px; }
.onboarding-dots { display: flex; gap: 6px; }
.onboarding-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border, #333); cursor: pointer; transition: all 0.2s; }
.onboarding-dot.active { background: var(--accent); width: 16px; border-radius: 4px; }
.onboarding-next { padding: 8px 16px; background: var(--accent); color: #fff; border: none; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.onboarding-skip { padding: 8px 12px; background: none; color: var(--text-secondary); border: none; font-size: 12px; cursor: pointer; }

/* ── Results Page ────────────────────────────────────────────────── */
.results-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.results-header h2 { font-size: 18px; font-weight: 700; color: var(--text); margin: 0; }
.accuracy-summary { display: flex; align-items: center; gap: 20px; margin: 12px 0; }
.accuracy-big-pct { font-size: 48px; font-weight: 800; }
.accuracy-counts { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.accuracy-won { color: #27ae60; }
.accuracy-lost { color: #e74c3c; }
.accuracy-total { color: var(--text-secondary); }
.accuracy-markets { margin-top: 16px; }
.accuracy-markets__title { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.accuracy-market-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.accuracy-market-name { font-size: 13px; color: var(--text); min-width: 100px; }
.accuracy-market-bar { flex: 1; height: 8px; background: var(--border, #333); border-radius: 4px; overflow: hidden; }
.accuracy-market-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.accuracy-market-pct { font-size: 12px; font-weight: 600; color: var(--text); min-width: 80px; text-align: right; }
.accuracy-market-pct small { color: var(--text-secondary); font-weight: 400; }

.result-row { padding: 10px 12px; border-radius: 10px; margin-bottom: 6px; background: var(--bg, #0e0e1a); }
.result-row.result-won { border-left: 3px solid #27ae60; }
.result-row.result-lost { border-left: 3px solid #e74c3c; }
.result-match { font-size: 13px; font-weight: 600; color: var(--text); }
.result-pred { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.result-meta { font-size: 11px; color: var(--text-muted, #666); margin-top: 4px; }
.result-badge { padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.result-badge--won { background: rgba(39,174,96,0.2); color: #27ae60; }
.result-badge--lost { background: rgba(231,76,60,0.2); color: #e74c3c; }

/* ── About Modal ─────────────────────────────────────────────────── */
.about-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(4px); }
.about-modal { background: var(--surface, #1e1e2e); border-radius: 16px; max-width: 640px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 28px; position: relative; }
.about-close { position: absolute; top: 12px; right: 12px; background: none; border: none; color: var(--text-secondary); font-size: 24px; cursor: pointer; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; z-index: 1; }
.about-hero { text-align: center; margin-bottom: 24px; padding: 20px 0 12px; }
.about-hero-icon { font-size: 48px; margin-bottom: 8px; }
.about-title { font-size: 28px; font-weight: 900; color: var(--text); margin: 0 0 4px; letter-spacing: -0.5px; }
.about-subtitle { font-size: 14px; color: var(--text-secondary); margin: 0; }
.about-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px; }
.about-stat { text-align: center; background: rgba(255,255,255,0.04); border-radius: 12px; padding: 14px 8px; }
.about-stat-num { display: block; font-size: 28px; font-weight: 900; color: var(--accent); letter-spacing: -1px; }
.about-stat-label { display: block; font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.about-section { margin-bottom: 20px; }
.about-section h3 { font-size: 15px; font-weight: 700; color: var(--accent); margin: 0 0 8px; }
.about-section p { font-size: 13px; color: var(--text-secondary); line-height: 1.7; margin: 0 0 8px; }
.about-models-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.about-model-group { background: rgba(255,255,255,0.03); border-radius: 10px; padding: 12px; }
.about-model-cat { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.about-model-group ul { list-style: none; padding: 0; margin: 0; }
.about-model-group li { font-size: 11px; color: var(--text-secondary); padding: 2px 0; line-height: 1.5; }
.about-model-group li b { color: var(--text); font-weight: 600; }
.about-features-list { display: flex; flex-direction: column; gap: 10px; }
.about-feature { display: flex; gap: 10px; align-items: flex-start; background: rgba(255,255,255,0.03); border-radius: 10px; padding: 10px 12px; }
.about-feature-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.about-feature div { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }
.about-feature strong { color: var(--text); }
.about-markets-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.about-market-chip { font-size: 11px; padding: 5px 10px; background: rgba(255,255,255,0.06); border-radius: 20px; color: var(--text-secondary); white-space: nowrap; }
.about-data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.about-data-item { font-size: 12px; color: var(--text-secondary); padding: 6px 10px; background: rgba(255,255,255,0.03); border-radius: 8px; }
.about-geo-grid { display: flex; flex-direction: column; gap: 6px; }
.about-geo-item { font-size: 12px; color: var(--text-secondary); display: flex; gap: 6px; align-items: center; padding: 4px 0; }
.about-geo-flag { font-size: 16px; }
.about-strategies-list { display: flex; flex-direction: column; gap: 8px; }
.about-strat { background: rgba(255,255,255,0.03); border-radius: 10px; padding: 10px 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.about-strat-name { font-size: 13px; font-weight: 700; color: var(--text); min-width: 140px; }
.about-strat-desc { font-size: 11px; color: var(--text-secondary); flex: 1; min-width: 180px; }
.about-strat-risk { font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 600; white-space: nowrap; }
.about-risk-low { background: rgba(39,174,96,0.15); color: #27ae60; }
.about-risk-med { background: rgba(243,156,18,0.15); color: #f39c12; }
.about-risk-high { background: rgba(231,76,60,0.15); color: #e74c3c; }
.about-warning { background: rgba(243,156,18,0.06); border-radius: 12px; padding: 14px; border-left: 3px solid #f39c12; }
.about-footer { text-align: center; padding: 16px 0 4px; font-size: 13px; color: var(--text-secondary); }
@media (max-width: 500px) {
    .about-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .about-models-grid { grid-template-columns: 1fr; }
    .about-data-grid { grid-template-columns: 1fr; }
    .about-modal { padding: 20px 16px; }
}

/* ── Tooltip ─────────────────────────────────────────────────────── */
.ba-tooltip { position: fixed; z-index: 10000; background: var(--surface, #2a2a3e); color: var(--text); padding: 8px 12px; border-radius: 8px; font-size: 12px; max-width: 260px; box-shadow: 0 4px 16px rgba(0,0,0,0.3); line-height: 1.4; pointer-events: none; animation: tooltipFade 0.2s ease; }
@keyframes tooltipFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ── Auto-calc button ────────────────────────────────────────────── */
.ens-calc-btn { display: block; width: 100%; padding: 8px; margin-top: 8px; background: rgba(52,152,219,0.15); color: #3498db; border: 1px solid rgba(52,152,219,0.3); border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.ens-calc-btn:active { background: rgba(52,152,219,0.3); transform: scale(0.98); }

/* ── Profile links ───────────────────────────────────────────────── */
.profile-links { display: flex; flex-direction: column; gap: 6px; }
.profile-link-btn { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--surface, #1e1e2e); color: var(--text); border: none; border-radius: 10px; font-size: 14px; cursor: pointer; text-align: left; transition: all 0.2s; }
.profile-link-btn:active { transform: scale(0.98); background: var(--border, #333); }

/* ── Settings / Toggle ──────────────────────────────────────────── */
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.setting-info { flex: 1; }
.setting-name { font-size: 14px; font-weight: 600; color: var(--text); }
.setting-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.toggle-switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: var(--border, #333); border-radius: 24px; transition: 0.3s; }
.toggle-slider::before { content: ''; position: absolute; left: 3px; bottom: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: 0.3s; }
.toggle-switch input:checked + .toggle-slider { background: var(--accent, #6c5ce7); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── Demo bet button ────────────────────────────────────────────── */
.ens-demo-btn { display: block; width: 100%; padding: 7px; margin-top: 4px; background: rgba(243,156,18,0.12); color: #f39c12; border: 1px solid rgba(243,156,18,0.25); border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.ens-demo-btn:active { background: rgba(243,156,18,0.25); transform: scale(0.98); }
.demo-stats { margin-top: 10px; }

/* ── Tier chips in accuracy banner ────────────────────────────── */
.accuracy-tiers { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.accuracy-tier-chip { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 8px; background: rgba(255,255,255,0.06); white-space: nowrap; }

/* ── Settled predictions search & filter ──────────────────────── */
.settled-controls { padding: 8px 0; display: flex; flex-direction: column; gap: 8px; }
.settled-search { width: 100%; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-surface, #2c2d32); color: var(--text); font-size: 13px; outline: none; box-sizing: border-box; }
.settled-search:focus { border-color: var(--accent); }
.settled-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.settled-filter-btn { padding: 4px 10px; border-radius: 16px; border: 1px solid var(--border); background: transparent; color: var(--text-secondary); font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.settled-filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.settled-stats { font-size: 13px; color: var(--text-secondary); padding: 4px 0; }
[data-theme="light"] .settled-search { background: var(--bg-surface); }

/* ── League dropdown tier sections ────────────────────────────── */
.league-dropdown__section { font-size: 13px; font-weight: 700; color: var(--accent, #6c5ce7); padding: 10px 12px 4px; border-top: 1px solid rgba(255,255,255,0.06); margin-top: 4px; }

/* ── League accuracy table ────────────────────────────────────── */
.league-acc-tier-header { font-size: 13px; font-weight: 700; color: var(--accent, #6c5ce7); padding: 12px 4px 4px; margin-top: 8px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.league-acc-row { display: flex; align-items: center; gap: 8px; padding: 8px 4px; border-bottom: 1px solid rgba(255,255,255,0.04); cursor: pointer; transition: background 0.2s; }
.league-acc-row:active { background: rgba(255,255,255,0.05); }
.league-acc-info { flex: 1; min-width: 0; }
.league-acc-name { display: block; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.league-acc-stats { display: block; font-size: 11px; color: var(--text-secondary); margin-top: 1px; }
.league-acc-bar { width: 60px; height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; flex-shrink: 0; }
.league-acc-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
.league-acc-pct { font-size: 14px; font-weight: 700; width: 40px; text-align: right; flex-shrink: 0; }
.league-acc-arrow { color: var(--text-secondary); font-size: 14px; flex-shrink: 0; }

/* ── Results tables ───────────────────────────────────────────── */
.res-table-wrap { overflow-x: auto; margin-top: 8px; }
.res-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.res-table th { text-align: left; padding: 6px 8px; color: var(--text-secondary); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.res-table td { padding: 8px 8px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.res-table tr.clickable-row { cursor: pointer; transition: background 0.15s; }
.res-table tr.clickable-row:active { background: rgba(255,255,255,0.06); }
.mini-bar { display: inline-block; width: 40px; height: 5px; background: rgba(255,255,255,0.08); border-radius: 3px; vertical-align: middle; overflow: hidden; margin-left: 4px; }
.mini-fill { display: block; height: 100%; border-radius: 3px; }

/* Player Picks */
.player-pick-card { background: var(--card-bg); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 14px 16px; margin: 8px 0; position: relative; overflow: hidden; }
.player-pick-card::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--accent); border-radius: 4px 0 0 4px; }
.pick-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pick-rank { font-size: 20px; }
.pick-market { font-size: 14px; font-weight: 600; color: var(--text-primary); flex: 1; }
.pick-selection { font-size: 18px; font-weight: 700; color: var(--accent); padding-left: 32px; margin-bottom: 8px; }
.pick-meta { display: flex; gap: 12px; padding-left: 32px; font-size: 12px; color: var(--text-secondary); flex-wrap: wrap; }
.pick-prob { color: var(--accent); font-weight: 600; }
.pick-score { opacity: 0.6; }
.pick-bar { height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; margin-top: 10px; overflow: hidden; }
.pick-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #4ade80); border-radius: 2px; transition: width 0.5s ease; }
.badge--won { background: #22c55e; color: #fff; padding: 2px 8px; border-radius: 8px; font-size: 11px; font-weight: 600; }
.badge--lost { background: #ef4444; color: #fff; padding: 2px 8px; border-radius: 8px; font-size: 11px; font-weight: 600; }
.badge--pending { background: rgba(255,255,255,0.1); color: var(--text-secondary); padding: 2px 8px; border-radius: 8px; font-size: 11px; }

/* Referee stats */
.referee-stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px 14px; }
.referee-stats-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 13px; color: var(--text-primary); }
.ref-stat { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 13px; padding: 4px 0; }
.ref-stat__label { color: var(--text-secondary); }
.ref-stat__value { color: var(--text-primary); }

.btn-heatmap { margin-left: 6px; }

/* ── Heatmap Modal ──────────────────────────────────────── */
.hm-modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.88);z-index:10000;display:none;justify-content:center;align-items:flex-start;padding:12px;overflow-y:auto;-webkit-overflow-scrolling:touch}
.hm-modal{background:var(--bg);border-radius:12px;width:100%;max-width:900px;margin:auto;animation:lmSlideUp .3s ease}
@media(max-width:640px){.hm-modal{max-width:100%}}
.hm-modal-header{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid rgba(255,255,255,0.08)}
.hm-modal-title{font-size:15px;font-weight:700;margin:0}
.hm-modal-close{background:none;border:none;color:var(--text-secondary);font-size:18px;cursor:pointer;padding:4px 8px;-webkit-tap-highlight-color:transparent}
.hm-modal-filters{display:flex;gap:6px;padding:8px 14px;border-bottom:1px solid rgba(255,255,255,0.05);flex-wrap:wrap}
.hm-filter-btn{padding:6px 12px;border-radius:20px;border:1px solid rgba(255,255,255,0.1);background:transparent;color:var(--text-secondary);font-size:12px;cursor:pointer;transition:all .2s;-webkit-tap-highlight-color:transparent}
.hm-filter-btn.active{background:var(--accent,#6c5ce7);color:#fff;border-color:transparent}
.hm-modal-body{padding:0;overflow-x:auto;-webkit-overflow-scrolling:touch}
.hm-desktop-layout{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:rgba(255,255,255,0.04)}
.hm-mobile-layout{display:none}
@media(max-width:640px){.hm-desktop-layout{display:none}.hm-mobile-layout{display:block}}
.hm-team-col{padding:10px;min-width:0}
.hm-header{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:6px;padding:0 2px}
.hm-title{font-size:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hm-counts{font-size:10px;color:var(--text-secondary);white-space:nowrap}
.hm-table{width:100%;border-collapse:collapse;font-size:11px}
.hm-table thead th{padding:4px 2px;text-align:center;font-weight:600;font-size:9px;text-transform:uppercase;color:var(--text-secondary);border-bottom:1px solid rgba(255,255,255,0.08)}
.hm-mkt-th{text-align:left!important;min-width:60px}
.hm-cat-row td{padding:6px 4px 2px;font-weight:700;font-size:10px;color:var(--text);border-top:1px solid rgba(255,255,255,0.06)}
.hm-mkt{padding:2px 4px;color:var(--text-secondary);font-size:10px;white-space:nowrap}
.hm-cell{padding:3px 1px;text-align:center;border-radius:2px;vertical-align:middle}
.hm-cell .hm-pct{font-weight:700;font-size:11px;display:block;line-height:1.15}
.hm-cell .hm-cnt{font-size:8px;color:var(--text-secondary);display:block;line-height:1}
.hm-cell .hm-odd{font-size:8px;color:var(--text-secondary);display:block}
.hm-na{color:var(--text-secondary);font-size:10px}
.hm-mobile-header{display:grid;grid-template-columns:1fr auto 1fr;gap:4px;align-items:center;margin-bottom:6px;padding:0 2px}
.hm-team-block{display:flex;flex-direction:column;align-items:center;text-align:center;min-width:0}
.hm-team-block.hm-left{align-items:flex-start}
.hm-team-block.hm-right{align-items:flex-end}
.hm-team-name{font-size:12px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.hm-team-meta{font-size:9px;color:var(--text-secondary);margin-top:1px}
.hm-center-spacer{width:1px}
.hm-mobile-table{width:100%;border-collapse:collapse;font-size:11px;table-layout:fixed}
.hm-mobile-table thead th{padding:4px 0;font-weight:600;font-size:9px;text-transform:uppercase;color:var(--text-secondary);border-bottom:1px solid rgba(255,255,255,0.08)}
.hm-mobile-table .hm-col-center,.hm-mobile-table .hm-mkt-center{width:12%;text-align:center;min-width:36px;padding:4px 2px;vertical-align:middle}
.hm-mobile-table .hm-cell{width:14%;min-width:0;padding:4px 1px}
.hm-mobile-table .hm-mkt-center{font-size:12px;font-weight:700;color:var(--text);line-height:1.2;letter-spacing:-0.02em;border-left:1px solid rgba(255,255,255,0.06);border-right:1px solid rgba(255,255,255,0.06)}
.hm-mobile-table .hm-cell .hm-pct{font-size:12px;font-weight:700;display:block;line-height:1.2;margin-bottom:1px}
.hm-mobile-table .hm-cell .hm-cnt{font-size:9px;color:var(--text-secondary);display:block;line-height:1.15}
.hm-mobile-table .hm-cell .hm-odd{font-size:8px;color:var(--text-secondary);display:block;line-height:1.1}
.hm-mobile-table .hm-cell.hm-na{font-size:10px}
.hm-mobile-table .hm-cat-row td{padding:3px 0 2px;font-size:10px;line-height:1.1;text-align:center}
.hm-loading,.hm-error{text-align:center;padding:20px 12px;color:var(--text-secondary);font-size:12px}
.hm-error{color:#f39c12}
