/* Variables */
:root {
    --bg-page: #040914;      /* Deep dark navy background */
    --bg-header: #071022;    /* Header background */
    --bg-panel: #0b1528;     /* Panels, sidebars */
    --bg-hover: #14213a;     /* Hover state */
    --bg-card: #111c34;      /* Match cards */
    --border-color: #1e2c4f; /* Borders */
    
    --text-main: #f8fafc;    /* Primary text */
    --text-muted: #94a3b8;   /* Secondary text */
    --text-dark: #64748b;
    
    --accent-blue: #3b82f6;  /* Blue actions */
    --accent-red: #ef4444;   /* Live/Hot/Red actions */
    --accent-red-dim: rgba(239, 68, 68, 0.15);
    --accent-gold: #f59e0b;  /* Stars/Hot */
    
    --font-sans: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --transition: all 0.2s ease;
}

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

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--text-main); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-blue); }
ul { list-style: none; }
button { cursor: pointer; border: none; outline: none; transition: var(--transition); font-family: inherit; }

/* Utilities */
.text-accent { color: var(--accent-gold); }
.text-danger { color: var(--accent-red); }

/* Header */
.site-header {
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-branding a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
}
.logo-icon { color: var(--accent-blue); font-size: 24px; }
.main-navigation ul {
    display: flex;
    gap: 30px;
}
.main-navigation a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 16px;
    padding: 20px 0;
    position: relative;
}
.main-navigation .current-menu-item a,
.main-navigation a:hover {
    color: var(--accent-blue);
}
.main-navigation .current-menu-item a::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--accent-blue);
    border-radius: 3px 3px 0 0;
}
.auth-btn:hover { background: #2563eb; color: #fff; }

/* Dynamic League Bar */
.league-nav-bar {
    background-color: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
}
.league-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    gap: 12px;
}
.league-nav-container::-webkit-scrollbar { display: none; } /* Chrome/Safari */

.league-nav-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    padding: 6px 16px;
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
}
.league-nav-item:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}
.league-nav-item.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #fff;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

/* Match Page styles */
.mobile-menu-toggle { display: none; background: transparent; border: none; color: var(--text-main); font-size: 24px; cursor: pointer; padding: 10px; }

/* Main Layout */
.main-layout-container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 240px 1fr 300px;
    gap: 20px;
    min-height: calc(100vh - 200px);
}

/* Left Sidebar */
.sidebar-left, .sidebar-right {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 0; /* Gaps are handled by widget margins */
}

.sport-nav .nav-item a {
    display: block;
    padding: 12px 16px;
    background: var(--bg-hover);
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-main);
}
.category-group { margin-top: 25px; }
.group-title {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.league-list li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
    border-radius: 6px;
    color: var(--text-main);
    font-size: 14px;
}
.league-list li a:hover { background: var(--bg-hover); color: var(--accent-blue); }
.league-icon { width: 20px; border-radius: 2px; }
.league-img { border-radius: 50%; object-fit: contain; }

/* Center Content */
.content-center { display: flex; flex-direction: column; gap: 20px; }
.hero-video-banner {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: #000;
    aspect-ratio: 16/9;
}
.video-placeholder {
    width: 100%; height: 100%;
    background-image: url('https://images.unsplash.com/photo-1522778119026-d647f0596c20?q=80&w=1200&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
}
.video-placeholder::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 100%);
}
.video-play-icon { font-size: 48px; color: rgba(255,255,255,0.8); z-index: 10; transition: transform 0.2s; }
.video-placeholder:hover .video-play-icon { transform: scale(1.1); color: #fff;}
.video-overlay {
    position: absolute; bottom: 20px; left: 20px; z-index: 10;
}
.live-badge {
    background: var(--accent-red);
    color: #fff; font-size: 12px; font-weight: 600;
    padding: 4px 8px; border-radius: 4px; display: inline-block; margin-bottom: 8px;
}
.video-overlay h2 { font-size: 24px; font-weight: 600; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }

/* Schedule Section */
.schedule-section { background: var(--bg-panel); border-radius: 12px; padding: 20px; }
.date-tabs { display: flex; gap: 10px; margin-bottom: 20px; border-bottom: 1px solid var(--border-color); padding-bottom: 15px;}
.date-tab {
    background: transparent;
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--border-color);
}
.date-tab.active, .date-tab:hover {
    background: var(--accent-blue); color: #fff; border-color: var(--accent-blue);
}

.match-list { display: flex; flex-direction: column; gap: 10px; }
.match-item {
    display: grid;
    grid-template-columns: 80px 100px 1fr 100px;
    align-items: center;
    padding: 15px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid transparent;
    transition: var(--transition);
}
.match-item:hover { border-color: var(--border-color); background: var(--bg-hover); }

.match-time { display: flex; flex-direction: column; font-size: 13px; }
.time-text { color: var(--text-main); font-weight: 600; }
.status-live { color: var(--accent-red); font-size: 12px; }
.status-upcoming, .status-finished { color: var(--text-muted); font-size: 12px;}

.match-league { color: var(--text-muted); font-size: 13px; text-align: center;}

