:root {
    --bg-dark: #090e17; 
    --sidebar-bg: rgba(15, 23, 42, 0.4);
    --card-bg: linear-gradient(145deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-blue: #0ea5e9;
    --accent-blue-glow: rgba(14, 165, 233, 0.5);
    --accent-green: #10b981;
    --accent-red: #f43f5e;
    --accent-gold: #fbbf24;
    --border-color: rgba(255, 255, 255, 0.06);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { overflow: hidden; width: 100%; height: 100%; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    display: flex;
    height: 100vh; 
    width: 100vw;
    overflow: hidden; 
    position: relative;
}

body::before {
    content: ''; position: fixed; top: -50%; left: -10%; width: 120%; height: 120%;
    background: radial-gradient(circle at 50% 30%, rgba(14, 165, 233, 0.08) 0%, transparent 60%);
    z-index: -1; pointer-events: none;
}

.sidebar {
    width: 260px; background: var(--sidebar-bg);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-right: var(--glass-border); padding: 2.5rem 2rem;
    display: flex; flex-direction: column; z-index: 10;
}

.logo {
    font-family: 'Rajdhani', sans-serif; font-size: 1.5rem; font-weight: 700;
    margin-bottom: 3.5rem; letter-spacing: 1px; white-space: nowrap; overflow: hidden;
    background: linear-gradient(to right, #fff, var(--text-muted)); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.logo span { background: linear-gradient(135deg, #38bdf8, #0284c7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.nav-links { list-style: none; }
.nav-links li {
    padding: 1rem 1.2rem; margin-bottom: 0.5rem; border-radius: 10px; cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); color: var(--text-muted); font-weight: 600; position: relative;
}
.nav-links li:hover { color: #fff; background: rgba(255,255,255,0.03); }
.nav-links li.active { background: rgba(14, 165, 233, 0.1); color: #fff; box-shadow: inset 2px 0 0 var(--accent-blue); }

.content { flex: 1; padding: 2.5rem 3rem; overflow-y: auto; position: relative; height: 100%; width: 100%; box-sizing: border-box; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2.5rem; width: 100%; }

#page-title { font-family: 'Rajdhani', sans-serif; font-size: 2.8rem; font-weight: 700; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }

.search-box { margin-right: auto; margin-left: 30px; position: relative; }
.search-box input {
    background: rgba(255,255,255,0.05); border: var(--glass-border); padding: 10px 18px; border-radius: 8px; 
    color: white; outline: none; transition: all 0.3s ease; width: 220px; font-family: 'Inter', sans-serif; font-size: 0.9rem;
}
.search-box input:focus { background: rgba(255,255,255,0.1); width: 280px; border-color: var(--accent-blue); box-shadow: 0 0 15px rgba(14, 165, 233, 0.3); }

.pulse { width: 8px; height: 8px; background-color: var(--accent-green); border-radius: 50%; box-shadow: 0 0 8px var(--accent-green); animation: blink 1.5s ease-in-out infinite alternate; }
@keyframes blink { from { opacity: 0.3; transform: scale(0.8); } to { opacity: 1; transform: scale(1.1); } }

/* --- Dashboard Controls --- */
.dashboard-controls {
    background: rgba(15, 23, 42, 0.4); border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px; padding: 16px 20px; margin-bottom: 2rem; display: flex; flex-direction: column; gap: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2); backdrop-filter: blur(10px); width: 100%; box-sizing: border-box;
}
.controls-row { display: flex; align-items: center; padding-bottom: 12px; border-bottom: 1px dashed rgba(255,255,255,0.05); width: 100%; box-sizing: border-box; flex-wrap: wrap; gap: 10px; }
.controls-row:last-child { border-bottom: none; padding-bottom: 0; }
.controls-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 700; letter-spacing: 1px; width: 90px; display: flex; align-items: center; flex-shrink: 0; }
.row-label-wide { width: auto; margin-right: 20px; }
.selected-date-text { color: var(--accent-blue); margin-left: 8px; font-family: 'Rajdhani', sans-serif; font-size: 1.1rem; font-weight: bold; }

.tz-select-box { background: rgba(0,0,0,0.4); color: var(--text-main); border: 1px solid rgba(255,255,255,0.1); padding: 6px 12px; border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 0.85rem; outline: none; cursor: pointer; box-shadow: inset 0 2px 5px rgba(0,0,0,0.5); transition: border-color 0.2s; max-width: 100%; }
.tz-select-box:focus, .tz-select-box:hover { border-color: var(--accent-blue); }
.tz-select-box option { background: var(--bg-dark); color: var(--text-main); }

.date-picker-container { display: inline-flex; background: rgba(0,0,0,0.4); padding: 4px; border-radius: 12px; align-items: center; border: 1px solid rgba(255,255,255,0.05); box-shadow: inset 0 2px 5px rgba(0,0,0,0.5); margin-bottom: 0; width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.date-picker-container::-webkit-scrollbar { display: none; }
.date-btn { background: transparent; border: none; color: var(--text-muted); padding: 8px 20px; border-radius: 8px; cursor: pointer; font-size: 0.85rem; font-weight: 600; transition: all 0.3s; white-space: nowrap; }
.date-btn:hover { color: white; }
.date-btn.active { background: var(--accent-blue); color: white; box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4); }
.custom-date-wrapper { position: relative; width: 34px; height: 34px; margin-left: 8px; background: rgba(255,255,255,0.05); border-radius: 8px; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: all 0.2s; flex-shrink: 0; }
.custom-date-wrapper:hover { background: rgba(255,255,255,0.1); }
.custom-date-wrapper::before { content: '📅'; font-size: 1.1rem; pointer-events: none; }
.custom-date-input { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; box-sizing: border-box; }
.custom-date-input::-webkit-calendar-picker-indicator { position: absolute; top: 0; left: 0; width: 100%; height: 100%; margin: 0; padding: 0; cursor: pointer; }

/* Filter Bar (Matches Tab) */
.filter-bar { display: flex; gap: 8px; overflow-x: auto; flex: 1; padding-bottom: 12px; margin-bottom: 0; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent; width: 100%; }
.filter-bar::-webkit-scrollbar { height: 4px; }
.filter-bar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
.filter-btn { background: transparent; border: none; color: var(--text-muted); padding: 8px 16px; cursor: pointer; white-space: nowrap; font-size: 0.85rem; font-weight: 600; transition: all 0.3s ease; position: relative; text-transform: uppercase; letter-spacing: 0.5px; flex-shrink: 0; }
.filter-btn:hover { color: #fff; }
.filter-btn::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 0; height: 2px; background: var(--accent-blue); transition: width 0.3s ease; border-radius: 2px; }
.filter-btn.active { color: white; background: transparent; box-shadow: none; border: none; }
.filter-btn.active::after { width: 80%; box-shadow: 0 -2px 10px rgba(14, 165, 233, 0.6); }
.fav-filter { color: rgba(251, 191, 36, 0.7); }
.fav-filter:hover { color: #fbbf24; }
.fav-filter::after { background: #fbbf24; }
.fav-filter.active { color: #fbbf24; }
.fav-filter.active::after { box-shadow: 0 -2px 10px rgba(251, 191, 36, 0.6); }

/* --- PREMIUM DASHBOARD --- */
.premium-dashboard { display: flex; background: linear-gradient(135deg, rgba(30, 41, 59, 0.4), rgba(15, 23, 42, 0.7)); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1); margin-bottom: 25px; backdrop-filter: blur(15px); overflow: hidden; }
.stat-segment { flex: 1; padding: 25px 20px; position: relative; display: flex; align-items: center; gap: 15px; transition: background 0.3s; }
.stat-segment:hover { background: rgba(255,255,255,0.02); }
.stat-segment:not(:last-child)::after { content: ''; position: absolute; right: 0; top: 20%; height: 60%; width: 1px; background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.1), transparent); }
.stat-icon { font-size: 2.2rem; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3)); }
.stat-info { display: flex; flex-direction: column; }
.stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; margin-bottom: 4px; }
.stat-value { font-family: 'Rajdhani', sans-serif; font-size: 2.2rem; font-weight: 700; line-height: 1; color: white; text-shadow: 0 2px 10px rgba(0,0,0,0.4); }
.stat-sub { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }
.stat-segment:nth-child(1) .stat-value { color: var(--text-main); }
.stat-segment:nth-child(2) .stat-value { color: var(--accent-green); text-shadow: 0 0 15px rgba(16, 185, 129, 0.3); }
.stat-segment:nth-child(3) .stat-value { color: #a855f7; text-shadow: 0 0 15px rgba(168, 85, 247, 0.3); }
.stat-segment:nth-child(4) .stat-value.positive { color: var(--accent-green); text-shadow: 0 0 15px rgba(16, 185, 129, 0.3); }
.stat-segment:nth-child(4) .stat-value.negative { color: var(--accent-red); text-shadow: 0 0 15px rgba(244, 63, 94, 0.3); }
.stat-segment:nth-child(5) .stat-value { color: var(--accent-blue); text-shadow: 0 0 15px rgba(14, 165, 233, 0.3); } 

/* --- NEW: LEAGUE FILTER GRID (PREDICTIONS TAB) --- */
.league-filter-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px; margin-bottom: 25px; border-bottom: 1px dashed rgba(255,255,255,0.1); padding-bottom: 25px;
}
.league-filter-card {
    background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px; padding: 15px; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative; overflow: hidden;
}
.league-filter-card:hover { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.05); transform: translateY(-2px); }
.league-filter-card.active {
    border-color: var(--accent-blue); background: rgba(14, 165, 233, 0.1);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.2);
}

