
body {
    font-family: sans-serif;
    background-color: #CECECE;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease; /* Add transition for smooth change */
}

/* Dark mode styles */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

.container {
    text-align: center;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, color 0.3s ease; /* Add transition */
    max-width: 800px; /* Added max-width for better readability on larger screens */
    width: 100%; /* Ensure it takes full width of its container */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

body.dark-mode .container {
    background-color: #242424;
    color: #e0e0e0;
}

input[type="text"] {
    padding: 10px;
    margin-top: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: calc(100% - 22px); /* Adjust width to account for padding and border */
    box-sizing: border-box; /* To include padding and border in width */
    max-width: 300px; /* Maximum width for input fields */
}

button {
    padding: 10px 20px;
    margin-top: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

#result {
    margin-top: 20px;
    font-size: 18px;
}

.link-container {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 100;
}

/* Style the links in the link-container */
.link-container a {
    margin-right: 10px;
    color: #007bff; /* Default link color */
    transition: color 0.3s ease; /* Add transition for smooth color change */
    text-decoration: none; /* Remove underline from links */
}

/* Change link color in dark mode */
body.dark-mode .link-container a {
    color: #99ccff; /* Example light blue color for better contrast */
}

/* Leaderboard Styles */
#leaderboard-section table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#leaderboard-section th, #leaderboard-section td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

#leaderboard-section th {
    background-color: #f4f4f4;
}

body.dark-mode #leaderboard-section th {
    background-color: #333;
    color: #e0e0e0;
    border-color: #555;
}
body.dark-mode #leaderboard-section td {
    border-color: #555;
}


#leaderboard-event-select {
    margin-bottom: 20px;
}

#leaderboard-event-select input[type="text"] {
    width: calc(50% - 22px); /* Adjust width for event code input on leaderboard page */
    max-width: 200px;
    display: inline-block; /* Keep input and button on the same line */
    margin-right: 10px;
}

#leaderboard-event-select button {
    display: inline-block; /* Keep input and button on the same line */
}

#leaderboard-update-countdown {
    margin-top: 10px;
    font-size: 0.9em;
    color: #777;
}

body.dark-mode #leaderboard-update-countdown {
    color: #999;
}


