/* ==============================
   VARIABLES & RESET
   ============================== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --bg-elevated: #1e1e2a;
    --border: #2a2a3a;
    --border-light: #333348;
    --text-primary: #f0f0f5;
    --text-secondary: #8888a0;
    --text-muted: #555570;
    --accent: #ff5c00;
    --accent-hover: #ff7a2e;
    --accent-dim: rgba(255, 92, 0, 0.12);
    --green: #00d26a;
    --green-dim: rgba(0, 210, 106, 0.12);
    --red: #ff4757;
    --yellow: #ffc107;
    --blue: #4a9eff;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --shadow: 0 2px 12px rgba(0,0,0,0.4);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

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

/* ==============================
   TOP BAR
   ============================== */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.topbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.logo-icon { font-size: 24px; }

.logo-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-dollar { color: var(--accent); }


.nav-tabs {
    display: flex;
    gap: 4px;
    flex: 1;
}

.nav-tab {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.nav-tab:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.nav-tab.active {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.network-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.network-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
}

.btn-connect {
    padding: 8px 20px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-connect:hover { background: var(--accent-hover); }

.btn-connect.connected {
    background: var(--green-dim);
    color: var(--green);
    border: 1px solid rgba(0, 210, 106, 0.25);
}

/* ==============================
   MAIN CONTENT
   ============================== */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 88px 24px 40px;
}

/* ==============================
   FILTERS BAR
   ============================== */
.filters-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    gap: 4px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.filter-btn {
    padding: 6px 14px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
}

.filter-btn:hover { color: var(--text-primary); }

.filter-btn.active {
    background: var(--bg-elevated);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.filter-search {
    margin-left: auto;
    padding: 8px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 13px;
    width: 220px;
    outline: none;
    transition: border-color 0.2s;
}

.filter-search::placeholder { color: var(--text-muted); }
.filter-search:focus { border-color: var(--accent); }

.page-header {
    margin-bottom: 8px;
}

.page-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.stats-row {
    display: flex;
    gap: 24px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    flex: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
}

.stat-value .accent { color: var(--accent); }

/* ==============================
   STAGE NAVIGATION
   ============================== */
.stage-nav {
    display: flex;
    gap: 4px;
    padding: 5px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
}

.stage-nav::-webkit-scrollbar { display: none; }

.stage-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    transition: all 0.15s;
    cursor: pointer;
}

.stage-nav-item:hover {
    color: var(--text-secondary);
    background: rgba(255,255,255,0.03);
}

.stage-nav-item.active {
    background: var(--bg-elevated);
    color: var(--text-primary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.stage-nav-item.stage-final.active {
    background: var(--accent-dim);
    color: var(--accent);
}

.stage-nav-count {
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    color: var(--text-muted);
}

.stage-nav-item.active .stage-nav-count {
    background: rgba(255,255,255,0.1);
    color: var(--text-secondary);
}

.stage-nav-item.stage-final.active .stage-nav-count {
    background: var(--accent-dim);
    color: var(--accent);
}

/* Knockout-specific styles */
.knockout-stage-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
}

.knockout-icon {
    font-size: 20px;
}

.knockout-match-count {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.knockout-badge {
    background: rgba(74, 158, 255, 0.12) !important;
    color: var(--blue) !important;
}

.tag-knockout {
    background: rgba(74, 158, 255, 0.12) !important;
    color: var(--blue) !important;
}

.knockout-bracket-label {
    text-align: center;
    padding: 12px 0 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.match-tbd .match-row-team-name {
    color: var(--text-muted);
    font-style: italic;
}

.match-tbd .match-row-flag {
    opacity: 0.5;
}

/* ==============================
   GROUP SECTIONS
   ============================== */
.group-section {
    margin-bottom: 36px;
}

.group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.group-badge {
    background: var(--accent-dim);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.group-teams {
    color: var(--text-secondary);
    font-size: 13px;
}

.group-count {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 12px;
}

/* ==============================
   MATCH LIST (ACCORDION)
   ============================== */
.match-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.match-row {
    background: var(--bg-card);
    transition: background 0.15s;
}

.match-row:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

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

/* Collapsed header row */
.match-row-header {
    display: grid;
    grid-template-columns: 160px 1fr 140px;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    gap: 16px;
    user-select: none;
    transition: background 0.12s;
}

.match-row-header:hover {
    background: rgba(255,255,255,0.02);
}

.match-row-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.match-row-tag {
    background: var(--accent-dim);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.match-row-date {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.match-row-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.match-row-team {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.match-row-team.home { justify-content: flex-end; }
.match-row-team.away { justify-content: flex-start; }

.match-row-team-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-row-flag {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}

.match-row-odds-compact {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.compact-odd {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-family: var(--font);
    letter-spacing: -0.3px;
}

.compact-odd.home-odd { color: var(--accent); }
.compact-odd.draw-odd { color: var(--yellow); }
.compact-odd.away-odd { color: var(--blue); }

.match-row-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.match-row-pool {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.match-row-chevron {
    color: var(--text-muted);
    transition: transform 0.25s ease;
    display: flex;
    align-items: center;
}

.match-row.open .match-row-chevron {
    transform: rotate(180deg);
}

/* Expanded panel */
.match-expanded {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.match-row.open .match-expanded {
    max-height: 800px;
}

.match-expanded-inner {
    padding: 0 20px 20px;
    border-top: 1px solid var(--border);
}

/* Expanded matchup header */
.expanded-matchup {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 20px 0 16px;
}

.expanded-team {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.expanded-team.away {
    justify-content: flex-end;
    text-align: right;
}

.expanded-flag {
    font-size: 40px;
    line-height: 1;
}

.expanded-team-name {
    font-size: 16px;
    font-weight: 700;
}

.expanded-team-code {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

.expanded-vs-block {
    text-align: center;
    flex-shrink: 0;
    min-width: 120px;
}

.expanded-vs {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.expanded-venue {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.expanded-city {
    font-size: 11px;
    color: var(--text-muted);
}

/* Pool bar inside expanded */
.expanded-pool-bar {
    margin-bottom: 16px;
}

.pool-bar {
    height: 4px;
    background: var(--bg-elevated);
    display: flex;
    overflow: hidden;
    border-radius: 2px;
}

.pool-bar .segment-home { background: var(--accent); }
.pool-bar .segment-draw { background: var(--yellow); }
.pool-bar .segment-away { background: var(--blue); }

.pool-bar-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
}

.pool-label {
    font-size: 11px;
    font-weight: 600;
}

.pool-label.home { color: var(--accent); }
.pool-label.draw { color: var(--yellow); }
.pool-label.away { color: var(--blue); }

/* Odds row inside expanded */
.expanded-odds {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 20px;
}

.odd-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font);
}

.odd-btn:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.odd-btn.selected {
    border-color: var(--accent);
    background: var(--accent-dim);
    box-shadow: 0 0 0 1px var(--accent);
}

.odd-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.odd-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.odd-pct {
    font-size: 10px;
    color: var(--text-secondary);
}

/* Match info grid */
.match-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.info-item {
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.info-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 4px;
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Expanded footer */
.expanded-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-muted);
}

.expanded-pool-total { font-weight: 600; }

/* ==============================
   WALLET MODAL
   ============================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 200;
    justify-content: center;
    align-items: center;
}

.modal-overlay.show { display: flex; }

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 400px;
    max-width: 90vw;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover { color: var(--text-primary); }

.modal-body { padding: 16px; }

.wallet-option {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font);
    text-align: left;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.wallet-option:last-child { margin-bottom: 0; }

.wallet-option:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.wallet-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
}

.wallet-name {
    font-size: 15px;
    font-weight: 600;
}

.wallet-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ==============================
   BETTING MODAL
   ============================== */
.bet-modal {
    width: 420px;
}

.bet-modal-match {
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}

.bet-modal-pick {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--accent-dim);
    border: 1px solid rgba(255, 92, 0, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    text-align: center;
}

.bet-modal-balance {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.bet-balance-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.bet-balance-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.bet-modal-amount {
    margin-bottom: 16px;
}

.bet-amount-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.bet-amount-input-wrap {
    display: flex;
    align-items: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 14px;
    transition: border-color 0.2s;
}

.bet-amount-input-wrap:focus-within {
    border-color: var(--accent);
}

.bet-amount-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 20px;
    font-weight: 700;
    padding: 12px 0;
    min-width: 0;
}

.bet-amount-input::placeholder {
    color: var(--text-muted);
    font-weight: 500;
}

.bet-amount-suffix {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 8px;
}

.bet-presets {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.bet-preset {
    flex: 1;
    padding: 7px 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.bet-preset:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

.bet-modal-return {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: var(--green-dim);
    border: 1px solid rgba(0, 210, 106, 0.15);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--green);
}

.btn-place-bet {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-place-bet:hover { background: var(--accent-hover); }

/* ==============================
   MESSAGE MODAL (error/info)
   ============================== */
.msg-modal {
    width: 380px;
    text-align: center;
    padding: 32px 28px 24px;
}

.msg-modal-icon {
    font-size: 40px;
    margin-bottom: 14px;
    line-height: 1;
}

.msg-modal-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.msg-modal-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.msg-modal-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    color: #fff;
    background: var(--accent);
}

.msg-modal-btn:hover { background: var(--accent-hover); }

.msg-modal.msg-error .msg-modal-icon { color: var(--red); }
.msg-modal.msg-error .msg-modal-btn { background: var(--red); }
.msg-modal.msg-error .msg-modal-btn:hover { background: #e0404f; }

.msg-modal.msg-info .msg-modal-icon { color: var(--blue); }
.msg-modal.msg-info .msg-modal-btn { background: var(--blue); }
.msg-modal.msg-info .msg-modal-btn:hover { background: #3d8be6; }

.msg-modal.msg-success .msg-modal-icon { color: var(--green); }
.msg-modal.msg-success .msg-modal-btn { background: var(--green); }
.msg-modal.msg-success .msg-modal-btn:hover { background: #00b85c; }

.msg-modal.msg-warning .msg-modal-icon { color: var(--yellow); }

.btn-place-bet:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ==============================
   PLACEHOLDER PAGES
   ============================== */
.placeholder-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}

.placeholder-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.placeholder-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.placeholder-text {
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 400px;
}

/* ==============================
   LEADERBOARD TABLE
   ============================== */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.leaderboard-table th {
    text-align: left;
    padding: 12px 18px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.leaderboard-table td {
    padding: 14px 18px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

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

.leaderboard-table .rank {
    font-weight: 700;
    color: var(--accent);
    width: 50px;
}

.leaderboard-table .address {
    font-family: monospace;
    color: var(--text-secondary);
    font-size: 13px;
}

.leaderboard-table .pnl-positive { color: var(--green); font-weight: 600; }
.leaderboard-table .pnl-negative { color: var(--red); font-weight: 600; }

/* ==============================
   PORTFOLIO
   ============================== */
.portfolio-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.portfolio-bet {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.15s;
}

.portfolio-bet:hover {
    border-color: var(--border-light);
}

.portfolio-bet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px 0;
}

.portfolio-bet-match {
    font-size: 15px;
    font-weight: 700;
}

.portfolio-bet-status {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 4px;
}

.bet-status-active {
    color: var(--blue);
    background: rgba(74, 158, 255, 0.12);
}

.bet-status-won {
    color: var(--green);
    background: var(--green-dim);
}

.bet-status-lost {
    color: var(--red);
    background: rgba(255, 71, 87, 0.12);
}

.bet-status-claimed {
    color: var(--text-muted);
    background: var(--bg-elevated);
}

.portfolio-bet-details {
    padding: 10px 18px 14px;
}

.portfolio-bet-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.portfolio-bet-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.portfolio-bet-pick {
    font-size: 14px;
    font-weight: 700;
    min-width: 60px;
}

.portfolio-bet-amount {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.portfolio-bet-pool {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
}

/* ==============================
   HAMBURGER + MOBILE MENU
   ============================== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 8px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all 0.2s;
}

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 150;
}

.mobile-menu-overlay.show { display: block; }

.mobile-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transition: right 0.25s ease;
}

.mobile-menu.show { right: 0; }

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.mobile-menu-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.mobile-menu-close:hover { color: var(--text-primary); }

.mobile-menu-links {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 12px 0;
}

.mobile-menu-link {
    display: block;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.15s;
}

.mobile-menu-link:hover,
.mobile-menu-link.active {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.mobile-menu-link.active {
    border-left: 3px solid var(--accent);
    padding-left: 21px;
}

.mobile-menu-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-menu-footer .btn-connect {
    width: 100%;
    text-align: center;
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 768px) {
    .topbar-inner { padding: 0 16px; gap: 16px; }
    .nav-tabs { display: none; }
    .hamburger { display: flex; }
    .network-badge { display: none; }
    .main-content { padding: 80px 16px 24px; }
    .match-row-header {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .match-row-left { order: 1; }
    .match-row-center { order: 2; flex-wrap: wrap; gap: 8px; }
    .match-row-right { order: 3; justify-content: space-between; }
    .expanded-matchup { flex-direction: column; gap: 12px; }
    .expanded-team, .expanded-team.away { justify-content: center; }
    .match-info-grid { grid-template-columns: 1fr; }
    .stats-row { flex-direction: column; gap: 12px; }
    .bet-modal { width: calc(100vw - 32px); }
    .filter-search { width: 100%; margin-left: 0; }

    /* Mobile nav */
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(20px);
        border-top: 1px solid var(--border);
        z-index: 100;
        padding: 8px 0;
    }

    .mobile-nav a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 8px;
        font-size: 10px;
        color: var(--text-muted);
        font-weight: 500;
    }

    .mobile-nav a.active { color: var(--accent); }
    .mobile-nav-icon { font-size: 20px; }
}

@media (min-width: 769px) {
    .mobile-nav { display: none; }
}

.text-muted { color: var(--text-muted); }

/* ==============================
   LANDING PAGE
   ============================== */
.landing-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: -2;
    opacity: 0.25;
    pointer-events: none;
}

.landing-video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(
        to bottom,
        rgba(10, 10, 15, 0.4) 0%,
        rgba(10, 10, 15, 0.2) 40%,
        rgba(10, 10, 15, 0.5) 80%,
        rgba(10, 10, 15, 0.85) 100%
    );
    z-index: -1;
    pointer-events: none;
}

.landing-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 60px 24px;
}

.landing-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}

.landing-title {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 20px;
}

.landing-title .highlight { color: var(--accent); }

.landing-desc {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 560px;
    margin-bottom: 36px;
    line-height: 1.6;
}

.landing-cta {
    display: flex;
    gap: 14px;
}

.btn-primary {
    padding: 14px 32px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
    padding: 14px 32px;
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.landing-stats {
    display: flex;
    gap: 48px;
    margin-top: 60px;
}

.landing-stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--accent);
}

.landing-stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.token-highlight {
    color: var(--accent);
    font-weight: 700;
}

/* ==============================
   HOW IT WORKS
   ============================== */
.how-it-works {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 24px 80px;
    text-align: center;
}

.hiw-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 32px;
    letter-spacing: -0.5px;
}

.hiw-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hiw-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 20px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    min-width: 110px;
    transition: border-color 0.2s;
}

.hiw-step:hover {
    border-color: var(--border-light);
}

.hiw-highlight {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.hiw-highlight:hover {
    border-color: var(--accent-hover);
}

.hiw-icon {
    font-size: 32px;
    line-height: 1;
}

.hiw-pct {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.hiw-highlight .hiw-pct {
    color: var(--accent);
}

.hiw-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.hiw-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.hiw-arrow, .hiw-plus {
    font-size: 20px;
    color: var(--text-muted);
    font-weight: 700;
    flex-shrink: 0;
}

.hiw-footer {
    margin-top: 28px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 600px) {
    .hiw-flow {
        flex-direction: column;
        gap: 8px;
    }
    .hiw-arrow, .hiw-plus {
        transform: rotate(90deg);
    }
    .hiw-step {
        width: 100%;
        flex-direction: row;
        gap: 12px;
        padding: 14px 18px;
    }
    .hiw-icon { font-size: 28px; }
    .hiw-pct { font-size: 20px; }
}

/* ==============================
   REALTIME UPDATES
   ============================== */

/* Flash animation when pool data updates */
.match-row.pool-updated {
    animation: pool-flash 1.5s ease-out;
}

@keyframes pool-flash {
    0% { background: rgba(255, 92, 0, 0.08); }
    100% { background: transparent; }
}

/* Toast notifications */
.toast-notification {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    z-index: 300;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    white-space: nowrap;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* WS connection indicator */
.ws-status {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
    display: inline-block;
}
