/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    background: #fff;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 800px;
    position: relative;
}

h1, h2 {
    text-align: center;
    margin-bottom: 20px;
}

.team-inputs {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.team {
    flex: 1;
    min-width: 250px;
}

.input-group {
    margin-bottom: 10px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
}

.input-group input {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
}

button {
    width: 100%;
    padding: 10px;
    background: #007BFF;
    border: none;
    color: #fff;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

button:hover {
    background: #0056b3;
}

.navigation {
    margin-top: 15px;
    text-align: center;
}

.navigation a {
    color: #007BFF;
    text-decoration: none;
    font-weight: bold;
}

.navigation a:hover {
    text-decoration: underline;
}

/* Loading Spinner */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    display: none;
}

.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #007BFF;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Result Section */
.result {
    text-align: center;
    display: none;
}

#back-btn {
    margin-top: 20px;
}

/* Fireworks Canvas */
#fireworks-canvas {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 500;
}

/* Leaderboard Table */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.leaderboard-table th, .leaderboard-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
}

.leaderboard-table th {
    background-color: #007BFF;
    color: white;
}

.leaderboard-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.leaderboard-table tr:hover {
    background-color: #f1f1f1;
}

/* Responsive Design Adjustments */
@media (max-width: 600px) {
    .team-inputs {
        flex-direction: column;
    }

    .team {
        min-width: 100%;
    }
}
