/* =========================
   GLOBAL LAYOUT & BACKGROUND
========================= */
body {
    margin: 0;
    padding: 20px;
    font-family: Tahoma, Geneva, Verdana, sans-serif, 'SolaimanLipi';
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.4)), url('fl/background.jpg') center center / cover no-repeat fixed;
    overflow-x: hidden;
}

/* Force main to behave identically across all pages */
main {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

/* WRAPPER */
.wrapper {
    width: 100%;
    max-width: 900px;
    background: rgba(12, 43, 54, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 30px 20px;
    box-sizing: border-box;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    text-align: center;
    margin: 20px auto;
}

/* LOGO SECTION */
.logo-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
    margin-bottom: 20px;
}
.fifa-logo img { width: 90px; height: auto; border-radius: 4px; }
.middle-logo { position: absolute; left: 50%; transform: translateX(-50%); }
.middle-logo img { width: 500px; max-width: 100%; height: auto; }
.channel-logo img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; }

/* NAVIGATION */
.nav-menu { display: flex; justify-content: center; gap: 15px; margin: 20px 0; }
.nav-btn {
    background-color: rgba(0, 85, 164, 0.8);
    color: white;
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.nav-btn:hover { background-color: rgba(0, 120, 230, 0.9); }

/* TABLES & HEADERS */
.group-header {
    background-color: rgba(77, 148, 255, 0.4);
    color: white;
    padding: 12px 20px;
    margin-top: 40px;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    margin: 15px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
th { background-color: rgba(0, 85, 164, 0.6); padding: 15px; text-align: center; }
td { padding: 15px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); text-align: center; }
tr:nth-child(even) { background-color: rgba(255, 255, 255, 0.05); }

/* FOOTER */
.footer { margin-top: 40px; font-size: 18px; opacity: 0.8; }
.footer a { color: #fff; text-decoration: none; border-bottom: 1px solid #fff; }

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .logo-container { flex-wrap: wrap; justify-content: center; gap: 15px; }
    .middle-logo { position: static; transform: none; width: 100%; order: 1; }
    .middle-logo img { width: 220px; }
    
    table, thead, tbody, th, td, tr { display: block; }
    th { display: none; }
    tr { margin-bottom: 15px; border: 1px solid rgba(255,255,255,0.1); }
    td { text-align: right; padding-left: 50%; position: relative; }
    td::before { 
        content: attr(data-label); 
        position: absolute; left: 15px; font-weight: bold; color: #ddd; 
    }
    
    .nav-menu { flex-direction: column; }
    .nav-btn { width: 100%; box-sizing: border-box; }
}

/* stage-header styling */
.stage-header {
    background-color: rgba(77, 148, 255, 0.4);
    color: white;
    padding: 12px 20px;
    margin-top: 40px;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}
/* Highlight Styles */
.match-today {
    background-color: rgba(76, 175, 80, 0.3) !important;
    border-left: 5px solid #4CAF50;
}

.match-tomorrow {
    background-color: rgba(255, 193, 7, 0.3) !important;
    border-left: 5px solid #FFC107;
}

/* Ensure mobile cells respect the border */
@media (max-width: 768px) {
    .match-today, .match-tomorrow {
        border-left: none;
        border-top: 5px solid;
    }
}

/* Language Switcher */
.lang {
    width: 100%;
    max-width: 900px;
    text-align: right;
    padding: 10px 0;
}

.lang a {
    display: inline-block;
    padding: 10px 25px;
    background-color: #007bff;
    color: #ffffff;
    text-decoration: none;
    border-radius: 50px;
    font-family: sans-serif;
    transition: background-color 0.3s ease;
}

.lang a:hover {
    background-color: #0056b3;
}

/* LOGO */
#logoReveal {
    position: fixed;
    top: -5px;
    left: 0;
    width: 100vw;
    height: 100vh;
    padding: 5px;
    background: radial-gradient(circle, #000, #020617);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.logo {
    width: clamp(120px, 15vw, 220px);
    opacity: 0;
    transform: scale(0.5);
    animation: logoIn 2s ease forwards, glowPulse 2s infinite alternate;
}

@keyframes logoIn {
    0% { opacity: 0; transform: scale(0.3); }
    60% { opacity: 1; transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes glowPulse {
    from { filter: drop-shadow(0 0 10px cyan); }
    to { filter: drop-shadow(0 0 25px gold); }
}

/* Container for logo and text */
.logo-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* The "Touch Me" styling */
.touch-text {
    font-size: 1.5rem;
    color: white;
    letter-spacing: 5px;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeInText 2s ease forwards 1s, pulseGlow 2s infinite alternate;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}
.progress-container {
    margin: 20px 0;
    text-align: left;
}
.progress-label {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: #ffffff;
}
.progress-bar-bg {
    width: 100%;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    transition: width 1s ease-in-out;
}

#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9998; 
    border: 4px solid #fff;
    outline: none;
    background-color: transparent;
    color: #fff;
    cursor: pointer;
    padding: 10px 18px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

#scrollTopBtn:hover {
    background-color: rgba(0, 85, 164, 0.2);
    border-color: rgba(0, 120, 230, 1);
    color: rgba(0, 120, 230, 1);
    transform: scale(1.1);
}

/* Responsive Scroll to Top Button */
@media (max-width: 768px) {
    #scrollTopBtn {
        display: none;
        position: fixed !important;
        bottom: 20px !important;
        right: 15px !important;
        padding: 8px 15px !important;
        font-size: 18px !important;
        border-radius: 50% !important; 
        background-color: transparent !important;
        width: auto !important;
        height: auto !important;
        border: 2px solid rgba(0, 85, 164, 0.8) !important;
    }
}

.live-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 8px;
    border-radius: 50%;
    background: #ff0000;
    animation: blink-live 1s infinite;
    vertical-align: middle;
}

