:root {
    --primary-color: #ff3b3b;
    --primary-light: #ff7675;
    --primary-bg: rgba(255, 59, 59, 0.05);
    --surface-color: #ffffff;
    --background-color: #f8f9fa;
    --text-primary: #1a1a1a;
    --text-secondary: #6c757d;
    --border-color: #e9ecef;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --tab-purple: #8b5cf6; 
    
    --sidebar-width: 260px;
    --header-height: 70px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body.dark-mode {
    --background-color: #111111;
    --surface-color: #1e1e1e;
    --text-primary: #f8f9fa;
    --text-secondary: #adb5bd;
    --border-color: #2c2c2c;
    --glass-bg: rgba(26, 26, 26, 0.95);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
}


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

/* Auth Navigation Buttons */
.auth-nav-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.auth-nav-btn.login {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}
.auth-nav-btn.login:hover {
    background: rgba(25, 118, 210, 0.05);
}
.auth-nav-btn.register {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(25, 118, 210, 0.2);
}
.auth-nav-btn.register:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(25, 118, 210, 0.3);
}

.spinner {
    width: 40px; height: 40px;
    border: 3px solid rgba(25,118,210,0.1);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Modals */
.modal-overlay {
    position: fixed; inset: 0; 
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center; z-index: 1000;
    transition: opacity 0.3s;
}
.modal-overlay.active { display: flex; animation: fadeIn 0.2s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
    background: var(--surface-color); border-radius: 20px; padding: 32px;
    width: 90%; max-width: 400px; position: relative;
    box-shadow: var(--shadow-lg); animation: slideUp 0.3s;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-close { position: absolute; top: 16px; right: 16px; cursor: pointer; color: var(--text-secondary); }
.modal-title { font-size: 24px; font-weight: 900; margin-bottom: 8px; text-align: center; }
.modal-subtitle { text-align: center; color: var(--text-secondary); font-size: 14px; margin-bottom: 30px; }

.modal-input-group { margin-bottom: 16px; }
.modal-input-group label { display: block; font-size: 11px; font-weight: bold; color: var(--text-secondary); margin-bottom: 4px; }
.modal-input {
    width: 100%; padding: 12px 16px; border-radius: 12px;
    border: 1px solid var(--border-color); background: var(--background-color);
    font-size: 15px; outline: none; transition: border-color 0.2s;
}
.modal-input:focus { border-color: var(--primary-color); }

.modal-btn {
    width: 100%; padding: 14px; border-radius: 12px;
    background: var(--primary-color); color: white;
    border: none; font-weight: bold; font-size: 15px;
    cursor: pointer; margin-top: 10px;
}
.modal-divider { text-align: center; margin: 20px 0; font-size: 12px; color: var(--text-secondary); position: relative; }
.modal-divider::before, .modal-divider::after { content: ""; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--border-color); }
.modal-divider::before { left: 0; } .modal-divider::after { right: 0; }

.google-btn {
    width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--border-color);
    background: var(--surface-color); color: var(--text-primary); font-weight: 500; font-size: 14px;
    display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer;
}
.google-btn img { width: 18px; }

body { background-color: var(--background-color); color: var(--text-primary); font-family: 'Roboto', sans-serif; margin: 0; }

/* Sidebar & Mobile Nav */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--surface-color);
    border-right: 1px solid var(--border-color);
    padding: 24px 0 0 0;
    z-index: 100;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.sidebar-footer {
    margin-top: auto;
    padding: 24px;
    border-top: 1px solid var(--border-color);
    background: rgba(0,0,0,0.01);
}

.app-badge {
    display: block;
    margin-bottom: 12px;
    transition: transform 0.2s;
}
.app-badge:hover {
    transform: scale(1.02);
}
.app-badge img {
    width: 130px;
    border-radius: 6px;
    display: block;
}

.sidebar-logo {
    font-size: 24px;
    font-weight: 900;
    padding: 0 24px;
    margin-bottom: 40px;
}

.sidebar-logo .highlight {
    color: var(--primary-color);
}

.logo-brand {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-brand b {
    font-weight: 900;
    color: var(--primary-color);
}

@media (max-width: 992px) {
    .logo-brand {
        font-size: 20px;
    }
}

.nav-links {
    list-style: none;
}

.nav-links li {
    margin-bottom: 2px;
}

.nav-links a {
    display: flex;
    align-items: center;
    padding: 10px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    gap: 12px;
}

.nav-links a:hover, .nav-links li.active a {
    color: var(--primary-color);
    background: var(--primary-bg);
    border-right: 4px solid var(--primary-color);
}

.nav-links .material-icons {
    font-size: 22px;
}

.sub-nav {
    list-style: none;
    margin-top: 4px;
    padding-left: 40px !important;
}

.sub-nav li a {
    padding: 6px 0 !important;
    font-size: 14px !important;
    border: none !important;
    background: transparent !important;
    color: var(--text-secondary) !important;
}

.sub-nav li a:hover {
    color: var(--primary-color) !important;
}

.sub-nav li a .material-icons {
    font-size: 18px !important;
}

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--surface-color);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 100;
    padding: 10px 0;
    padding-bottom: env(safe-area-inset-bottom, 10px);
    justify-content: space-around;
}