/* --- MATCH CARDS --- */
.loading-state { color: var(--text-muted); font-size: 1.2rem; grid-column: 1 / -1; text-align: center; padding: 3rem 0; width: 100%; }
.grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.8rem; width: 100%; }
.match-card { background: var(--card-bg); border: var(--glass-border); border-radius: 16px; padding: 1.8rem; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); position: relative; overflow: hidden; width: 100%; box-sizing: border-box; }
.match-card:hover { transform: translateY(-4px); border-color: rgba(14, 165, 233, 0.3); box-shadow: 0 12px 30px -10px rgba(14, 165, 233, 0.25), 0 4px 20px rgba(0,0,0,0.4); }
.card-header { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.5rem; border-bottom: var(--glass-border); padding-bottom: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.live-text { color: var(--accent-red) !important; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.live-text::before { content: ''; display: block; width: 6px; height: 6px; background: var(--accent-red); border-radius: 50%; box-shadow: 0 0 8px var(--accent-red); animation: blink 1s infinite alternate; }
.teams-container { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.team { display: flex; flex-direction: column; align-items: center; width: 32%; }
.team-logo { width: 54px; height: 54px; object-fit: contain; margin-bottom: 10px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3)); }
.team-name { font-size: 0.95rem; text-align: center; font-weight: 600; line-height: 1.2; word-break: break-word; }
.score-board { font-family: 'Rajdhani', sans-serif; font-size: 2.8rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 15px; background: rgba(0, 0, 0, 0.4); padding: 8px 20px; border-radius: 12px; border: inset 1px rgba(255,255,255,0.05); box-shadow: inset 0 2px 10px rgba(0,0,0,0.5); }
.colon { color: var(--text-muted); font-weight: 400; font-size: 2rem; margin-top: -4px;}
.ai-title { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; line-height: 1.5; }
.progress-bar { display: flex; height: 28px; border-radius: 14px; overflow: hidden; font-size: 0.75rem; line-height: 28px; text-align: center; font-weight: bold; box-shadow: inset 0 2px 6px rgba(0,0,0,0.4); background: rgba(0,0,0,0.3); }
.bar-home { background: linear-gradient(90deg, #0ea5e9, #0284c7); color: white; border-right: 1px solid rgba(0,0,0,0.3); }
.bar-draw { background: linear-gradient(90deg, #64748b, #475569); color: white; border-right: 1px solid rgba(0,0,0,0.3); }
.bar-away { background: linear-gradient(90deg, #f43f5e, #be123c); color: white; }

/* TICKET STYLES (PREDICTIONS TAB) */
.ticket-header { border-bottom: 1px dashed rgba(255,255,255,0.1); padding-bottom: 10px; margin-bottom: 10px; position: relative; }
.ticket-header::after, .ticket-header::before { content: ''; position: absolute; bottom: -6px; width: 12px; height: 12px; background: var(--bg-dark); border-radius: 50%; box-shadow: inset 0 1px 2px rgba(0,0,0,0.5); }
.ticket-header::before { left: -24px; } .ticket-header::after { right: -24px; }
.ai-context-box { display: flex; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: 8px; padding: 10px; margin-bottom: 15px; }
.context-item { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.context-divider { width: 1px; background: rgba(255,255,255,0.05); margin: 0 10px; }
.ctx-label { font-size: 0.6rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 4px; }
.ctx-value { font-weight: bold; font-family: 'Rajdhani', sans-serif; font-size: 1.1rem; text-transform: uppercase; }
.ai-alignment-badge { font-size: 0.75rem; font-weight: bold; padding: 2px 8px; border-radius: 4px; letter-spacing: 0.5px; }
.ai-alignment-badge.aligned { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); border: 1px solid rgba(16, 185, 129, 0.3); }
.ai-alignment-badge.diverged { background: rgba(168, 85, 247, 0.15); color: #a855f7; border: 1px solid rgba(168, 85, 247, 0.3); }
.prediction-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fin-box { background: rgba(255,255,255,0.03); padding: 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.05); text-align: center; }
.fin-label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 4px; letter-spacing: 0.5px; }
.fin-val { font-weight: bold; color: white; font-size: 1.2rem; font-family: 'Rajdhani', sans-serif; }

.value-bet-card { background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(0,0,0,0.5)); border: 1px solid var(--accent-green); border-radius: 8px; padding: 12px; margin-bottom: 15px; box-shadow: 0 0 15px rgba(16, 185, 129, 0.15); animation: pulse-border 2s infinite alternate; }
.ev-positive { color: var(--accent-green); font-weight: bold; text-shadow: 0 0 5px rgba(16, 185, 129, 0.5); }
.odds-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 10px; text-align: center; }
.odd-box { background: rgba(255,255,255,0.03); padding: 8px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.1); font-size: 0.8rem; }
.odd-value { font-family: 'Rajdhani', sans-serif; font-size: 1.2rem; font-weight: bold; color: white; margin-top: 4px; }
.fair-odd { color: var(--text-muted); font-size: 0.7rem; margin-top: 2px; }

.btn-predict { width: 100%; padding: 10px; margin: 10px 0 15px 0; background: linear-gradient(to bottom, rgba(14, 165, 233, 0.15), rgba(14, 165, 233, 0.05)); border: 1px solid rgba(14, 165, 233, 0.4); color: var(--accent-blue); border-radius: 8px; cursor: pointer; font-family: inherit; font-weight: 600; letter-spacing: 0.5px; transition: all 0.2s ease; }
.btn-predict:hover { background: var(--accent-blue); color: white; box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3); }
.h2h-row { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); padding: 8px 0; border-bottom: 1px dashed rgba(255,255,255,0.05); }

/* --- CART VOTING STATES --- */
.vote-btn.in-cart { border: 1px solid var(--accent-gold) !important; box-shadow: 0 0 15px rgba(251, 191, 36, 0.4) !important; color: var(--accent-gold) !important; background: rgba(251, 191, 36, 0.1) !important; transform: scale(1.05) !important; opacity: 1 !important; }
.vote-btn.confirmed { opacity: 1 !important; transform: scale(1.05) !important; }
.vote-btn.confirmed[data-choice="home"] { background: var(--accent-blue) !important; border-color: var(--accent-blue) !important; box-shadow: 0 0 15px rgba(14, 165, 233, 0.5) !important; color: white !important;}
.vote-btn.confirmed[data-choice="draw"] { background: #64748b !important; border-color: #64748b !important; box-shadow: 0 0 15px rgba(100, 116, 139, 0.5) !important; color: white !important;}
.vote-btn.confirmed[data-choice="away"] { background: var(--accent-red) !important; border-color: var(--accent-red) !important; box-shadow: 0 0 15px rgba(244, 63, 94, 0.5) !important; color: white !important;}

/* --- GLOBAL BET SLIP (FAB & DRAWER) --- */
.bet-slip-fab { position: fixed; bottom: 30px; right: 30px; width: 65px; height: 65px; background: linear-gradient(135deg, #f59e0b, #d97706); border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; box-shadow: 0 10px 25px rgba(245, 158, 11, 0.4), 0 0 0 4px rgba(245, 158, 11, 0.2); z-index: 999; transition: transform 0.2s, box-shadow 0.2s; }
.bet-slip-fab:hover { transform: scale(1.05) translateY(-5px); box-shadow: 0 15px 35px rgba(245, 158, 11, 0.6), 0 0 0 6px rgba(245, 158, 11, 0.3); }
.bet-slip-fab.pulse-anim { animation: fab-pulse 1s infinite alternate; }
@keyframes fab-pulse { 0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); } 100% { box-shadow: 0 0 0 15px rgba(245, 158, 11, 0); } }
.bet-slip-icon { font-size: 1.8rem; }
.bet-slip-badge { position: absolute; top: -5px; right: -5px; background: var(--accent-red); color: white; font-family: 'Rajdhani', sans-serif; font-size: 1rem; font-weight: bold; width: 28px; height: 28px; border-radius: 50%; display: flex; justify-content: center; align-items: center; border: 2px solid var(--bg-dark); box-shadow: 0 2px 5px rgba(0,0,0,0.5); }

.drawer-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); z-index: 10000; display: none; opacity: 0; transition: opacity 0.3s; }
.bet-slip-drawer { position: fixed; top: 0; right: -450px; width: 400px; max-width: 100vw; height: 100vh; background: rgba(15, 23, 42, 0.95); border-left: 1px solid rgba(255,255,255,0.1); box-shadow: -10px 0 30px rgba(0,0,0,0.8); z-index: 10001; display: flex; flex-direction: column; transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.bet-slip-drawer.open { right: 0; }
.drawer-header { padding: 25px 20px; border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; justify-content: space-between; align-items: center; background: linear-gradient(to right, rgba(255,255,255,0.02), transparent); }
.drawer-header h2 { font-family: 'Rajdhani', sans-serif; font-size: 1.5rem; letter-spacing: 1px; color: var(--accent-gold); text-shadow: 0 0 10px rgba(251, 191, 36, 0.3); }
.drawer-content { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 15px; }
.drawer-footer { padding: 25px 20px; background: rgba(0,0,0,0.5); border-top: 1px solid rgba(255,255,255,0.1); }
.summary-row { display: flex; justify-content: space-between; font-size: 1rem; color: var(--text-muted); margin-bottom: 10px; font-weight: 600; text-transform: uppercase; }
.summary-row span.val-white { color: white; font-family: 'Rajdhani', sans-serif; font-size: 1.5rem; font-weight: bold; }
.summary-row span.val-green { color: var(--accent-green); font-family: 'Rajdhani', sans-serif; font-size: 1.8rem; font-weight: bold; text-shadow: 0 0 15px rgba(16, 185, 129, 0.4); }
.btn-place-bets { width: 100%; padding: 15px; background: linear-gradient(90deg, #f59e0b, #d97706); color: white; border: none; border-radius: 8px; font-size: 1.1rem; font-weight: 800; font-family: 'Rajdhani', sans-serif; letter-spacing: 2px; cursor: pointer; box-shadow: 0 5px 15px rgba(245, 158, 11, 0.3); transition: all 0.2s; margin-top: 10px; }
.btn-place-bets:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5); }
.btn-place-bets:disabled { background: #475569; color: #94a3b8; cursor: not-allowed; box-shadow: none; transform: none; }

.cart-item { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 15px; position: relative; }
.cart-item-remove { position: absolute; top: 12px; right: 15px; background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.2rem; transition: color 0.2s; }
.cart-item-remove:hover { color: var(--accent-red); }
.cart-item-title { font-size: 0.8rem; font-weight: 600; color: white; margin-bottom: 8px; padding-right: 20px; line-height: 1.3; }
.cart-item-selection { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-family: 'Rajdhani', sans-serif; }
.cart-item-choice { color: var(--accent-gold); font-size: 1.2rem; font-weight: bold; text-transform: uppercase; }
.cart-item-odds { color: white; font-size: 1.2rem; font-weight: bold; background: rgba(0,0,0,0.5); padding: 2px 8px; border-radius: 4px; }
.cart-input-group { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,0.3); padding: 8px; border-radius: 8px; border: inset 1px rgba(255,255,255,0.05); }
.cart-input-prefix { color: var(--text-muted); font-weight: bold; }
.cart-stake-input { flex: 1; background: transparent; border: none; color: white; font-size: 1.2rem; font-family: 'Rajdhani', sans-serif; font-weight: bold; outline: none; width: 100%; }
.cart-stake-input::-webkit-outer-spin-button, .cart-stake-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.events-section { position: relative; padding: 25px 0 10px; }
.match-timeline { position: relative; width: 100%; margin: 15px 0; }
.match-timeline::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 2px; height: 100%; background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.1) 10%, rgba(255,255,255,0.1) 90%, transparent); }
.timeline-row { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-bottom: 20px; position: relative; }
.timeline-content { width: 42%; font-size: 0.85rem; line-height: 1.5; display: flex; flex-direction: column; }
.timeline-content.left { text-align: right; align-items: flex-end; }
.timeline-content.right { text-align: left; align-items: flex-start; }
.timeline-time { width: 36px; height: 36px; background: var(--bg-dark); border: 2px solid var(--accent-blue); color: #fff; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 0.8rem; font-weight: 700; position: absolute; left: 50%; transform: translateX(-50%); z-index: 2; box-shadow: 0 0 15px rgba(14, 165, 233, 0.5); font-family: 'Rajdhani', sans-serif; }
.event-icon { font-size: 1.2rem; margin: 0 8px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));}
.player-main { font-weight: 600; color: #fff; }
.player-sub-in { color: var(--accent-green); font-weight: 600; }
.player-sub-out { color: var(--text-muted); font-size: 0.75rem; text-decoration: line-through; }

.btn-expand-details { width: 100%; padding: 10px; margin-top: 15px; background: transparent; border: 1px dashed rgba(255,255,255,0.3); color: rgba(255,255,255,0.7); border-radius: 8px; cursor: pointer; font-size: 0.8rem; transition: all 0.2s; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.btn-expand-details:hover { background: rgba(255,255,255,0.05); color: white; border-color: rgba(255,255,255,0.3); }
.fav-btn { background: none; border: none; font-size: 1.3rem; color: rgba(255,255,255,0.2); cursor: pointer; margin-left: 10px; transition: all 0.3s; outline: none; }
.fav-btn:hover { color: #fde047; transform: scale(1.1); }
.fav-btn.active { color: #fbbf24; filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.5)); }

.match-center-tabs { display: flex; gap: 10px; background: rgba(0,0,0,0.3); padding: 4px; border-radius: 8px; margin-bottom: 20px; }
.mc-tab { flex: 1; text-align: center; padding: 8px 0; font-size: 0.8rem; color: var(--text-muted); cursor: pointer; border-radius: 6px; font-weight: 600; transition: all 0.2s; }
.mc-tab.active { background: var(--accent-blue); color: white; }
.stat-row { margin-bottom: 14px; }
.stat-labels { display: flex; justify-content: space-between; font-size: 0.75rem; margin-bottom: 6px; color: white; font-weight: 600; }
.stat-bar-container { display: flex; height: 6px; background: rgba(0,0,0,0.5); border-radius: 3px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,0.5); }
.stat-bar-home { background: var(--accent-blue); height: 100%; transition: width 0.5s ease; border-right: 1px solid rgba(0,0,0,0.3); }
.stat-bar-away { background: var(--accent-red); height: 100%; transition: width 0.5s ease; }
.lineup-title { font-weight: bold; color: var(--accent-blue); margin-bottom: 8px; border-bottom: 1px dashed rgba(255,255,255,0.1); padding-bottom: 6px; text-transform: uppercase;}

.team-clickable { cursor: pointer; transition: transform 0.2s; padding: 5px; border-radius: 8px; }
.team-clickable:hover { background: rgba(255,255,255,0.05); transform: scale(1.05); }

.toast-container { position: fixed; top: 20px; right: 20px; z-index: 99999; display: flex; flex-direction: column; gap: 10px; }
.toast { background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(10px); border-left: 4px solid var(--accent-green); box-shadow: 0 10px 30px rgba(0,0,0,0.5); padding: 15px 20px; border-radius: 8px; color: white; font-size: 0.9rem; animation: slideIn 0.3s ease forwards; display: flex; align-items: center; gap: 12px; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); backdrop-filter: blur(5px); z-index: 10000; display: flex; justify-content: center; align-items: center; }
.modal-content { background: var(--bg-dark); border: 1px solid rgba(255,255,255,0.1); width: 90%; max-width: 500px; border-radius: 16px; padding: 25px; position: relative; box-shadow: 0 20px 50px rgba(0,0,0,0.5); max-height: 90vh; overflow-y: auto; }
.close-modal { position: absolute; top: 15px; right: 20px; background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; transition: color 0.2s; z-index: 100; }
.close-modal:hover { color: white; }

.pitch-container { background: linear-gradient(180deg, #1a472a 0%, #2a5a3b 100%); border: 2px solid rgba(255,255,255,0.2); border-radius: 8px; position: relative; padding: 20px 0; margin-top: 15px; display: flex; flex-direction: column; gap: 20px; min-height: 250px; overflow: hidden; }
.pitch-container::before { content: ''; position: absolute; top: 50%; left: 0; width: 100%; height: 2px; background: rgba(255,255,255,0.3); }
.pitch-container::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 60px; height: 60px; border: 2px solid rgba(255,255,255,0.3); border-radius: 50%; }
.pitch-row { display: flex; justify-content: space-around; width: 100%; z-index: 2; }
.pitch-player { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pitch-number { width: 28px; height: 28px; background: rgba(255,255,255,0.9); color: #000; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 0.8rem; box-shadow: 0 4px 8px rgba(0,0,0,0.4); }
.pitch-name { color: white; font-size: 0.65rem; background: rgba(0,0,0,0.6); padding: 2px 6px; border-radius: 4px; white-space: nowrap; max-width: 70px; overflow: hidden; text-overflow: ellipsis; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(14, 165, 233, 0.5); }

@media (max-width: 1024px) {
    html { overflow-y: auto; height: auto; }
    body { display: block; height: auto; min-height: 100vh; overflow-y: visible; overflow-x: hidden; max-width: 100vw; }
    .topbar { flex-direction: column; align-items: flex-start; gap: 15px; }
    .search-box { margin-left: 0; width: 100%; }
    .search-box input, .search-box input:focus { width: 100%; }
    .content { padding: 1.2rem 1rem; padding-bottom: 100px; overflow-y: visible; height: auto; }
    #page-title { font-size: 2rem; }
    
    .sidebar { 
        position: fixed; bottom: 0; left: 0; width: 100%; height: 75px;
        flex-direction: row; padding: 0 10px; background: rgba(15, 23, 42, 0.85);
        border-right: none; border-top: var(--glass-border); z-index: 1000;
        backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    }
    .logo { display: none; }
    .nav-links { display: flex; width: 100%; justify-content: space-around; align-items: center; }
    .nav-links li { flex: 1; text-align: center; padding: 12px 0; margin-bottom: 0; font-size: 0.8rem; border-radius: 12px; display: flex; flex-direction: column; gap: 4px; }
    .nav-links li.active { box-shadow: none; background: transparent; color: var(--accent-blue); }
    .nav-links li.active::after { content: ''; display: block; width: 20px; height: 3px; background: var(--accent-blue); border-radius: 2px; margin: 2px auto 0; box-shadow: 0 0 8px var(--accent-blue); }

    .dashboard-controls { padding: 15px; }
    .controls-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    .controls-row:first-child { padding-bottom: 15px; }
    .controls-label.row-label-wide { margin-right: 0; width: 100%; justify-content: space-between; }
    .date-picker-container { width: 100%; display: flex; justify-content: space-between; }
    .date-btn { flex: 1; padding: 8px 4px; font-size: 0.8rem; text-align: center; }
    .custom-date-wrapper { margin-left: 6px; }
    .tz-select-box { width: 100%; }
    .controls-label { width: 100%; }
    .grid-container { grid-template-columns: 1fr; gap: 1.2rem; }
    .match-card { padding: 1.2rem; }
    .score-board { padding: 8px 12px; gap: 8px; }
    .score-board .score { font-size: 2.2rem; }
    .team-logo { width: 45px; height: 45px; }

    .premium-dashboard { flex-wrap: wrap; }
    .stat-segment { width: 50%; flex: auto; padding: 15px; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .stat-segment:not(:last-child)::after { display: none; }
    .stat-segment:nth-child(odd)::after { content: ''; display: block; position: absolute; right: 0; top: 20%; height: 60%; width: 1px; background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.1), transparent); }
    
    .bet-slip-fab { bottom: 90px; right: 20px; } 
}


.insights-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 25px;
    grid-column: 1 / -1; 
    align-items: start;
}

/* --- Left Panel: Radar & Hub --- */
.insights-left { display: flex; flex-direction: column; gap: 20px; }

.insight-panel {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    backdrop-filter: blur(12px);
}
.panel-header {
    font-family: 'Rajdhani', sans-serif; font-size: 1.2rem; font-weight: 700; color: var(--accent-blue);
    letter-spacing: 1px; margin-bottom: 20px; text-transform: uppercase; border-bottom: 1px dashed rgba(255,255,255,0.1); padding-bottom: 10px;
    display: flex; align-items: center; justify-content: space-between;
}

/* Radar Animation */
.radar-wrapper {
    position: relative; width: 150px; height: 150px; margin: 0 auto 25px;
    background: repeating-radial-gradient(circle at center, rgba(14, 165, 233, 0.05) 0, rgba(14, 165, 233, 0.05) 10%, transparent 10%, transparent 20%);
    border: 2px solid rgba(14, 165, 233, 0.4); border-radius: 50%;
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.2), inset 0 0 20px rgba(14, 165, 233, 0.2);
    overflow: hidden;
}
.radar-wrapper::before, .radar-wrapper::after { content: ''; position: absolute; background: rgba(14, 165, 233, 0.3); }
.radar-wrapper::before { top: 50%; left: 0; width: 100%; height: 1px; }
.radar-wrapper::after { top: 0; left: 50%; width: 1px; height: 100%; }
.radar-sweep {
    position: absolute; top: 0; left: 50%; width: 50%; height: 50%;
    background: linear-gradient(45deg, rgba(14, 165, 233, 0.6), transparent);
    transform-origin: 0% 100%; animation: radar-spin 2s linear infinite;
}
@keyframes radar-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Radar Match Cards */
.radar-match { background: rgba(0,0,0,0.3); border: 1px solid rgba(14, 165, 233, 0.2); border-radius: 8px; padding: 12px; margin-bottom: 10px; font-size: 0.8rem; }
.radar-match-header { display: flex; justify-content: space-between; color: var(--accent-blue); margin-bottom: 8px; font-weight: 600; font-size: 0.75rem; }
.radar-match-teams { display: flex; justify-content: space-between; align-items: center; color: white; font-weight: 600; }
.radar-vs { color: var(--text-muted); font-size: 0.7rem; }

/* League Hub Buttons */
.hub-btn {
    width: 100%; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); color: var(--text-muted);
    padding: 12px 15px; border-radius: 8px; margin-bottom: 8px; cursor: pointer; text-align: left; font-weight: 600; transition: all 0.3s;
    display: flex; align-items: center; gap: 10px;
}
.hub-btn:hover { background: rgba(255,255,255,0.08); color: white; transform: translateX(5px); }
.hub-btn.active { background: rgba(14, 165, 233, 0.15); border-color: var(--accent-blue); color: white; box-shadow: inset 4px 0 0 var(--accent-blue); }
.hub-btn img { width: 24px; height: 24px; object-fit: contain; }

/* --- Right Panel: Data Tables --- */
.insights-right { display: flex; flex-direction: column; gap: 20px; }

.insights-tabs { display: flex; gap: 10px; background: rgba(0,0,0,0.4); padding: 5px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); }
.i-tab {
    flex: 1; padding: 12px; background: transparent; border: none; color: var(--text-muted); font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem; font-weight: 700; cursor: pointer; border-radius: 8px; transition: all 0.3s; letter-spacing: 1px;
}
.i-tab:hover { color: white; }
.i-tab.active { background: var(--accent-blue); color: white; box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4); }

