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

:root {
    --primary-color: #8B0000;
    --secondary-color: #FFD700;
    --dark-bg: #0a0a0a;
    --card-bg: #1a1a2e;
    --text-light: #ffffff;
    --text-muted: #b0b0b0;
    --accent-green: #00ff88;
    --accent-red: #ff4444;
    --gradient-1: linear-gradient(135deg, #8B0000 0%, #5a0000 100%);
    --gradient-2: linear-gradient(135deg, #FFD700 0%, #ff8c00 100%);
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
    border-bottom: 2px solid var(--primary-color);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--secondary-color);
}

.logo i {
    font-size: 2rem;
    animation: spin 3s linear infinite;
}

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

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

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

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary-color);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    background: url('https://images.unsplash.com/photo-1574629810360-7efbbe195018?w=1920') center/cover;
    padding-top: 120px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(10, 10, 10, 0.7) 0%,
        rgba(10, 10, 10, 0.9) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 40px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-title .highlight {
    color: var(--secondary-color);
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent-red);
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 700;
    margin-bottom: 30px;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 68, 68, 0.5); }
    50% { box-shadow: 0 0 40px rgba(255, 68, 68, 0.8); }
}

.pulse {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

.cta-button {
    display: inline-block;
    background: var(--gradient-2);
    color: var(--dark-bg);
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.5);
}

.hero-stats {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 60px;
    margin-top: 60px;
}

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

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 900;
    color: var(--secondary-color);
}

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

/* Section Styles */
section {
    padding: 100px 0;
}

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

.section-header h2 {
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-header h2 i {
    color: var(--secondary-color);
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    border: none;
    border-radius: 25px;
    background: var(--card-bg);
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--text-light);
}

/* Matches Grid */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.match-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.match-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(139, 0, 0, 0.3);
}

/* World Cup Card Badge */
.worldcup-card {
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.worldcup-card:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.2);
}

.wc-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--gradient-2);
    color: var(--dark-bg);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.wc-mini-badge {
    color: var(--secondary-color);
    font-size: 0.8rem;
}

.wc-match {
    border-right: 3px solid var(--secondary-color);
}

.match-status {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.match-status.live {
    background: var(--accent-red);
    animation: pulse-glow 2s ease-in-out infinite;
}

.match-status.upcoming {
    background: var(--secondary-color);
    color: var(--dark-bg);
}

.match-status.finished {
    background: #666;
}

.match-time {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

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

.team {
    text-align: center;
    flex: 1;
}

.team-flag {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2a2a4a 0%, #1a1a2e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 3rem;
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.team-name {
    font-weight: 700;
    font-size: 1rem;
}

.vs-badge {
    background: var(--gradient-1);
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 900;
    font-size: 1.2rem;
}

.match-score {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--secondary-color);
    margin: 15px 0;
}

.match-details {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 5px;
}

.watch-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: var(--gradient-2);
    color: var(--dark-bg);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Cairo', sans-serif;
}

.watch-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    position: relative;
    overflow: hidden;
    max-height: 95vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    z-index: 10;
}

.match-header-modal {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 25px;
    background: var(--gradient-1);
}

.modal-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.modal-flag {
    font-size: 3rem;
    line-height: 1;
}

.video-container {
    position: relative;
}

#video-player {
    background: #000;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stream-placeholder {
    text-align: center;
    padding: 40px;
}

