:root {
    --bg-color: #fdf6f0;
    --text-color: #2b2b2b;
    --accent-color: #ffc7c7;
    --primary: #bde0fe;
    --secondary: #caffbf;
    --highlight: #ffdac1;
    --button-bg: #ffadad;
    --button-text: #2b2b2b;
}

[data-theme="dark"] {
    --bg-color: #2c2c2c;
    --text-color: #f3f3f3;
    --accent-color: #a390c4;
    --primary: #7fbcff;
    --secondary: #94c7a7;
    --highlight: #d9b8a6;
    --button-bg: #8471bf;
    --button-text: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 1rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-family: 'Manrope';
}

h1,h2{
    text-align: center;
    font-family: 'Delius';
}

.header-container {
    text-align: center;
    padding: 1rem;
    background-color: var(--accent-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.theme-switch-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Toggle Switch */
.theme-switch input {
    display: none;
}
.slider.round {
    position: relative;
    width: 50px;
    height: 24px;
    background-color: var(--primary);
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.slider.round::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 2px;
    left: 2px;
    background-color: var(--button-text);
    border-radius: 50%;
    transition: transform 0.3s ease;
}
input:checked + .slider.round::before {
    transform: translateX(26px);
}

.scoreboard-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.team-section {
    background-color: var(--highlight);
    padding: 1rem;
    border-radius: 12px;
    flex: 1 1 300px;
    max-width: 500px;
}

.team-name {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.timer-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.timer-buttons-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.score-display,
.fouls-display,
.timer-display {
    font-size: 2rem;
    text-align: center;
    margin: 0.5rem 0;
}

.score-buttons,
.foul-buttons,
.timer-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

button {
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: var(--accent-color);
}

input[type="number"] {
    padding: 0.5rem;
    border: 2px solid var(--primary);
    border-radius: 8px;
    width: 70px;
    text-align: center;
}

/* Responsive Media Queries */
@media screen and (max-width: 768px) {
    .scoreboard-container {
        flex-direction: column;
        align-items: center;
    }

    .team-section {
        width: 90%;
    }
}

@media screen and (max-width: 480px) {
    .header-container {
        font-size: 0.9rem;
    }

    button {
        font-size: 0.8rem;
    }

    .score-display,
    .fouls-display,
    .timer-display {
        font-size: 1.5rem;
    }
}
