body {
    font-family: 'Arial', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
    background-color: #2c3e50; /* Dark Slate Blue */
    color: #ecf0f1; /* Light Gray */
}

h1 {
    color: #e74c3c; /* Alizarin Crimson */
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    grid-template-rows: repeat(3, 100px);
    gap: 10px;
    background-color: #34495e; /* Wet Asphalt */
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}

.cell {
    width: 100px;
    height: 100px;
    background-color: #ecf0f1; /* Light Gray */
    border: none;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cell:hover {
    background-color: #bdc3c7; /* Silver */
}

.cell.x {
    color: #3498db; /* Peter River Blue */
}

.cell.o {
    color: #e67e22; /* Carrot Orange */
}

.cell.x::before {
    content: 'X';
}

.cell.o::before {
    content: 'O';
}

.status {
    margin-top: 20px;
    font-size: 2rem;
    font-weight: bold;
    color: #ecf0f1;
}

#restartButton {
    margin-top: 20px;
    padding: 15px 30px;
    font-size: 1.2rem;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #e74c3c; /* Alizarin Crimson */
    color: white;
    box-shadow: 0 4px #c0392b; /* Pomegranate */
    transition: all 0.2s ease;
}

#restartButton:hover {
    background-color: #c0392b; /* Pomegranate */
}

#restartButton:active {
    box-shadow: 0 2px #c0392b;
    transform: translateY(2px);
}

#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* Winning cell animation */
.cell.win {
    background-color: #2ecc71; /* Emerald */
    color: white;
    animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 5px rgba(46, 204, 113, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 20px rgba(46, 204, 113, 1);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 5px rgba(46, 204, 113, 0.4);
    }
}