.stream-placeholder i {
    font-size: 5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.stream-sources {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    flex-wrap: wrap;
}

.stream-source-btn {
    padding: 12px 25px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--text-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
}

.stream-source-btn:hover,
.stream-source-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

/* Commentary Language Selector */
.commentary-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.commentary-label {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.commentary-btn {
    padding: 8px 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: var(--text-light);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.commentary-btn:hover,
.commentary-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.flag-icon {
    font-size: 1.1rem;
}

.stream-lang-note {
    width: 100%;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.watch-btn.live-btn {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    animation: pulse-glow 2s ease-in-out infinite;
}

.retry-btn {
    margin-top: 20px;
    padding: 12px 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: #a00000;
    transform: scale(1.05);
}

.stream-available {
    color: var(--accent-green);
    font-weight: 700;
}

.alt-streams {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.alt-stream-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
}

.alt-stream-btn:hover {
    background: #a00000;
    transform: scale(1.05);
}

.alt-stream-btn i {
    font-size: 1.2rem;
}

/* Standings Section */
.standings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 30px;
}

.standings-group {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    overflow-x: auto;
}

.group-title {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
}

.standings-table th,
.standings-table td {
    padding: 12px 8px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.standings-table th {
    background: rgba(139, 0, 0, 0.3);
    color: var(--secondary-color);
    font-weight: 700;
}

.standings-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.standings-table td:first-child {
    font-weight: 700;
    color: var(--secondary-color);
}

.team-cell {
    text-align: right !important;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
}

.match-round {
    text-align: center;
    color: var(--secondary-color);
    font-size: 0.85rem;
    margin-bottom: 5px;
    font-weight: 600;
}

/* Schedule Section */
.date-selector {
    display: flex;
    align-items: center;
    gap: 20px;
}

.date-btn {
    background: var(--card-bg);
    border: none;
    color: var(--text-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.date-btn:hover {
    background: var(--primary-color);
}

#current-date {
    font-weight: 700;
    font-size: 1.2rem;
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.schedule-item {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 15px;
    transition: all 0.3s ease;
    gap: 20px;
}

.schedule-item:hover {
    background: rgba(139, 0, 0, 0.2);
}

.schedule-time {
    min-width: 100px;
    text-align: center;
    color: var(--secondary-color);
    font-weight: 700;
}

.schedule-teams {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.schedule-status {
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.schedule-status.live {
    background: var(--accent-red);
    color: white;
}

.schedule-status.upcoming {
    background: var(--secondary-color);
    color: var(--dark-bg);
}

.schedule-status.finished {
    background: #666;
    color: white;
}

.schedule-day {
    margin-bottom: 30px;
}

.schedule-date-header {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.score-badge {
    background: var(--primary-color);
    padding: 5px 15px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 60px;
    text-align: center;
}

/* Footer */
.footer {
    background: var(--card-bg);
    padding: 60px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.footer-section p {
    color: var(--text-muted);
}

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

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul a:hover {
    color: var(--secondary-color);
}

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

.social-links a {
    width: 45px;
    height: 45px;
    background: var(--dark-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

/* Loading & Error States */
.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 215, 0, 0.2);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border-radius: 15px;
}

.no-matches {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border-radius: 15px;
}

.no-matches i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.no-data {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* Admin Link */
.admin-link {
    color: var(--secondary-color) !important;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.admin-link:hover {
    color: var(--text-light) !important;
}

/* Visitor Counter Badge */
.visitor-counter {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--card-bg);
    padding: 10px 20px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.visitor-counter i {
    color: var(--secondary-color);
}

#visitor-count {
    color: var(--secondary-color);
    font-weight: 700;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.match-card,
.standings-group {
    animation: fadeInUp 0.5s ease forwards;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a00000;
}

/* ===== RESPONSIVE - Mobile & All Screens ===== */

/* Tablets */
@media (max-width: 992px) {
    .admin-link {
        display: none;
    }

    .matches-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .standings-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

/* Mobile */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.98);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        border-bottom: 2px solid var(--primary-color);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 30px;
    }

    .section-header {
        flex-direction: column;
        text-align: center;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

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

    .filter-buttons {
        justify-content: center;
    }

    .filter-btn {
        padding: 8px 18px;
        font-size: 0.85rem;
    }

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

    .standings-group {
        overflow-x: auto;
    }

    .schedule-item {
        flex-direction: column;
        text-align: center;
    }

    .schedule-teams {
        flex-direction: column;
        gap: 10px;
    }

    .schedule-time {
        min-width: auto;
    }

    .match-header-modal {
        gap: 15px;
        padding: 15px;
    }

    .modal-team .team-name {
        font-size: 0.9rem;
    }

    .modal-flag img {
        width: 45px !important;
        height: 45px !important;
    }

    #video-player {
        min-height: 280px;
    }

    .commentary-selector {
        flex-wrap: wrap;
        gap: 8px;
    }

    .commentary-btn {
        padding: 6px 14px;
        font-size: 0.8rem;
    }

    .visitor-counter {
        bottom: 10px;
        left: 10px;
        padding: 8px 15px;
        font-size: 0.8rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .match-card {
        padding: 15px;
    }

    .team-flag {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .match-score {
        font-size: 1.8rem;
    }

    .watch-btn {
        padding: 12px;
        font-size: 1rem;
    }

    .cta-button {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .content-section {
        padding: 15px;
    }
}

/* Extra large screens */
@media (min-width: 1600px) {
    .container {
        max-width: 1600px;
    }

    .matches-grid {
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    }
}