.match-teams {
    display: grid; grid-template-columns: 1fr 80px 1fr; align-items: center; text-align: center; gap: 10px;
}
.home-team { justify-content: flex-end; }
.away-team { justify-content: flex-start; }
.team { display: flex; align-items: center; gap: 10px; }
.team-logo { width: 24px; height: 24px; border-radius: 50%; object-fit: cover;}
.team-logo-placeholder { width: 24px; height: 24px; border-radius: 50%; }
.blue-circle { background: #1d4ed8; } .orange-circle { background: #ea580c; }
.team-name { font-size: 15px; font-weight: 500; }
.team-name.highlight { font-weight: 700; color: #fff;}

.match-score { font-size: 20px; font-weight: 700; display: flex; justify-content: center; gap: 5px;}
.vs-text { color: var(--text-muted); font-size: 14px; display: flex; align-items: center; font-weight: normal;}
.live-match .match-score { color: var(--accent-red); }
.score-highlight { color: #fff;}
.score-muted { color: var(--text-muted); font-weight: 500;}

.match-actions { display: flex; justify-content: flex-end; gap: 10px;}
.btn-action {
    display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
    font-size: 12px; padding: 6px 12px; border-radius: 12px; border: 1px solid var(--border-color);
    background: transparent; color: var(--text-muted);
}
.btn-action:hover { background: var(--bg-hover); color: var(--text-main);}
.btn-watch { background: var(--accent-red-dim); color: var(--accent-red); border-color: transparent;}
.btn-watch:hover { background: var(--accent-red); color: #fff;}

.load-more-btn {
    width: 100%; display: block; padding: 12px; background: transparent; border: 1px solid var(--border-color);
    border-radius: 8px; color: var(--text-muted); margin-top: 15px; text-align: center; font-size: 14px;
}
.load-more-btn:hover { background: var(--bg-hover); color: var(--text-main);}

.load-more-results-title { margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--border-color); font-weight: 600; color: var(--text-main); font-size: 16px;}

/* Right Sidebar */
.widget-box { margin-bottom: 25px; }
.widget-title { font-size: 16px; font-weight: 600; margin-bottom: 15px; display: flex; align-items: center; gap: 8px;}
.more-link { margin-left: auto; font-size: 12px; color: var(--text-muted); font-weight: normal;}
.more-link:hover { color: var(--accent-blue);}

.news-list { display: flex; flex-direction: column; gap: 12px;}
.news-list li { display: flex; gap: 10px; align-items: flex-start;}
.news-rank { width: 20px; height: 20px; border-radius: 4px; background: var(--bg-card); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: var(--text-muted); flex-shrink: 0;}
.rank-1 { background: #ef4444; color: #fff;}
.rank-2 { background: #f97316; color: #fff;}
.rank-3 { background: #f59e0b; color: #fff;}
.news-list a { font-size: 13px; color: var(--text-main); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4;}
.news-list a:hover { color: var(--accent-blue);}

.video-grid { display: flex; flex-direction: column; gap: 15px;}
.video-card { display: flex; gap: 10px;}
.video-thumb { position: relative; width: 100px; height: 60px; border-radius: 6px; overflow: hidden; flex-shrink: 0;}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-thumb .duration { position: absolute; bottom: 4px; right: 4px; background: rgba(0,0,0,0.7); color: #fff; font-size: 10px; padding: 2px 4px; border-radius: 3px;}
.video-info { display: flex; flex-direction: column; justify-content: center; overflow: hidden;}
.v-title { font-size: 12px; font-weight: 500; color: var(--text-main); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.v-author { font-size: 11px; color: var(--text-muted);}

/* Footer */
.site-footer { background: var(--bg-header); padding: 40px 20px 20px; margin-top: 40px; border-top: 1px solid var(--border-color);}
.footer-container { max-width: 1400px; margin: 0 auto;}
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-bottom: 30px;}
.footer-grid h4 { font-size: 16px; margin-bottom: 15px; color: var(--text-main); font-weight: 600;}
.footer-links ul { display: flex; flex-direction: column; gap: 10px;}
.footer-links a { color: var(--text-muted); font-size: 14px;}
.footer-contact p { color: var(--text-muted); font-size: 14px; margin-bottom: 8px;}
.app-buttons { display: flex; gap: 10px; flex-direction: column;}
.app-buttons img { height: 36px; object-fit: contain;}
.footer-copy { border-top: 1px solid var(--border-color); padding-top: 20px; text-align: center; color: var(--text-muted); font-size: 13px; display: flex; flex-direction: column; gap: 5px;}
.disclaimer { font-size: 12px; color: var(--text-dark);}

/* Responsive */
@media (max-width: 1024px) {
    .main-layout-container { grid-template-columns: 200px 1fr; }
    .sidebar-right { display: none; }
}
@media (max-width: 768px) {
    .header-container { position: relative; }
    .mobile-menu-toggle { display: block; }
    .main-navigation { 
        display: none; 
        position: absolute; 
        top: 64px; left: 0; right: 0; 
        background: var(--bg-header); 
        border-bottom: 1px solid var(--border-color); 
        box-shadow: 0 10px 15px -3px rgba(0,0,0,0.5);
        z-index: 1000;
        padding-bottom: 20px;
    }
    .main-navigation.active { display: block; }
    .main-navigation .nav-menu { flex-direction: column; gap: 0; }
    .main-navigation a { display: block; padding: 15px 20px; border-bottom: 1px solid var(--border-color); }
    .main-navigation .current-menu-item a::after { display: none; }
    .header-right { display: none; }

    .main-layout-container { grid-template-columns: 1fr; }
    .sidebar-left { display: none; }
    .match-item { grid-template-columns: 1fr; gap: 10px; text-align: center; }
    .match-time { flex-direction: row; justify-content: center; gap: 10px; }
    .match-teams { grid-template-columns: 1fr 60px 1fr; }
    .match-actions { justify-content: center; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .app-buttons { align-items: center; }
}