.glass-table-container { overflow-x: auto; }
.glass-table { width: 100%; border-collapse: separate; border-spacing: 0 6px; text-align: left; font-size: 0.85rem; }
.glass-table th { padding: 12px 15px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1px; border-bottom: 1px dashed rgba(255,255,255,0.1); }
.glass-table td { padding: 12px 15px; background: rgba(255,255,255,0.02); color: white; border-top: 1px solid rgba(255,255,255,0.03); border-bottom: 1px solid rgba(255,255,255,0.03); }
.glass-table tr td:first-child { border-left: 1px solid rgba(255,255,255,0.03); border-radius: 8px 0 0 8px; font-weight: bold; color: var(--text-muted); }
.glass-table tr td:last-child { border-right: 1px solid rgba(255,255,255,0.03); border-radius: 0 8px 8px 0; }
.glass-table tr:hover td { background: rgba(255,255,255,0.05); }

.team-cell { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.team-cell img { width: 24px; height: 24px; }
.form-balls { display: flex; gap: 4px; }
.form-ball { width: 18px; height: 18px; border-radius: 4px; display: inline-flex; justify-content: center; align-items: center; font-size: 0.6rem; font-weight: bold; color: white; }
.form-W { background: var(--accent-green); } .form-D { background: #64748b; } .form-L { background: var(--accent-red); }

/* Scorers Grid */
.scorers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; }
.scorer-card { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: 12px; padding: 15px; text-align: center; position: relative; transition: transform 0.2s; }
.scorer-card:hover { transform: translateY(-3px); background: rgba(255,255,255,0.05); border-color: var(--accent-blue); }
.scorer-rank { position: absolute; top: 10px; left: 10px; width: 24px; height: 24px; background: var(--accent-blue); color: white; font-family: 'Rajdhani', sans-serif; font-weight: bold; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 5px rgba(0,0,0,0.5); }
.scorer-img { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.1); margin-bottom: 10px; background: var(--bg-dark); }
.scorer-name { font-weight: 600; color: white; font-size: 0.95rem; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scorer-team { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 12px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.scorer-team img { width: 16px; height: 16px; }
.scorer-stats { display: flex; justify-content: center; gap: 15px; background: rgba(0,0,0,0.3); padding: 8px; border-radius: 8px; }
.s-stat { display: flex; flex-direction: column; }
.s-val { font-family: 'Rajdhani', sans-serif; font-weight: bold; font-size: 1.3rem; color: var(--accent-green); line-height: 1; }
.s-lbl { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; margin-top: 2px; }

/* Responsive */
@media (max-width: 1024px) {
    .insights-layout { grid-template-columns: 1fr; gap: 20px; }
}