:root {
    --bg-main: #0b0e14;
    --bg-surface: #151a23;
    --bg-surface-hover: #1e2430;
    --primary: #00FF87;
    --primary-dim: rgba(0, 255, 135, 0.1);
    --secondary: #0055FF;
    --text-main: #ffffff;
    --text-muted: #9aa0ab;
    --border-color: #2a313e;
    --danger: #ff3b30;
    --warning: #ffcc00;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --radius: 12px;
}

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

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

a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 24px;
}

@media (min-width: 992px) {
    .grid-layout {
        grid-template-columns: 3fr 1fr;
    }
}

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

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.main-nav {
    display: none;
}

@media (min-width: 768px) {
    .main-nav {
        display: flex;
        gap: 24px;
    }
    
    .main-nav a {
        font-weight: 600;
        font-size: 0.95rem;
        padding: 8px 0;
        position: relative;
    }

    .main-nav a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--primary);
        transition: width 0.3s;
    }

    .main-nav a:hover::after, .main-nav a.active::after {
        width: 100%;
    }
}

/* Pre-Tournament Hero Banner */
.hero-pre-tournament {
    background: linear-gradient(135deg, var(--bg-surface) 0%, #0a1128 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 48px 24px;
    text-align: center;
    margin-top: 24px;
    position: relative;
    overflow: hidden;
}

.hero-pre-tournament::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 85, 255, 0.1) 0%, transparent 60%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.badge-premium {
    display: inline-block;
    background: var(--primary-dim);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    border: 1px solid rgba(0,255,135,0.2);
}

.hero-pre-tournament h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(to right, #fff, #a0a5b1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-pre-tournament p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.countdown-wrapper {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}

.countdown-box {
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    min-width: 80px;
    backdrop-filter: blur(4px);
}

.cd-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.cd-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 8px;
    letter-spacing: 1px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.hero-stats .stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    background: var(--bg-surface-hover);
    padding: 8px 16px;
    border-radius: 20px;
}

/* Empty States */
.empty-state {
    padding: 40px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-icon {
    color: var(--border-color);
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}

.empty-state p {
    color: var(--text-main);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.empty-subtext {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Sections & Cards */
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

/* Internal Linking blocks */
.link-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.match-link-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 600;
}

.match-link-row:hover {
    background: var(--bg-surface-hover);
    border-color: var(--primary);
}

.context-link {
    gap: 12px;
}

.tag-link {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.tag-link:hover {
    background: var(--primary-dim);
    color: var(--primary);
    border-color: var(--primary);
}

.text-link {
    color: var(--secondary);
    font-size: 0.9rem;
    font-weight: 600;
}

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

/* Dynamic Badges */
.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-official {
    background: rgba(0, 85, 255, 0.15);
    color: #6699ff;
    border: 1px solid rgba(0, 85, 255, 0.3);
}

.badge-qualified {
    background: var(--primary-dim);
    color: var(--primary);
    border: 1px solid rgba(0, 255, 135, 0.3);
}

.badge-injury {
    background: rgba(255, 59, 48, 0.15);
    color: var(--danger);
    border: 1px solid rgba(255, 59, 48, 0.3);
}

/* Squad Tracker */
.squad-tracker {
    width: 100%;
}
.squad-tracker .progress {
    background: var(--bg-surface-hover);
    border-radius: 4px;
    overflow: hidden;
    height: 8px;
}
.squad-tracker .progress > div {
    height: 100%;
    background: var(--primary);
    transition: width 1s ease;
}

/* Match Row (Flashscore style) */
.match-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.match-row:hover {
    background: var(--bg-surface-hover);
}

.match-row:first-child {
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
}

.match-row:last-child {
    border-bottom: none;
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
}

.match-time {
    color: var(--danger);
    font-weight: 700;
    font-size: 0.85rem;
    width: 50px;
    text-align: center;
}

.match-teams {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 16px;
}

.team {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.match-score {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 2px;
    background: var(--bg-main);
    padding: 4px 12px;
    border-radius: 6px;
    color: var(--primary);
}

/* Standings Table */
.standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

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

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

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

.team-cell {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.news-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 200px;
    display: flex;
    align-items: flex-end;
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.2));
    border: 1px solid var(--border-color);
}

.image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-surface-hover);
    z-index: -1;
}

.news-card:hover .image-placeholder {
    transform: scale(1.05);
    transition: transform 0.5s;
}

.news-content {
    padding: 16px;
    width: 100%;
    z-index: 1;
}

.news-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    line-height: 1.3;
}

/* Footer */
.site-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 40px 0 20px;
    margin-top: 40px;
    text-align: center;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

/* Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Utilities */
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}