/* XOX Game Styles */
.game-board-container {
    width: min(90vw, 70vh, 700px);
    max-width: 700px;
    margin: 0 auto;
}

#xox-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 0 auto;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    touch-action: none;
}

.xox-cell {
    aspect-ratio: 1;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(2rem, 10vw, 4rem);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    user-select: none;
}

@media (max-width: 768px) {
    .game-board-container {
        width: min(95vw, 80vh, 600px);
    }
}

@media (max-width: 480px) {
    .game-board-container {
        width: min(100%, 90vh);
    }

    #xox-grid {
        max-width: 400px;
    }
}

.xox-cell:hover:not(.taken) {
    background: var(--bg-alt);
    transform: scale(1.02);
}

.xox-cell.taken {
    cursor: default;
}

.xox-cell.X {
    color: #2563eb;
}

.xox-cell.O {
    color: #dc2626;
}

.xox-cell.winner {
    background: #dcfce7;
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {

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

    50% {
        transform: scale(1.05);
    }
}

/* Score board */
.score-board {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    font-weight: 600;
}

/* Player indicators for local multiplayer */
.player-indicators {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.player-indicators.hidden {
    display: none;
}

.player-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    background: var(--bg);
    border: 2px solid var(--border);
    transition: all 0.2s ease;
    opacity: 0.6;
}

.player-indicator.active {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#player-x-indicator.active {
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
}

#player-o-indicator.active {
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}

.player-symbol {
    font-size: 1.5rem;
    font-weight: 700;
}

.player-symbol.x {
    color: #2563eb;
}

.player-symbol.o {
    color: #dc2626;
}

.player-name {
    font-weight: 600;
    color: var(--text);
}

/* AI options container */
#ai-options {
    display: flex;
    gap: 0.5rem;
}

#x-score {
    color: #2563eb;
}

#o-score {
    color: #dc2626;
}

#draw-score {
    color: var(--text-light);
}

/* Game status */
#game-status {
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    padding: 1rem;
}

#game-status.x-turn {
    color: #2563eb;
}

#game-status.o-turn {
    color: #dc2626;
}

#game-status.winner {
    color: #059669;
}

#game-status.draw {
    color: #d97706;
}

/* Responsive */
@media (max-width: 400px) {
    .player-indicators {
        gap: 1rem;
    }

    .player-indicator {
        padding: 0.5rem 0.75rem;
    }

    .player-symbol {
        font-size: 1.25rem;
    }

    .player-name {
        font-size: 0.875rem;
    }

    #ai-options {
        flex-direction: column;
        gap: 0.5rem;
    }
}