.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    gap: 4px;
}

.mobile-bottom-nav a.active {
    color: var(--primary-color);
}

/* Main Layout */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.top-nav {
    height: var(--header-height);
    background: var(--surface-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
    border-bottom: 1px solid var(--border-color);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-toggle-btn {
    display: none;
}

.header-logo {
    display: flex;
    align-items: center;
}

.sport-selector {
    position: relative;
    background: rgba(0,0,0,0.05);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.sport-selector:hover {
    background: rgba(0,0,0,0.08);
}

.sport-selector select {
    appearance: none;
    background: transparent;
    border: none;
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
    padding-right: 4px;
    outline: none;
    cursor: pointer;
}

.sport-selector .dropdown-icon {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--background-color);
    border-radius: 20px;
    padding: 8px 16px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.search-bar:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-bg);
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    padding-left: 8px;
    font-size: 14px;
    width: 200px;
}

.search-icon {
    color: var(--text-secondary);
    font-size: 20px;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: var(--transition);
}

.icon-btn:hover {
    background: rgba(0,0,0,0.05);
}

.search-toggle-btn {
    display: none;
}

/* Date Header Redesign */
.date-header {
    background: var(--surface-color);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: var(--header-height);
    z-index: 85;
}

.date-bubbles {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
    padding: 4px 0;
}
.date-bubbles::-webkit-scrollbar { display: none; }

.date-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    height: 64px;
    background: var(--background-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid transparent;
}
.date-bubble:hover { background: #f0f2f5; }
.date-bubble.active {
    background: var(--primary-bg);
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.date-bubble .day-label { font-size: 11px; font-weight: 700; opacity: 0.7; margin-bottom: 2px; text-transform: uppercase; }
.date-bubble .date-val { font-size: 16px; font-weight: 900; }

.date-bubble.active .day-label { color: var(--primary-color); opacity: 1; }

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

.calendar-btn {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: var(--background-color); border: 1.5px solid var(--border-color);
    cursor: pointer; color: var(--text-primary); transition: all 0.2s;
    position: relative;
}
.calendar-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }

.live-btn {
    background: #FFEBEE;
    color: #D32F2F;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 900;
    font-size: 13px;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all 0.2s;
}
.live-btn.active {
    background: #D32F2F;
    color: white;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.4);
}

/* Main Content & Cards */
.content-area {
    padding: 6px 12px;
    flex: 1;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 10px;
    align-items: start;
}

.matches-column {
    min-width: 0;
}

/* Tips Mini Column */
.tips-column {
    background: var(--surface-color);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: calc(var(--header-height) + 90px);
    max-height: calc(100vh - var(--header-height) - 100px);
    overflow-y: auto;
    scrollbar-width: thin;
}

.tips-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--surface-color);
    z-index: 2;
}

