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

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #ffffff;
    --bg-alt: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --text-dark: #f0f0f0;
    --text-light: #b0b0b0;
    --bg-light: #1a1a1a;
    --bg-alt: #2d2d2d;
    --border-color: #444;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    transition: var(--transition);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    padding: 8px 15px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Navigation */
nav {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

nav a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 60px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: 18px;
    margin-bottom: 10px;
    opacity: 0.95;
}

.ranking-info {
    background: rgba(255, 255, 255, 0.2);
    padding: 15px 30px;
    border-radius: 10px;
    display: inline-block;
    margin-top: 20px;
    backdrop-filter: blur(10px);
}

/* Section Styles */
section {
    padding: 60px 20px;
    border-bottom: 1px solid var(--border-color);
}

section:last-child {
    border-bottom: none;
}

h2 {
    font-size: 36px;
    margin-bottom: 30px;
    color: var(--text-dark);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 10px;
    display: inline-block;
}

h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--text-dark);
}

/* Countdown Clock */
.countdown {
    background: var(--primary-color);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    text-align: center;
}

/* Match Cards */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.match-card {
    background: var(--bg-alt);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.match-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    border-color: var(--primary-color);
}

.match-date {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 10px;
}

.match-stage {
    background: var(--primary-color);
    color: white;
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 15px;
    font-weight: bold;
}

.match-number {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 10px;
}

.match-teams {
    font-size: 18px;
    font-weight: bold;
    margin: 15px 0;
    color: var(--text-dark);
}

.weather {
    background: rgba(102, 126, 234, 0.1);
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
    color: var(--text-light);
}

/* History Section */
.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    overflow-x: auto;
    display: block;
}

.history-table thead {
    background: var(--primary-color);
    color: white;
}

.history-table th,
.history-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.history-table tr:hover {
    background: var(--bg-alt);
}

/* Ranking Card */
.ranking-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin: 30px 0;
}

.ranking-card h3 {
    color: white;
    margin-bottom: 15px;
}

.rank-number {
    font-size: 48px;
    font-weight: bold;
    margin: 20px 0;
}

.rank-points {
    font-size: 24px;
    opacity: 0.95;
}

/* Links Grid */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.link-card {
    background: var(--bg-alt);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.link-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.link-card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    word-break: break-all;
}

.link-card a:hover {
    text-decoration: underline;
}

/* Transportation Section */
.transport-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.transport-card {
    background: var(--bg-alt);
    padding: 20px;
    border-radius: 10px;
    border-top: 4px solid var(--primary-color);
}

.transport-card h4 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 18px;
}

.transport-card p {
    color: var(--text-light);
    margin-bottom: 10px;
    font-size: 14px;
}

/* Address Card */
.address-card {
    background: var(--bg-alt);
    padding: 25px;
    border-radius: 10px;
    border-left: 5px solid var(--primary-color);
    margin: 30px 0;
}

.address-card p {
    margin: 10px 0;
    color: var(--text-dark);
    font-weight: 500;
}

.map-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.map-link {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    transition: var(--transition);
    font-weight: bold;
}

.map-link:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

/* Footer */
footer {
    background: var(--text-dark);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition);
    z-index: 999;
    font-size: 24px;
    border: none;
    box-shadow: var(--shadow);
}

.scroll-to-top.show {
    opacity: 1;
}

.scroll-to-top:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    nav {
        justify-content: center;
        gap: 15px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

    h2 {
        font-size: 28px;
    }

    h3 {
        font-size: 20px;
    }

    .matches-grid {
        grid-template-columns: 1fr;
    }

    .history-table {
        font-size: 14px;
    }

    .history-table th,
    .history-table td {
        padding: 10px;
    }

    .transport-grid {
        grid-template-columns: 1fr;
    }

    .map-links {
        flex-direction: column;
    }

    .map-link {
        display: block;
        text-align: center;
    }

    section {
        padding: 40px 15px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 40px 15px;
    }

    .hero h1 {
        font-size: 24px;
    }

    .hero p {
        font-size: 14px;
    }

    h2 {
        font-size: 22px;
    }

    h3 {
        font-size: 18px;
    }

    .match-card {
        padding: 15px;
    }

    .ranking-card {
        padding: 20px;
    }

    .rank-number {
        font-size: 36px;
    }

    .rank-points {
        font-size: 18px;
    }

    .address-card {
        padding: 15px;
    }

    .countdown {
        font-size: 12px;
        padding: 10px 15px;
    }
}

/* Print Styles */
@media print {
    header, footer, .theme-toggle, .scroll-to-top {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}

/* Accessibility */
a:focus, button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
