/* ════════════════════════════════════════
   FANTABET — BETTING PAGE STYLES
   (dipende da global.css)
   ════════════════════════════════════════ */

.betting-page { background: var(--bg); min-height: 100vh; }

/* Animated grid — solo in dark */
[data-theme="dark"] .betting-page::before,
.betting-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(240,192,64,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(240,192,64,0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.4s;
}

[data-theme="dark"] .betting-page::before { opacity: 1; }

@keyframes gridMove {
    0%   { transform: translateY(0); }
    100% { transform: translateY(60px); }
}

/* ─── STATS BAR ─── */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 20px 24px;
    position: relative;
    z-index: 1;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    animation: betFadeUp 0.4s ease both;
    transition: background 0.3s, border-color 0.3s;
}

.stat-card:nth-child(1) { animation-delay: 0.00s; }
.stat-card:nth-child(2) { animation-delay: 0.05s; }
.stat-card:nth-child(3) { animation-delay: 0.10s; }
.stat-card:nth-child(4) { animation-delay: 0.15s; }

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

.stat-label  { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 5px; }
.stat-value  { font-family: var(--font-display); font-size: 24px; font-weight: 900; letter-spacing: 0.5px; color: var(--ink); }
.stat-value.accent   { color: var(--gold-accent); }
.stat-value.positive { color: var(--green-accent); }
.stat-delta  { font-size: 11px; color: var(--muted); margin-top: 2px; font-family: var(--font-mono); }

/* ─── LAYOUT ─── */
.betting-layout {
    display: grid;
    grid-template-columns: 220px 1fr 300px;
    min-height: calc(100vh - 62px - 88px);
    position: relative;
    z-index: 1;
}

/* ─── SIDEBAR ─── */
.betting-sidebar {
    border-right: 1px solid var(--border);
    padding: 20px 0;
    position: sticky;
    top: 62px;
    height: calc(100vh - 62px);
    overflow-y: auto;
    background: var(--bg);
    transition: background 0.3s, border-color 0.3s;
}

.sidebar-section  { padding: 0 16px; margin-bottom: 24px; }
.sidebar-label    { font-size: 10px; font-weight: 700; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; padding: 0 8px; margin-bottom: 8px; }

.sport-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

.sport-item:hover  { background: var(--surface2); color: var(--ink); }
.sport-item.active { background: rgba(240,192,64,0.08); color: var(--gold-accent); }

[data-theme="light"] .sport-item.active { background: rgba(200,65,10,0.07); color: var(--red-accent); }

.sport-icon  { font-size: 16px; width: 20px; text-align: center; }

.sport-count {
    margin-left: auto;
    background: var(--surface2);
    border-radius: 4px;
    padding: 1px 7px;
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--muted);
}

.sport-item.active .sport-count {
    background: rgba(240,192,64,0.12);
    color: var(--gold-accent);
}

[data-theme="light"] .sport-item.active .sport-count {
    background: rgba(200,65,10,0.1);
    color: var(--red-accent);
}

.sidebar-divider { border: none; border-top: 1px solid var(--border); margin: 4px 16px 16px; }

/* ─── BETTING MAIN ─── */
.betting-main { padding: 24px; overflow-y: auto; background: var(--bg); transition: background 0.3s; }

/* Live Banner */
.live-banner {
    background: linear-gradient(135deg, rgba(224,92,42,0.1), rgba(240,192,64,0.05));
    border: 1px solid rgba(224,92,42,0.3);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.live-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-accent), transparent);
    animation: shimmerAnim 3s ease-in-out infinite;
}

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

.live-dot {
    width: 8px; height: 8px;
    background: var(--red-accent);
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 12px var(--red-accent);
    animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse { 0%,100% { transform:scale(1); opacity:1; } 50% { transform:scale(1.4); opacity:0.7; } }

.live-text           { font-size: 13px; color: var(--muted); flex: 1; }
.live-text strong    { color: var(--ink); font-weight: 600; }

.live-count {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 900;
    color: var(--red-accent);
    letter-spacing: 1px;
}

/* Section header */
.section-header      { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; margin-top: 8px; }
.section-title       { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--ink); }
.section-link        { font-size: 12px; color: var(--gold-accent); text-decoration: none; font-weight: 600; opacity: 0.8; transition: opacity 0.2s; }
.section-link:hover  { opacity: 1; }

/* ─── MATCH CARD ─── */
.matches-grid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 32px; }

.match-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.2s;
    animation: betFadeUp 0.4s ease both;
}

.match-card:hover { border-color: rgba(240,192,64,0.25); background: var(--surface2); transform: translateX(2px); }

.match-meta        { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.match-flag        { font-size: 14px; }
.match-league      { font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: 0.5px; text-transform: uppercase; }
.match-time        { font-family: var(--font-mono); font-size: 11px; color: var(--gold-accent); margin-left: auto; }

.live-badge {
    background: rgba(200,65,10,0.15);
    color: var(--red-accent);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 1px;
    animation: livePulse 2s ease-in-out infinite;
    margin-left: auto;
}

.match-teams { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }

.team       { display: flex; align-items: center; gap: 8px; flex: 1; }
.team.away  { flex-direction: row-reverse; }

.team-logo {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--bg2);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.team-name   { font-size: 14px; font-weight: 600; color: var(--ink); }

.match-score {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 900;
    color: var(--ink);
    letter-spacing: 3px;
    text-align: center;
    padding: 0 16px;
    min-width: 80px;
}

.match-score.live { color: var(--gold-accent); }

/* Odds */
.odds-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }

.odd-btn {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 7px 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.15s;
    font-family: inherit;
}

.odd-btn:hover    { border-color: var(--gold-accent); background: rgba(240,192,64,0.05); }
.odd-btn.selected { border-color: var(--gold-accent); background: rgba(240,192,64,0.08); }

.odd-label  { font-size: 11px; color: var(--muted); font-weight: 500; }
.odd-value  { font-family: var(--font-mono); font-size: 14px; font-weight: 500; color: var(--ink); }
.odd-btn.selected .odd-value { color: var(--gold-accent); }
.odd-up     { color: var(--green-accent) !important; }
.odd-down   { color: #e74c3c !important; }

/* ─── BETSLIP ─── */
.betslip {
    border-left: 1px solid var(--border);
    position: sticky;
    top: 62px;
    height: calc(100vh - 62px);
    overflow-y: auto;
    background: var(--bg);
    transition: background 0.3s, border-color 0.3s;
}

.betslip-inner  { padding: 20px; display: flex; flex-direction: column; gap: 16px; }

.betslip-header { display: flex; align-items: center; justify-content: space-between; }
.betslip-title  { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--ink); }

.betslip-count {
    background: var(--gold-accent);
    color: #080b10;
    border-radius: 50%;
    width: 20px; height: 20px;
    font-size: 11px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}

.bet-tabs {
    display: flex;
    background: var(--surface);
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
    border: 1px solid var(--border);
}

.bet-tab {
    flex: 1; padding: 6px;
    border-radius: 6px; border: none;
    background: transparent;
    color: var(--muted);
    font-size: 12px; font-weight: 600;
    cursor: pointer; font-family: inherit;
    transition: all 0.2s; letter-spacing: 0.3px;
}

.bet-tab.active { background: var(--surface2); color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,0.15); }

.bet-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    position: relative;
    animation: betFadeUp 0.3s ease both;
    transition: opacity 0.2s, transform 0.2s, background 0.3s;
}

.bet-item::before {
    content: '';
    position: absolute;
    left: 0; top: 20%; bottom: 20%;
    width: 3px;
    background: linear-gradient(180deg, var(--gold-accent), var(--red-accent));
    border-radius: 0 2px 2px 0;
}

.bet-remove {
    position: absolute; top: 10px; right: 10px;
    background: none; border: none; color: var(--muted);
    cursor: pointer; font-size: 14px; transition: color 0.2s;
    line-height: 1; padding: 2px;
}
.bet-remove:hover { color: #e74c3c; }

.bet-match   { font-size: 12px; color: var(--muted); margin-bottom: 3px; font-weight: 500; }
.bet-pick    { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.bet-odd-row { display: flex; justify-content: space-between; align-items: center; }
.bet-type    { font-size: 11px; color: var(--muted); }
.bet-odd     { font-family: var(--font-mono); font-size: 15px; font-weight: 500; color: var(--gold-accent); }

/* Stake */
.stake-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    margin-top: auto;
    transition: background 0.3s;
}

.stake-label  { font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 8px; }

.stake-input-wrap { position: relative; margin-bottom: 12px; }

.stake-currency {
    position: absolute; left: 12px; top: 50%;
    transform: translateY(-50%);
    color: var(--muted); font-family: var(--font-mono); font-size: 14px; pointer-events: none;
}

.stake-input {
    width: 100%;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px 10px 28px;
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 16px; font-weight: 500;
    outline: none;
    transition: border-color 0.2s, background 0.3s;
}

.stake-input:focus { border-color: var(--gold-accent); }

.quick-stakes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }

.quick-stake {
    background: var(--bg2);
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 5px; border-radius: 6px;
    font-size: 12px; font-weight: 600;
    cursor: pointer; font-family: inherit;
    transition: all 0.15s; text-align: center;
}
.quick-stake:hover { border-color: var(--gold-accent); color: var(--gold-accent); }

.payout-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-top: 1px solid var(--border); margin-bottom: 12px;
}

.payout-label        { font-size: 12px; color: var(--muted); }
.payout-value        { font-family: var(--font-display); font-size: 22px; font-weight: 900; color: var(--gold-accent); }
.payout-multiplier   { font-size: 11px; color: var(--muted); font-family: var(--font-mono); margin-top: 2px; }

.btn-place-bet {
    width: 100%;
    background: linear-gradient(135deg, var(--gold-accent), var(--red-accent));
    border: none; color: #080b10;
    padding: 13px; border-radius: 10px;
    font-family: var(--font-display);
    font-size: 17px; font-weight: 700;
    letter-spacing: 1px; cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 24px rgba(240,192,64,0.3);
}
.btn-place-bet:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(240,192,64,0.45); }

.bet-terms-note { font-size: 10px; color: var(--muted); text-align: center; line-height: 1.5; margin-top: 8px; }
.bet-terms-note a { color: var(--gold-accent); }

/* ─── RESPONSIVE ─── */
@media (max-width: 1100px) { .betting-layout { grid-template-columns: 180px 1fr 260px; } }
@media (max-width: 900px) {
    .betting-layout { grid-template-columns: 1fr; }
    .betting-sidebar, .betslip { display: none; }
    .stats-bar { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .stats-bar { grid-template-columns: 1fr 1fr; padding: 12px; gap: 6px; }
    .betting-main { padding: 16px; }
}