.tips-list {
    padding: 0;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.tip-item:hover {
    background: var(--background-color);
}

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

.tip-teams {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.tip-team-name {
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.tip-badge {
    background: var(--primary-bg);
    color: var(--primary-color);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.tip-conf {
    font-size: 9px;
    font-weight: 700;
    color: #2e7d32;
    background: rgba(76, 175, 80, 0.12);
    padding: 2px 5px;
    border-radius: 3px;
    flex-shrink: 0;
}

.tip-time {
    font-size: 9px;
    color: var(--text-secondary);
    font-weight: 600;
    min-width: 30px;
    text-align: center;
    flex-shrink: 0;
}

.tips-empty {
    padding: 20px 12px;
    text-align: center;
    font-size: 11px;
    color: var(--text-secondary);
}

@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    .tips-column {
        display: none;
    }
}

.league-card {
    background: var(--surface-color);
    border-radius: 6px;
    margin-bottom: 3px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.league-card:hover {
    box-shadow: var(--shadow-md);
}

.league-header {
    padding: 6px 12px;
    background: var(--surface-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 11px;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-secondary);
}

.league-header.expanded {
    border-bottom-color: var(--border-color);
}

.league-header .material-icons {
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.league-header.expanded .material-icons {
    transform: rotate(180deg);
}

.match-list {
    display: none;
}

.match-list.show {
    display: block;
}

.match-item {
    padding: 4px 12px;
    border-bottom: 1px solid var(--border-color);
    background: var(--surface-color);
    transition: var(--transition);
    cursor: pointer;
}

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

.match-item:hover {
    background: var(--background-color);
}

/* Sofascore-style 3-column match row */
.match-row {
    display: grid;
    grid-template-columns: 46px 1fr auto;
    align-items: center;
    gap: 0;
    min-height: 40px;
}

/* Left: Time/Status column */
.time-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-right: 8px;
    border-right: 1px solid var(--border-color);
    min-height: 36px;
}

.time-col .match-time {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.time-col .match-status {
    font-size: 9px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 1px;
}

.time-col .match-status.live {
    color: var(--primary-color);
    font-weight: 700;
}

.time-col .match-status.ft {
    color: #03a9f4;
    font-weight: 600;
}

/* Middle: Teams stacked column */
.teams-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 2px 10px;
    overflow: hidden;
}

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

.team-logo {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
}

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

/* Right: Score + Odds column */
.score-odds-col {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 8px;
}

.score-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    min-width: 28px;
}

.score-val {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.score-val.ft {
    color: #03a9f4;
}

.score-val.live {
    color: var(--primary-color);
}

/* Inline odds in the right column */
.odds-inline {
    display: flex;
    gap: 3px;
    align-items: center;
}

.odd-box {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    padding: 1px 6px;
    text-align: center;
    min-width: 36px;
}

.odd-label {
    font-size: 8px;
    color: var(--text-secondary);
    line-height: 1;
}

.odd-val {
    font-size: 10px;
    font-weight: 700;
    line-height: 1.3;
}

/* Legacy classes kept for compatibility */
.odds-row {
    display: none;
}

.score-col, .vs-text, .score-time {
    display: none;
}

.prediction-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2px;
    padding-top: 2px;
    border-top: 1px solid var(--border-color);
}

.pred-brain {
    font-size: 13px;
    font-weight: bold;
}

.pred-probs {
    display: flex;
    gap: 8px;
}

.pred-prob-badge {
    background: var(--background-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.pred-confidence {
    background: rgba(76, 175, 80, 0.15);
    color: #2e7d32;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

/* Loaders & Empty State */
.loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.no-matches {
    text-align: center;
    color: var(--text-secondary);
    font-size: 16px;
    margin-top: 40px;
}

/* Footer */
.footer {
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: auto;
}

/* --- IMPROVED SEO FOOTER --- */
.app-footer {
    width: 100%;
    margin-top: 80px;
    padding: 60px 40px 40px;
    background: var(--surface-color);
    border-top: 2px solid var(--border-color);
    color: var(--text-primary);
    font-size: 14px;
    display: block !important;
}

/* Hide legacy footers */
.footer, footer:not(.app-footer) {
    display: none !important;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-title {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s, transform 0.2s;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

.brand-col .footer-logo {
    font-size: 26px;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.brand-col .highlight {
    color: var(--primary-color);
}

.footer-mission {
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 280px;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 13px;
}


.social-links {
    display: flex;
    gap: 16px;
}

.social-links .material-icons {
    cursor: pointer;
    font-size: 20px;
    transition: color 0.2s;
}

.social-links .material-icons:hover {
    color: var(--primary-color);
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px 20px;
    }
}

@media (max-width: 600px) {
    .app-footer {
        padding: 40px 20px;
        margin-top: 40px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    .footer-mission {
        margin: 0 auto;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* --- DETAILS VIEW OVERLAY REDESIGN --- */
.details-view {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    height: 100vh;
    background: var(--background-color);
    z-index: 200;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.details-appbar {
    position: sticky;
    top: 0;
    background: var(--surface-color);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 210;
}

.details-appbar-title {
    font-weight: 900;
    font-size: 18px;
    color: var(--text-primary);
}

.details-banner2 {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 40px 30px;
    background: var(--surface-color);
}

.team-col-lg {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 35%;
    text-align: center;
}

.team-col-lg img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

.team-name-lg {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
}

.score-col-lg {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.det-score-vs {
    font-size: 32px;
    font-weight: 900;
    color: var(--text-primary);
}

.det-status {
    background: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
}

.det-status.ht, .det-status.ft {
    background: transparent;
}
.det-status.ft { color: #d32f2f; }
.det-status.ht { color: #0288d1; }

.details-tabs {
    display: flex;
    overflow-x: auto;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    scrollbar-width: none;
    padding: 0 16px;
    justify-content: center;
}

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

.tab-btn {
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 16px 20px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: 0.3s;
}

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

.tab-btn.active {
    color: var(--tab-purple);
    border-bottom-color: var(--tab-purple);
}

.details-body {
    padding: 16px 32px 40px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

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

.tab-content.active {
    display: block;
}

/* Standing Table */
.standing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: var(--surface-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.standing-table th {
    color: var(--text-secondary);
    font-weight: 600;
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid var(--border-color);
}

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

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

.standing-table tr.highlight {
    background: #f0f4ff;
    font-weight: bold;
}

.td-team-col {
    display: flex;
    align-items: center;
    gap: 8px;
}

.td-team-col img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.det-pred-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 16px;
}

.info-card {
    background: var(--surface-color);
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.info-card-padding {
    padding: 16px;
}

.detail-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
}

.detail-icon {
    font-size: 20px;
    color: var(--text-secondary);
    margin-right: 12px;
}

.detail-label {
    font-size: 14px;
    color: var(--text-secondary);
    flex: 1;
}

.detail-val {
    font-size: 14px;
    font-weight: 600;
}

.detail-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

.timeline-header {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 24px 0 16px 8px;
    letter-spacing: 1px;
}

.timeline-container {
    display: flex;
    flex-direction: column;
}

.timeline-event {
    display: flex;
    margin-bottom: 4px;
}

.timeline-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8px;
}

.timeline-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 40px;
}

.timeline-line {
    width: 2px;
    height: 20px;
    background: var(--border-color);
}

.timeline-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    z-index: 2;
    margin: 4px 0;
}

.event-badge {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.timeline-side.left .event-badge {
    margin-right: 8px;
}

.timeline-side.right .event-badge {
    margin-left: 8px;
}

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

.event-icon.goal { color: #4CAF50; }
.event-icon.card-yellow { color: #FFC107; }
.event-icon.card-red { color: #F44336; }
.event-icon.sub { color: #2196F3; }

.event-player {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 2px;
}

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

@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.active { transform: translateX(0); box-shadow: var(--shadow-lg); }
    .menu-toggle-btn { display: flex; }
    
    .main-wrapper { margin-left: 0; padding-bottom: 60px; }
    .details-view { left: 0; width: 100%; padding-bottom: 60px; }
    .top-nav { padding: 0 16px; }
    .header-logo { display: flex; }
    .top-nav { padding: 0 16px; }
    
    .search-bar { display: none; position: absolute; top: var(--header-height); left: 0; width: 100%; border-radius: 0; padding: 12px 16px; background: var(--surface-color); border: none; border-bottom: 1px solid var(--border-color); z-index: 89; }
    .search-bar.active { display: flex; }
    .search-bar input { width: 100%; }
    .search-toggle-btn { display: flex; }
    
    .date-header { padding: 12px; overflow-x: auto; white-space: nowrap; justify-content: flex-start; scrollbar-width: none; }
    .date-header::-webkit-scrollbar { display: none; }
    .content-area { padding: 8px; }
    .team-name { max-width: 90px; }
    
    .odd-box { padding: 6px 16px; }

    .details-tabs { justify-content: flex-start; }
    .details-body { padding: 16px 16px 40px; }
    .standing-table th { padding: 10px 6px; font-size: 12px; }
    .standing-table td { padding: 10px 6px; font-size: 12px; }
}

/* Settings Modal Specific Styles */
.settings-modal-card {
    max-width: 500px;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.settings-modal-content {
    overflow-y: auto;
    padding-bottom: 20px;
}

.settings-header {
    padding: 30px 20px;
    text-align: center;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--background-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    border: 1px solid var(--border-color);
}
.profile-avatar span { font-size: 45px; color: var(--text-secondary); }
.user-name { font-size: 18px; font-weight: bold; margin-bottom: 4px; }
.pro-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    background: rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}
.pro-badge.active {
    background: rgba(25, 118, 210, 0.1);
    border-color: rgba(25, 118, 210, 0.5);
    color: var(--primary-color);
}

.section-title {
    padding: 24px 20px 12px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1.2px;
    color: var(--text-secondary);
}

.settings-list { background: var(--surface-color); }
.settings-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}
.settings-item:last-child { border-bottom: none; }
.settings-item:hover { background: rgba(0,0,0,0.02); }
.settings-item .material-icons { margin-right: 16px; color: var(--primary-color); }
.settings-item .item-text { flex: 1; }
.settings-item .item-text .title { font-size: 15px; font-weight: 500; }
.settings-item .item-text .subtitle { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 14px; width: 14px;
    left: 3px; bottom: 3px;
    background-color: var(--surface-color);
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider { background-color: var(--primary-color); }
input:checked + .slider:before { transform: translateX(20px); }

.logout-btn {
    display: block;
    width: fit-content;
    margin: 30px auto 10px;
    color: #d32f2f;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
}
.version-text {
    text-align: center;
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.6;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .settings-modal-card {
        width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
    }
}

