:root {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --player1-color: #e74c3c;
    --player2-color: #f1c40f;
    --board-color: #2c3e50;
    --highlight-color: #2ecc71;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

h1 {
    margin: 20px 0;
    color: var(--board-color);
    text-align: center;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
}

.game-controls {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.mode-selector,
.sound-controls {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

button {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

button.active {
    background-color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.game-info {
    margin: 15px 0;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    min-height: 30px;
}

.current-player {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-left: 10px;
    vertical-align: middle;
}

.player1 {
    background-color: var(--player1-color);
}

.player2 {
    background-color: var(--player2-color);
}

.game-board {
    position: relative;
    background-color: var(--board-color);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 600px;
    margin-bottom: 20px;
}

.board-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 10px;
    width: 100%;
    aspect-ratio: 9/6;
}

.cell {
    background-color: white;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.cell::before {
    content: '';
    display: block;
    padding-top: 100%;
}

.cell.empty:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.cell.player1 {
    background-color: var(--player1-color);
    animation: drop 0.5s ease-out;
}

.cell.player2 {
    background-color: var(--player2-color);
    animation: drop 0.5s ease-out;
}

.cell.winning {
    animation: pulse 1s infinite;
    box-shadow: 0 0 20px var(--highlight-color);
}

@keyframes drop {
    0% {
        transform: translateY(-300px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.restart-btn {
    margin-top: 20px;
    padding: 12px 25px;
    font-size: 1.1rem;
}

@media (max-width: 600px) {
    .board-grid {
        gap: 5px;
    }

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

    .mode-selector,
    .sound-controls {
        justify-content: center;
        width: 100%;
    }
}

/* Audio element styling */
audio {
    display: none;
}