:root {
    --bg: #0f1117;
    --surface: #1a1d27;
    --surface2: #242836;
    --border: #2e3348;
    --text: #e8eaf0;
    --muted: #8b90a5;
    --accent: #6c5ce7;
    --accent2: #a29bfe;
    --bb-yellow: #ffe600;
    --green: #00b894;
    --red: #ff6b6b;
    --orange: #fdcb6e;
    --dota: #c23c2a;
    --cs: #de9b35;
    --live: #ff4757;
}

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

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: fixed;
    height: 100vh;
}

.brand-block {
    padding: 4px 8px 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.betboom-logo {
    height: 22px;
    width: auto;
    flex-shrink: 0;
}

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

.brand-title {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.brand-sub {
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-brand {
    margin-bottom: 20px;
}

.auth-brand .betboom-logo { height: 26px; }
.auth-brand .brand-title { font-size: 18px; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all .15s;
}

.nav-link .ph {
    font-size: 18px;
    flex-shrink: 0;
    opacity: .9;
}

.nav-link:hover { background: var(--surface2); color: var(--text); }
.nav-link.active { background: var(--accent); color: #fff; }
.nav-link-accent { color: var(--accent2); font-weight: 600; }
.nav-link-accent.active { background: var(--accent); color: #fff; }

.content {
    flex: 1;
    margin-left: 240px;
    padding: 32px 40px;
    max-width: 1200px;
}

h1 { font-size: 28px; font-weight: 700; margin-bottom: 4px; }
h2 { font-size: 16px; font-weight: 600; margin-bottom: 16px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.subtitle { color: var(--muted); margin-bottom: 28px; font-size: 14px; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.stat-title { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.stat-value { font-size: 26px; font-weight: 700; }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 6px; }

.stat-card.positive .stat-value { color: var(--green); }
.stat-card.negative .stat-value { color: var(--red); }

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.mobile-header,
.bottom-nav,
.sidebar-overlay {
    display: none;
}

.sidebar-brand-desktop { display: block; }
.mobile-brand { display: none; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

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

.table th {
    text-align: left;
    padding: 10px 12px;
    color: var(--muted);
    font-weight: 500;
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    text-transform: uppercase;
}

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

.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--surface2); }

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.badge.dota { background: rgba(194,60,42,.2); color: #e8705f; }
.badge.cs { background: rgba(222,155,53,.2); color: #f0b85a; }
.badge.tier { font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.badge.tier.tier-1 { background: rgba(46,204,113,.22); color: #5ddea0; }
.badge.tier.tier-2 { background: rgba(241,196,15,.18); color: #f4d35e; }
.badge.tier.tier-3 { background: rgba(139,144,165,.18); color: var(--muted); }
.grid-eligible-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    background: rgba(108,92,231,.25);
    color: var(--accent2);
}

.status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status.pending { background: rgba(253,203,110,.15); color: var(--orange); }
.status.won { background: rgba(0,184,148,.15); color: var(--green); }
.status.lost { background: rgba(255,107,107,.15); color: var(--red); }
.status.void { background: rgba(139,144,165,.15); color: var(--muted); }
.status.cashout { background: rgba(108,92,231,.15); color: var(--accent2); }

.positive { color: var(--green); font-weight: 600; }
.negative { color: var(--red); font-weight: 600; }
.pending-profit { color: var(--orange); }

.match-name { font-weight: 500; }
.match-tournament { font-size: 11px; color: var(--muted); }
.market { font-size: 11px; color: var(--muted); }

.info-list { display: flex; flex-direction: column; gap: 12px; }
.info-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.info-row:last-child { border-bottom: none; }
.info-row span { color: var(--muted); font-size: 13px; }

.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

select, input, textarea {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
}

select:focus, input:focus, textarea:focus { border-color: var(--accent); }

.btn {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.btn:hover { background: var(--border); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-primary:hover { background: #5a4bd1; }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.btn-sm {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 4px;
}

.btn-sm.win:hover { background: rgba(0,184,148,.2); border-color: var(--green); }
.btn-sm.lose:hover { background: rgba(255,107,107,.2); border-color: var(--red); }
.btn-sm.del:hover { background: rgba(255,107,107,.1); }

.actions { white-space: nowrap; }

.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    max-width: 640px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field.span-2 { grid-column: span 2; }
.field label { font-size: 13px; color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; }
.auth-card input[type="text"],
.auth-card input[type="password"] {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    padding: 10px 14px;
    font-size: 14px;
    width: 100%;
}

.hint { font-size: 11px; color: var(--muted); margin-top: 4px; }

.preview {
    background: var(--surface2);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 16px;
    font-size: 14px;
}

.error {
    background: rgba(255,107,107,.1);
    border: 1px solid var(--red);
    color: var(--red);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
}

.empty { color: var(--muted); padding: 20px 0; }
.empty a { color: var(--accent2); }
.loading { color: var(--muted); padding: 40px; text-align: center; }

.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.section-header h2 { margin-bottom: 0; }
.link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--accent2);
    font-size: 13px;
    text-decoration: none;
}

.link:hover { text-decoration: underline; }
.link .ph { font-size: 14px; }

.mode-tabs { display: flex; gap: 8px; margin-bottom: 24px; }

.match-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.match-grid.compact { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.match-card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: border-color .15s, transform .15s;
}

.match-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.match-card.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.match-card.live { border-left: 3px solid var(--red); }
.match-card.upcoming { border-left: 3px solid var(--orange); }

.match-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }

.live-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: .5px;
}

.live-badge.live { background: rgba(255,107,107,.2); color: var(--red); animation: pulse 2s infinite; }
.live-badge.upcoming { background: rgba(253,203,110,.15); color: var(--orange); }

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

.match-score { margin-left: auto; font-weight: 700; font-size: 16px; }

.match-teams { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.team-row { display: flex; align-items: center; gap: 8px; }
.team-logo { width: 20px; height: 20px; border-radius: 4px; }
.team-name { font-weight: 500; font-size: 14px; }

.match-meta { display: flex; gap: 12px; font-size: 11px; color: var(--muted); margin-top: 8px; }

.map-dots { display: flex; gap: 4px; margin-top: 8px; }
.map-dot {
    width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 600;
    background: var(--border); color: var(--muted);
}
.map-dot.running { background: var(--red); color: #fff; }
.map-dot.done { background: var(--green); color: #fff; }

.match-bet-btn { margin-top: 12px; width: 100%; }

.team-pick-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.team-pick { flex: 1; min-width: 140px; padding: 14px !important; font-weight: 600; }

.alert {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
}

.alert-warn {
    background: rgba(253,203,110,.1);
    border: 1px solid var(--orange);
    color: var(--text);
}

.code-block {
    background: var(--bg);
    padding: 10px;
    border-radius: 6px;
    margin-top: 8px;
    font-size: 12px;
    overflow-x: auto;
}

.refresh-hint { font-size: 11px; color: var(--muted); align-self: center; }

.tournament-list { display: flex; flex-direction: column; gap: 8px; }
.tournament-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid var(--border);
}
.tournament-item:last-child { border-bottom: none; }
.tournament-name { font-weight: 500; flex: 1; }
.tournament-meta { font-size: 12px; color: var(--muted); }

.auto-tag { font-size: 10px; color: var(--accent2); margin-top: 2px; }

.selected-match-panel { max-width: 640px; }

.matches-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 1000px) {
    .matches-layout { grid-template-columns: 1fr; }
    .matches-sidebar { order: -1; }
}

.quick-bet-panel {
    background: var(--surface);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 20px;
    position: sticky;
    top: 20px;
}

.quick-bet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.quick-bet-header h2 { margin: 0; font-size: 16px; text-transform: none; color: var(--text); }

.quick-bet-match {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}

.quick-bet-label { font-size: 13px; color: var(--muted); margin: 16px 0 8px; }

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 20px;
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 36px;
    width: 100%;
    max-width: 400px;
}

.icon-live { color: var(--live); }
.icon-spin { animation: spin .8s linear infinite; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

.section-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.section-title .ph { font-size: 16px; }

.auth-card h1 { font-size: 24px; margin-bottom: 4px; }
.auth-btn { width: 100%; margin-top: 8px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--muted); }
.auth-footer a { color: var(--accent2); }
.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.user-info { margin-bottom: 10px; }
.user-name { font-weight: 600; font-size: 14px; }
.user-login { font-size: 11px; color: var(--muted); }
.logout-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.logout-btn .ph { font-size: 16px; }

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

.filters .btn .ph { font-size: 16px; }
.admin-link { color: var(--orange) !important; }

.badge.admin { background: rgba(108,92,231,.2); color: var(--accent2); }
.badge.user { background: rgba(139,144,165,.15); color: var(--muted); }

.admin-users { display: flex; flex-direction: column; gap: 16px; }
.admin-user-card { padding: 20px; }
.admin-user-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; gap: 16px; }
.admin-balance { text-align: right; }
.admin-balance small { display: block; color: var(--muted); font-size: 11px; }
.admin-actions-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.admin-btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 700px) {
    .admin-actions-grid { grid-template-columns: 1fr; }
}

.success-msg {
    background: rgba(0,184,148,.1);
    border: 1px solid var(--green);
    color: var(--green);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 13px;
}

#blazor-error-ui {
    background: var(--red);
    color: #fff;
    padding: 12px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: none;
}

/* Live match view */
.live-header { margin-bottom: 24px; }
.live-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 4px; }
.live-title-row h1 { margin: 0; font-size: 24px; }
.live-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }

.live-scoreboard {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.live-team { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; min-width: 140px; }
.live-team-logo { width: 48px; height: 48px; border-radius: 8px; }
.live-team-name { font-weight: 600; font-size: 16px; text-align: center; }
.live-team-score { font-size: 36px; font-weight: 700; }
.live-vs { color: var(--muted); font-size: 14px; font-weight: 600; }

.live-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .live-stats-grid { grid-template-columns: 1fr; }
}

.live-panel h2 { color: var(--text); text-transform: none; letter-spacing: 0; }
.live-panel h3 { font-size: 13px; margin-bottom: 10px; color: var(--muted); text-transform: uppercase; }

.live-overview { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 16px; }
.overview-item { display: flex; flex-direction: column; gap: 4px; }
.overview-label { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.overview-item small { font-size: 10px; color: var(--muted); }

.gold-chart { margin-top: 20px; }
.gold-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 60px;
    overflow: hidden;
    margin: 8px 0;
}
.gold-bar { width: 4px; min-height: 4px; border-radius: 2px; }
.gold-bar.radiant { background: var(--green); align-self: flex-end; }
.gold-bar.dire { background: var(--red); align-self: flex-start; transform: translateY(-100%); }
.gold-chart-labels { display: flex; justify-content: space-between; font-size: 11px; }

.radiant-title { color: #6ec4a8; }
.dire-title { color: #c95c5c; }

.draft-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.draft-side { display: flex; flex-direction: column; gap: 6px; }
.draft-hero { font-size: 13px; padding: 4px 8px; border-radius: 6px; display: inline-block; margin: 2px 0; }
.draft-hero.pick { background: rgba(108,92,231,.15); }
.draft-hero.ban { background: rgba(139,144,165,.1); color: var(--muted); text-decoration: line-through; }
.draft-bans { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; }

.hero-picks-row { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-pick-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    min-width: 72px;
    font-size: 11px;
    text-align: center;
}
.hero-pick-icon { width: 48px; height: 28px; border-radius: 4px; object-fit: cover; }

.dota-players-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .dota-players-grid { grid-template-columns: 1fr; } }

.live-player-table { font-size: 12px; }
.live-player-table .kda { font-weight: 600; white-space: nowrap; }
.hero-cell { display: flex; align-items: center; gap: 8px; }
.hero-icon { width: 32px; height: 18px; border-radius: 3px; object-fit: cover; }
.item-slots { display: flex; flex-wrap: wrap; gap: 4px; }
.item-chip {
    font-size: 10px;
    background: var(--surface2);
    padding: 2px 6px;
    border-radius: 4px;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs2-series-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 18px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--surface2);
    border-radius: 10px;
}
.cs2-series-divider { font-size: 24px; font-weight: 700; color: var(--muted); }

.cs2-map-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.cs2-map-card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
}
.cs2-map-card.running { border-color: var(--red); box-shadow: 0 0 0 1px rgba(255,107,107,.3); }
.cs2-map-card.finished { border-color: var(--green); }
.cs2-map-card.pending { opacity: .7; }

.cs2-map-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cs2-map-num { font-weight: 600; font-size: 14px; }
.map-status { font-size: 10px; padding: 2px 8px; border-radius: 4px; }
.map-status.done { background: rgba(0,184,148,.15); color: var(--green); }
.map-status.pending { background: rgba(139,144,165,.15); color: var(--muted); }

.cs2-map-winner { font-size: 13px; margin-bottom: 8px; }
.running-text { color: var(--red); font-weight: 600; }
.cs2-map-meta { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); }
.cs2-current-map { margin-top: 16px; padding: 12px; background: var(--surface2); border-radius: 8px; display: flex; align-items: center; gap: 8px; }

.live-cs2-layout { display: flex; flex-direction: column; gap: 20px; margin-bottom: 20px; }

.cs2-live-stats-block h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cs2-live-players-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 768px) {
    .cs2-live-players-grid { grid-template-columns: 1fr; }
}

