/* Tic-Tac-Toe Game Styles */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Inter', system-ui, sans-serif;
}

#board {
    display: grid;
    grid-template: repeat(3, 140px) / repeat(3, 140px);
    gap: 12px;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

#board button {
    font-size: 3.5rem;
    font-weight: 700;
    font-family: inherit;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: #2d3748;
    position: relative;
    overflow: hidden;
}

#board button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#board button:hover:not([disabled]) {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

#board button:hover:not([disabled])::before {
    width: 200px;
    height: 200px;
}

#board button:active:not([disabled]) {
    transform: translateY(-2px);
}

#board button:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

#board button[disabled] {
    cursor: default;
    opacity: 0.9;
}

/* X and O colors */
#board button:has-text("X") {
    color: #e53e3e;
    text-shadow: 2px 2px 4px rgba(229, 62, 62, 0.3);
}

#board button:has-text("O") {
    color: #3182ce;
    text-shadow: 2px 2px 4px rgba(49, 130, 206, 0.3);
}

/* Animation for X and O appearance */
@keyframes popIn {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }

    50% {
        transform: scale(1.2) rotate(180deg);
    }

    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

#board button:not(:empty) {
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Winner animation */
@keyframes winnerGlow {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1), 0 0 30px rgba(102, 126, 234, 0.6);
    }

    50% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1), 0 0 50px rgba(102, 126, 234, 0.8);
    }
}

.winner {
    animation: winnerGlow 1s ease-in-out infinite;
}

/* Game info */
.game-info {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Reset button */
.reset-btn {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.75rem 2rem;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.reset-btn:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Mobile responsive */
@media (max-width: 600px) {
    #board {
        grid-template: repeat(3, 100px) / repeat(3, 100px);
        gap: 8px;
        padding: 1.5rem;
    }

    #board button {
        font-size: 2.5rem;
    }

    .game-info {
        font-size: 1.2rem;
    }
}