/* Ensure consistent scrollbar display */
html {
    overflow-y: scroll; /* Always show vertical scrollbar */
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

/* General styles for the homepage */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #2b2b2b;
    color: #e0e0e0;
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 20px;
    background-color: #383838;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative; /* Change to relative */
    z-index: 1000;
    padding-top: 0; /* Ensure no gap at the top */
}

#spacer {
    height: 3px; /* Adjust to the same height as the header */
}

.logo-title {
    width: 100%;
    display: flex;
    justify-content: center; /* Center the logo/title for mobile */
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

header img.site-logo {
    max-width: 120px; /* 20% smaller */
    height: auto;
    margin-right: 10px;
}

header h1 {
    margin: 0;
    font-size: 20px; /* 10-15% smaller */
    color: #ff9800;
}

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center; /* Center the buttons */
    margin-top: 5px; /* Shrink the distance between logo/title and buttons */
}

.nav-links button {
    background-color: #03a9f4;
    border: none;
    color: white;
    padding: 3px 10px; /* Smaller padding for smaller buttons */
    text-align: center;
    text-decoration: none;
    font-size: 12px; /* Smaller font size */
    margin: 2px;
    cursor: pointer;
    border-radius: 4px;
    width: 100px; /* Fixed width for consistency */
}

.nav-links a {
    color: white;
    text-decoration: none;
}

.section-title {
    font-size: 24px;
    font-weight: bold;
    color: #03a9f4;
    margin-top: 20px; /* Extra margin to push content below the spacer */
}

.sports-container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    padding-top: 20px; /* Extra padding to account for fixed header */
}

.sport-section {
    margin-bottom: 20px;
    height: auto; /* Ensure height does not change on expand/collapse */
    transition: height 0.3s ease; /* Smooth transition for height changes */
}

.sport-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #383838;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
}

.sport-title {
    font-size: 18px;
    font-weight: bold;
    color: #ff9800;
}

.arrow {
    font-size: 18px;
    color: #ff9800;
    transition: transform 0.3s;
}

.games-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 10px 0;
    width: 100%;
}

.row-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #383838;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 10px 5px;
    color: #e0e0e0;
    width: 100%;
}

.game-description {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
}

.game-details {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    margin-top: auto;
}

.game-time,
.game-status,
.game-link,
.unique-users {
    font-size: 14px;
    text-align: center;
}

.live-indicator {
    color: #4caf50;
    font-weight: bold;
    position: relative;
    padding-left: 20px;
}

.live-indicator::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 10px;
    height: 10px;
    background-color: #4caf50;
    border-radius: 50%;
    animation: flash 2s infinite;
    transform: translateY(-50%);
}

@keyframes flash {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0;
    }
}

.not-live-indicator {
    color: #f44336;
    font-weight: bold;
}

.game-link a {
    text-decoration: none;
    color: #ff9800;
    font-weight: bold;
}

.game-link a::after {
    content: ' ➔';
    font-size: 14px;
    margin-left: 5px;
}

.unique-users {
    display: flex;
    align-items: center;
    justify-content: center; /* Center align the unique users */
}

.unique-users .emoji {
    font-size: 18px;
    margin-right: 5px;
    color: #d3d3d3; /* Light grey color */
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #spacer {
        height: 3px; /* Adjust to the same height as the header for mobile */
    }

    .logo-title {
        flex-direction: row;
        justify-content: center;
        width: 100%;
        padding: 0 10px;
    }

    .nav-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .nav-links button {
        width: auto; /* Adjusted width for smaller buttons */
        margin: 5px 2px;
        padding: 3px 10px;
    }

    .section-title {
        margin-top: 20px; /* Adjust margin to account for spacer */
    }

    .sports-container {
        padding-top: 20px; /* Extra padding to account for fixed header */
    }

    .games-container {
        display: flex;
        flex-direction: column;
        gap: 20px;
        width: 100%;
    }

    .row-item {
        flex-direction: column;
        align-items: center;
        padding: 10px;
        width: 100%;
    }

    .game-details {
        flex-direction: column;
        align-items: center;
    }

    .game-description,
    .game-time,
    .game-status,
    .game-link,
    .unique-users {
        text-align: center;
        width: 100%;
    }

    .game-description {
        margin-bottom: 10px;
    }

    .game-link a {
        display: inline-block;
        margin-top: 10px;
    }
}

/* Navigation links */
.nav-links {
    margin: 5px 0;
}

.nav-links a {
    text-decoration: none;
    color: white;
    margin: 0 10px;
}

.nav-links a:hover {
    text-decoration: underline;
}
