/* ============================================
   24LIVE - Main Stylesheet
   ============================================ */

:root {
    --primary: #3E7BFA;
    --primary-dark: #2E5FD1;
    --bg: #0B121B;
    --bg-elevated: #121B26;
    --panel: #17212D;
    --panel-hover: #1D2836;
    --border: #263241;
    --text: #E7ECF2;
    --text-muted: #8B9AAC;
    --text-faint: #56667A;
    --live: #FF4B4B;
    --win: #34C77B;
    --draw: #E8B23A;
    --radius: 8px;
    --transition: 0.2s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 14px;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.site-header {
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 20px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    color: var(--text);
}

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

.header-nav ul {
    display: flex;
    list-style: none;
    gap: 4px;
}

.header-nav ul li a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.header-nav ul li a:hover,
.header-nav ul li a.active {
    color: var(--text);
    background: var(--panel);
}

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

.search-form {
    display: flex;
    align-items: center;
    background: var(--panel);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.search-input {
    background: transparent;
    border: none;
    padding: 8px 12px;
    color: var(--text);
    font-size: 13px;
    min-width: 180px;
}

.search-input::placeholder {
    color: var(--text-faint);
}

.search-btn {
    background: transparent;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--text-muted);
}

.login-btn,
.register-btn {
    padding: 8px 16px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

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

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

.register-btn {
    background: var(--primary);
    color: #fff;
}

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

/* Sports Navigation */
.sports-nav {
    border-top: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
}

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

.sports-nav ul {
    display: flex;
    list-style: none;
    gap: 2px;
    white-space: nowrap;
    padding: 4px 0;
}

.sports-nav ul li a {
    display: block;
    padding: 8px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius);
    transition: var(--transition);
}

.sports-nav ul li a:hover,
.sports-nav ul li a.active {
    color: var(--text);
    background: var(--panel);
}

/* Main Content */
.main-content {
    min-height: 500px;
    padding: 20px 0;
}

/* Match Card */
.match-card {
    background: var(--panel);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 16px;
    margin-bottom: 12px;
    transition: var(--transition);
}

.match-card:hover {
    border-color: var(--primary);
}

.match-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.match-competition {
    font-weight: 600;
}

.live-badge {
    color: var(--live);
    font-weight: 700;
    animation: pulse 1s infinite;
}

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

.match-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

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

.match-score {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 20px;
}

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

.score.finished {
    color: var(--text);
}

.score-delimiter {
    color: var(--text-faint);
    font-size: 14px;
}

.match-status {
    text-align: center;
    font-weight: 600;
    font-size: 13px;
}

.live-indicator {
    animation: pulse 1s infinite;
}

.match-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.favorite-btn {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-faint);
    transition: var(--transition);
}

.favorite-btn:hover {
    color: var(--draw);
}

.match-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
}

.match-link:hover {
    text-decoration: underline;
}

/* Standings Table */
.standings-table-wrapper {
    overflow-x: auto;
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.standings-table th {
    text-align: left;
    padding: 10px 12px;
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    border-bottom: 2px solid var(--border);
}

.standings-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

.standings-table tr:hover td {
    background: var(--panel-hover);
}

.standings-table .rank {
    text-align: center;
    width: 30px;
    color: var(--text-muted);
}

.standings-table .team a {
    color: var(--text);
    text-decoration: none;
}

.standings-table .team a:hover {
    color: var(--primary);
}

.standings-table .points {
    font-weight: 700;
    color: var(--primary);
}

.standings-table .zone-1 td.rank {
    border-left: 3px solid var(--win);
}

/* Section */
.section {
    padding: 24px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 20px;
}

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.view-all:hover {
    text-decoration: underline;
}

/* Hero */
.hero-section {
    background: linear-gradient(160deg, #12233F 0%, var(--bg) 65%);
    border-radius: var(--radius);
    padding: 40px 24px;
    margin-bottom: 24px;
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hero-text h1 {
    font-size: 32px;
    max-width: 500px;
}

.hero-text p {
    color: var(--text-muted);
    margin-top: 8px;
    max-width: 440px;
}

.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 16px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--live);
    display: block;
}

.stat-label {
    color: var(--text-muted);
    font-size: 12px;
}

/* Leagues Grid */
.leagues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.league-card {
    background: var(--panel);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
}

.league-card:hover {
    border-color: var(--primary);
}

.league-icon {
    font-size: 32px;
}

.league-info {
    flex: 1;
}

.league-info h4 {
    font-size: 14px;
}

.league-country {
    color: var(--text-muted);
    font-size: 12px;
}

.league-matches {
    color: var(--text-faint);
    font-size: 11px;
    display: block;
}

.league-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.news-card {
    background: var(--panel);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 16px;
    transition: var(--transition);
}

.news-card:hover {
    border-color: var(--primary);
}

.news-category {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.news-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.news-card h3 a {
    color: var(--text);
    text-decoration: none;
}

.news-card h3 a:hover {
    color: var(--primary);
}

.news-card p {
    color: var(--text-muted);
    font-size: 13px;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-faint);
}

/* Footer */
.site-footer {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.footer-brand h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

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

.footer-desc {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 8px;
    max-width: 320px;
}

.footer-col h4 {
    color: var(--text);
    font-size: 14px;
    margin-bottom: 12px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 6px;
}

.footer-col ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    font-size: 12px;
    color: var(--text-faint);
}

/* No Matches */
.no-matches {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    background: var(--panel);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 768px) {
    .header-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 24px;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .leagues-grid {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .match-teams {
        flex-direction: column;
        gap: 4px;
    }
    
    .match-score {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .header-actions .login-btn,
    .header-actions .register-btn {
        display: none;
    }
    
    .search-form {
        flex: 1;
    }
    
    .search-input {
        min-width: 80px;
    }
    
    .sports-nav ul li a {
        padding: 6px 12px;
        font-size: 12px;
    }
}