.cs2-team-title {
    font-size: 13px;
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.cs2-team-title.team1 { color: #74b9ff; }
.cs2-team-title.team2 { color: #ff7675; }

.cs2-player-table { font-size: 13px; }
.cs2-player-table th { font-size: 11px; }
.cs2-player-name { font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kda-positive { color: var(--green); font-weight: 600; }
.kda-negative { color: var(--red); font-weight: 600; }

.cs2-round-highlight { font-size: 20px; letter-spacing: .02em; }

.cs2-live-round-board {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 12px;
    background: var(--surface2);
    border-radius: 10px;
    margin-bottom: 12px;
}

.cs2-live-round-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.cs2-live-round-name {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.cs2-live-round-value {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

.cs2-live-round-team.team1 .cs2-live-round-value { color: #74b9ff; }
.cs2-live-round-team.team2 .cs2-live-round-value { color: #ff7675; }

.cs2-live-round-sep {
    font-size: 28px;
    font-weight: 700;
    color: var(--muted);
}

.live-text { color: var(--red); font-weight: 600; }
.cs2-grid-hint { margin: 0; }

.match-card-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.match-card-actions .match-bet-btn,
.match-card-actions .match-live-btn { flex: 1; min-width: 120px; margin-top: 0; text-align: center; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.match-live-btn { border-color: var(--red); color: var(--red); }
.match-live-btn:hover { background: rgba(255,107,107,.1); }

.live-dota-layout { display: flex; flex-direction: column; gap: 20px; margin-bottom: 20px; }
.live-map-events-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 900px) {
    .live-map-events-grid { grid-template-columns: 1fr; }
}

.live-hint { margin: 0 0 12px; font-size: 12px; }

.hero-pick-chip {
    transition: opacity .4s ease, filter .4s ease, transform .3s ease;
}
.hero-pick-chip.hero-dead {
    opacity: .35;
    filter: grayscale(1) brightness(.6);
    transform: scale(.92);
}
.hero-pick-chip.hero-dead .hero-pick-icon {
    box-shadow: inset 0 0 12px rgba(0,0,0,.6);
}
.hero-pick-name { font-weight: 600; }
.hero-pick-kda {
    font-size: 10px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.dota-minimap {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(46,58,46,.5), rgba(58,42,42,.5));
    border-radius: 10px;
    border: 1px solid var(--border);
    min-height: 180px;
}
.minimap-side { display: flex; flex-direction: column; gap: 10px; }
.minimap-side-label { font-size: 11px; font-weight: 700; text-transform: uppercase; }
.radiant-side .minimap-side-label { color: #6ec4a8; }
.dire-side .minimap-side-label { color: #c95c5c; text-align: right; }
.dire-side .minimap-lane { flex-direction: row-reverse; }
.dire-side .lane-label { text-align: right; }
.minimap-divider {
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--border), transparent);
}
.minimap-lane {
    display: flex;
    align-items: center;
    gap: 8px;
}
.lane-label { font-size: 10px; color: var(--muted); min-width: 36px; }
.tower-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.tower-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid currentColor;
    transition: all .35s ease;
}
.tower-dot.standing { background: currentColor; opacity: .9; }
.radiant-side .tower-dot { color: #6ec4a8; }
.dire-side .tower-dot { color: #c95c5c; }
.tower-dot.destroyed {
    background: transparent;
    opacity: .25;
    transform: scale(.75);
}

.objectives-row {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.objective-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 14px;
    background: var(--surface2);
    border: 1px dashed var(--border);
    border-radius: 8px;
    font-size: 12px;
    opacity: .7;
}
.objective-chip small { font-size: 10px; color: var(--muted); }
.objective-icon { font-size: 20px; display: flex; align-items: center; }
.objective-icon .ph { font-size: 20px; color: var(--muted); }

.live-event-feed {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.live-event {
    display: grid;
    grid-template-columns: 44px 24px 1fr;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--surface2);
    font-size: 13px;
    animation: event-in .35s ease;
}
@keyframes event-in {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}
.live-event.event-radiant { border-left: 3px solid #6ec4a8; }
.live-event.event-dire { border-left: 3px solid #c95c5c; }
.live-event.event-structure { border-left: 3px solid var(--orange); }
.event-time { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.event-icon {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-icon .ph { font-size: 16px; }

.player-dead { opacity: .45; }
.player-dead .kda { color: var(--muted); }
.hero-icon-dead { filter: grayscale(1) brightness(.5); }
.dead-badge { font-size: 12px; margin-left: 4px; }

/* Esports odds panel (api-sport.ru) */
.odds-panel {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

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

.odds-panel-muted .ph { font-size: 18px; flex-shrink: 0; }
.odds-panel-muted code { font-size: 11px; }
.odds-panel-muted a { color: var(--accent2); }

.odds-panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.odds-panel-header .ph { color: var(--bb-yellow); font-size: 18px; }
.odds-panel-header small { color: var(--muted); font-weight: 400; }

.odds-market-title {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 8px;
}

.odds-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.odds-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: border-color .15s, background .15s;
    font-size: 14px;
}

.odds-row:hover:not(:disabled) {
    border-color: var(--accent);
    background: rgba(108, 92, 231, .08);
}

.odds-row.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.odds-row:disabled { opacity: .45; cursor: not-allowed; }

.odds-team { font-weight: 500; text-align: left; }
.odds-price {
    font-weight: 700;
    font-size: 16px;
    color: var(--bb-yellow);
    font-variant-numeric: tabular-nums;
}

.odds-note {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

.odds-disclaimer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 12px 0 0;
    font-size: 11px;
    color: var(--muted);
}

.odds-disclaimer .ph { font-size: 14px; color: var(--orange); }

/* ── Table horizontal scroll ── */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    padding: 0 4px;
}

.table-scroll .table { min-width: 520px; }

/* ── Mobile layout ── */
@media (max-width: 900px) {
    .two-col { grid-template-columns: 1fr; }

    .mobile-header {
        display: flex;
        align-items: center;
        gap: 12px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 200;
        height: 56px;
        padding: 0 12px;
        padding-top: env(safe-area-inset-top, 0);
        background: var(--surface);
        border-bottom: 1px solid var(--border);
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: none;
        border-radius: 10px;
        background: var(--surface2);
        color: var(--text);
        cursor: pointer;
        flex-shrink: 0;
    }

    .mobile-menu-btn .ph { font-size: 22px; }

    .mobile-brand {
        display: flex;
        min-width: 0;
        flex: 1;
    }

    .mobile-brand .betboom-logo { height: 20px; }
    .mobile-brand .brand-title { font-size: 14px; }
    .sidebar-brand-desktop { display: none; }

    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 250;
        background: rgba(0, 0, 0, .55);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }

    .app.menu-open .sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar {
        z-index: 300;
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: 8px 0 32px rgba(0, 0, 0, .4);
        padding-top: calc(16px + env(safe-area-inset-top, 0));
    }

    .app.menu-open .sidebar {
        transform: translateX(0);
    }

    .app.menu-open { overflow: hidden; }

    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 200;
        background: var(--surface);
        border-top: 1px solid var(--border);
        padding-bottom: env(safe-area-inset-bottom, 0);
        justify-content: space-around;
        align-items: stretch;
    }

    .bottom-nav-link {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 8px 4px 10px;
        min-height: 56px;
        color: var(--muted);
        text-decoration: none;
        font-size: 10px;
        font-weight: 500;
        transition: color .15s;
    }

    .bottom-nav-link .ph { font-size: 22px; }

    .bottom-nav-link.active {
        color: var(--accent2);
    }

    .bottom-nav-accent.active {
        color: var(--bb-yellow);
    }

    .content {
        margin-left: 0;
        max-width: none;
        padding: calc(68px + env(safe-area-inset-top, 0)) 16px calc(80px + env(safe-area-inset-bottom, 0));
    }

    h1 { font-size: 22px; }
    .subtitle { margin-bottom: 20px; font-size: 13px; }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 20px;
    }

    .stat-card { padding: 14px; }
    .stat-value { font-size: 20px; }

    .card { padding: 16px; margin-bottom: 16px; }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .filters {
        gap: 8px;
    }

    .filters .btn,
    .filters select {
        flex: 1 1 auto;
        min-width: calc(50% - 4px);
    }

    .refresh-hint {
        width: 100%;
        text-align: center;
    }

    .form-card { padding: 20px; max-width: none; }

    .form-grid { grid-template-columns: 1fr; }
    .field.span-2 { grid-column: span 1; }

    .mode-tabs { flex-wrap: wrap; }
    .mode-tabs .btn { flex: 1; min-width: 140px; }

    .match-grid,
    .match-grid.compact {
        grid-template-columns: 1fr;
    }

    .team-pick-buttons { flex-direction: column; }
    .team-pick { min-width: 0; width: 100%; }

    .live-title-row h1 { font-size: 18px; }
    .live-scoreboard { padding: 16px; gap: 12px; }
    .live-team-score { font-size: 28px; }

    .live-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .live-actions .btn { width: 100%; justify-content: center; }

    .draft-grid { grid-template-columns: 1fr; }

    .quick-bet-panel {
        position: static;
    }

    .admin-user-header {
        flex-direction: column;
    }

    .admin-balance { text-align: left; }

    .auth-card { padding: 24px 20px; }

    select, input, textarea {
        font-size: 16px;
    }
}

/* Pre-match stats */
.prematch-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.prematch-panel.loading-block,
.prematch-panel.empty-block { color: var(--muted); }

.prematch-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.prematch-header h3 { margin: 0; font-size: 16px; }

.prematch-source {
    font-size: 11px;
    color: var(--muted);
    background: var(--surface2);
    padding: 4px 8px;
    border-radius: 6px;
}

.prematch-h2h {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px;
    background: var(--surface2);
    border-radius: 10px;
    margin-bottom: 16px;
}

.h2h-team {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.h2h-team:last-child { justify-content: flex-end; }

.h2h-name {
    font-weight: 600;
    font-size: 14px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.h2h-score {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent2);
    min-width: 28px;
    text-align: center;
}

.h2h-label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.prematch-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.prematch-team-col {
    background: var(--surface2);
    border-radius: 10px;
    padding: 14px;
}

.prematch-team-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.prematch-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.prematch-team-name { font-weight: 600; font-size: 14px; }

.prematch-form {
    display: flex;
    gap: 8px;
    font-size: 12px;
    margin-top: 2px;
}

.form-w { color: var(--green); font-weight: 600; }
.form-l { color: var(--red); font-weight: 600; }

.recent-matches.compact .recent-row {
    display: grid;
    grid-template-columns: 24px 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.recent-matches.compact .recent-row:last-child { border-bottom: none; }

.recent-row.win .recent-result { color: var(--green); font-weight: 700; }
.recent-row.loss .recent-result { color: var(--red); font-weight: 700; }

.recent-opponent {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-score { color: var(--muted); font-size: 12px; }

.map-chips {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    padding: 0 0 6px 32px;
}

.map-chip {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--surface);
}

.map-chip.won { color: var(--green); border: 1px solid rgba(0,184,148,.3); }
.map-chip.lost { color: var(--red); border: 1px solid rgba(255,107,107,.3); }

.hero-line { font-size: 11px; padding: 0 0 6px 32px; }

.hero-stats {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.hero-stats-title {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.hero-stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 3px 0;
}

.prematch-section h4 {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 8px;
}

.team-history-section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.team-history-hint {
    margin: 0 0 12px;
}

.team-history-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.team-individual-history h5 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
}

.team-individual-history.empty {
    opacity: .85;
}

.recent-matches .h2h-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.recent-date { color: var(--muted); min-width: 56px; }
.recent-tourn { color: var(--muted); font-size: 12px; width: 100%; }

.muted.small { font-size: 12px; margin: 0; }

.panel-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.panel-title-row h2 { margin: 0; }

.cs2-map-name {
    color: var(--muted);
    font-weight: 400;
    font-size: 13px;
}

.cs2-round-score {
    font-size: 13px;
    margin: 8px 0 4px;
    color: var(--text);
}

.elo-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent2);
    background: rgba(108, 92, 231, .15);
    padding: 2px 6px;
    border-radius: 4px;
}

.elo-hint { margin: -8px 0 12px; text-align: center; }

.recent-meta {
    display: flex;
    gap: 8px;
    padding: 0 0 4px 32px;
    flex-wrap: wrap;
}

.history-maps {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.history-map-card {
    background: var(--surface2);
    border-radius: 8px;
    padding: 12px;
}

.history-map-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.history-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.history-count-badge {
    font-size: 12px;
    color: var(--muted);
    background: var(--surface2);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.history-filters { flex-wrap: wrap; }

.history-inline-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.alert-ok {
    background: rgba(0, 184, 148, .12);
    border: 1px solid rgba(0, 184, 148, .3);
    color: var(--green);
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.history-detail-card { margin-bottom: 24px; }

.history-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin: 12px 0 8px;
    flex-wrap: wrap;
}

.history-detail-header h2 { margin: 8px 0 0; font-size: 22px; }

.history-detail-score {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent2);
}

.history-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 16px;
}

.history-table .history-row { cursor: pointer; }
.history-table .history-row:hover td { background: var(--surface2); }

.history-empty { padding: 24px; text-align: center; }

.stored-dota-panel { margin-top: 12px; }

.stored-dota-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 18px;
    margin-bottom: 12px;
}

.radiant-label { color: #7dce82; }
.dire-label { color: #c23c2a; }

.stored-draft {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.stored-draft-col { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.draft-side {
    width: 100%;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 2px;
}

.draft-side.radiant { color: #7dce82; }
.draft-side.dire { color: #c23c2a; }

.draft-chip {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 6px;
}

.draft-chip.pick { background: rgba(108, 92, 231, .2); }
.draft-chip.ban { background: rgba(139, 144, 165, .15); color: var(--muted); text-decoration: line-through; }

.stored-players-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stored-team-table {
    background: var(--bg);
    border-radius: 8px;
    padding: 10px;
    border: 1px solid var(--border);
}

.stored-team-table.radiant { border-left: 3px solid #7dce82; }
.stored-team-table.dire { border-left: 3px solid #c23c2a; }

.stored-team-title {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 8px;
}

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

.mini-table th,
.mini-table td {
    padding: 6px 4px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.mini-table th { color: var(--muted); font-weight: 500; }

.mini-table .kda { white-space: nowrap; font-weight: 600; }

.items-line { font-size: 11px; color: var(--muted); line-height: 1.4; }

.cs2-stored-map { margin-top: 8px; font-size: 14px; }

@media (max-width: 900px) {
    .stored-draft,
    .stored-players-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .prematch-grid { grid-template-columns: 1fr; }
    .team-history-grid { grid-template-columns: 1fr; }
    .h2h-name { max-width: 90px; }
}

@media (max-width: 600px) {
    .stats-grid { grid-template-columns: 1fr; }

    .dota-minimap {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .minimap-divider { display: none; }

    .dire-side .minimap-lane { flex-direction: row; }
    .dire-side .lane-label { text-align: left; }

    .hero-picks-row { justify-content: center; }

    .live-event {
        grid-template-columns: 40px 20px 1fr;
        font-size: 12px;
    }

    .btn-sm {
        padding: 8px 12px;
        font-size: 13px;
        min-height: 36px;
    }

    .btn {
        min-height: 44px;
        padding: 12px 16px;
    }

    .nav-link { min-height: 44px; }
}

@media (max-width: 380px) {
    .bottom-nav-link span { font-size: 9px; }
    .bottom-nav-link .ph { font-size: 20px; }
}

@media (hover: none) {
    .match-card:hover {
        transform: none;
    }
}

.archive-analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 12px;
}

@media (max-width: 768px) {
    .archive-analytics-grid { grid-template-columns: 1fr; }
}

.hero-rates-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.hero-rate-row, .map-pool-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    padding: 4px 0;
    border-bottom: 1px solid var(--border);
}

.map-pool-list { margin-top: 8px; }

.stored-cs2-panel { margin-top: 10px; }
.stored-cs2-map-name { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.stored-cs2-rounds { font-size: 14px; margin: 6px 0; }
.stored-cs2-winner { font-size: 13px; margin-top: 6px; }
.cs2-stored-players { margin-top: 10px; }

.recent-map-detail {
    padding: 0 0 6px 32px;
}

.archive-rates-section { margin-top: 16px; }
.archive-rates-section h4 { margin-bottom: 8px; }
.archive-rates-section h5 { font-size: 12px; color: var(--muted); margin: 0 0 8px; text-transform: uppercase; }