@keyframes blink-live {
    0%   { opacity: 1; }
    50%  { opacity: 0.2; }
    100% { opacity: 1; }
}

html {
  scroll-behavior: smooth;
}

@keyframes fadeInText {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
    from { text-shadow: 0 0 10px #fff; }
    to { text-shadow: 0 0 20px #fff, 0 0 30px #0055a4; }
}

.group-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; justify-content: center; }
        
        /* Updated Button & Tooltip Styles */
        .group-btn { position: relative; padding: 8px 15px; background: #f4f4f4; text-decoration: none; border-radius: 5px; color: #333; font-weight: bold; border: 1px solid #ccc; font-size: 12px; }
        .group-btn:hover { background: #e0e0e0; }
        
        .tooltip {
            visibility: hidden; width: 220px; background-color: #333; color: #fff;
            text-align: center; border-radius: 6px; padding: 8px; position: absolute;
            z-index: 100; bottom: 130%; left: 50%; transform: translateX(-50%);
            font-size: 14px; font-weight: normal; opacity: 0; transition: opacity 0.3s;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        }
        .group-btn:hover .tooltip { visibility: visible; opacity: 1; }
		
/* Top 3 Highlighting */
.scorers-table tr.rank-one {
    background-color: #007FFF; /* Radiant Blue (Azure) */
    color: #fff; /* White text looks better on this blue */
    font-weight: bold;
}

.scorers-table tr.rank-two {
    background-color: #FFFF00; /* Radiant Yellow */
    color: #000;
    font-weight: bold;
}

.scorers-table tr.rank-three {
    background-color: #39FF14; /* Radiant Green */
    color: #000;
    font-weight: bold;
}

.live-indicator { color: #ff0000; font-weight: bold; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* =========================
   DROPDOWN MENU STYLES
========================= */

/* Dropdown Wrapper */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Style the toggle button to perfectly match .nav-btn */
.dropdown-toggle {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-color: rgba(0, 85, 164, 0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-family: inherit;
    font-size: 1rem;
    display: inline-block;
    transition: background 0.3s ease;
}

.dropdown-toggle:hover {
    background-color: rgba(0, 120, 230, 0.9);
}

/* Dropdown Content (hidden by default) */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: rgba(12, 43, 54, 0.95);
    min-width: 180px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.5);
    z-index: 1000;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 5px;
}

/* Show when hovered (desktop) or when 'show' class is toggled (mobile) */
.dropdown:hover .dropdown-content,
.dropdown-content.show {
    display: block;
}

/* Links inside the dropdown */
.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: rgba(0, 120, 230, 0.9);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .dropdown { 
        width: 100%; 
        display: block; 
    }
    .dropdown-toggle { 
        width: 100%; 
        box-sizing: border-box;
        text-align: center; 
    }
    
    /* FIX: Force hidden on mobile, only show when .show class is present */
    .dropdown-content { 
        display: none; 
        position: static; 
        width: 100%; 
        background-color: rgba(0, 0, 0, 0.2);
        box-shadow: none; 
    }

    /* This rule ensures the JS-added 'show' class works on mobile */
    .dropdown-content.show {
        display: block;
    }
}