/* FourSight – Connect Four with Brain-Train aesthetic */
/* Pastel colors, rounded corners, 2.5D bevels on tokens */

.game-content {
    background: var(--surface-color, #161B22);
    color: var(--text-primary, #F8FAFC);
    font-family: sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
}

.foursight-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.difficulty-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
}

.difficulty-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary, #8B949E);
}

.toggle-buttons {
    display: flex;
    gap: 4px;
}

.diff-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    border: 2px solid var(--border-color, rgba(255,255,255,0.2));
    background: var(--button-bg, #282828);
    color: var(--text-secondary, #8B949E);
    cursor: pointer;
    transition: all 0.2s ease;
}

.diff-btn:hover {
    border-color: var(--accent, #ffae00);
    color: var(--accent, #ffae00);
}

.diff-btn.active {
    background: var(--accent, #ffae00);
    color: var(--text-primary, #0F172A);
    border-color: var(--accent, #ffae00);
}

.stats-btn {
    padding: 8px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    border: 2px solid var(--border-color, rgba(255,255,255,0.2));
    background: var(--button-bg, #282828);
    color: var(--accent, #ffae00);
    cursor: pointer;
    transition: all 0.2s ease;
}

.stats-btn:hover {
    border-color: var(--accent, #ffae00);
    background: rgba(255, 174, 0, 0.15);
}

.turn-indicator {
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent, #ffae00);
}

.turn-indicator.ai-turn {
    color: #f87171;
}

/* Board container – pastel blue-gray background */
.foursight-board-wrap {
    padding: 20px;
    background: linear-gradient(145deg, #a5b4c4 0%, #8b9cad 50%, #7a8a9a 100%);
    border-radius: 20px;
    box-shadow:
        inset 0 2px 4px rgba(255,255,255,0.4),
        inset 0 -2px 6px rgba(0,0,0,0.15),
        0 8px 24px rgba(0,0,0,0.2);
}

.foursight-board {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    padding: 12px;
    background: linear-gradient(180deg, #6b7c8d 0%, #5a6a7a 100%);
    border-radius: 16px;
    box-shadow: inset 0 0 0 4px rgba(0,0,0,0.2);
}

/* Column – clickable drop zone */
.foursight-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px;
    cursor: pointer;
    border-radius: 12px;
    transition: background 0.15s ease;
}

.foursight-column:hover:not(.column-full) {
    background: rgba(255,255,255,0.15);
}

.foursight-column.column-full {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Cell – empty slot */
.foursight-cell {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(145deg, #e8eef4 0%, #d4dce4 50%, #c4cdd6 100%);
    box-shadow:
        inset 3px 3px 6px rgba(255,255,255,0.9),
        inset -2px -2px 4px rgba(0,0,0,0.08),
        0 1px 2px rgba(0,0,0,0.1);
    transition: transform 0.1s ease;
}

/* Token – 2.5D bevel, pastel colors */
.foursight-token {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    position: relative;
    transition: transform 0.15s ease;
}

/* Player 1 (Human) – Pastel Yellow */
.foursight-token.player1 {
    background: linear-gradient(145deg, #fef08a 0%, #fde047 30%, #facc15 70%, #eab308 100%);
    box-shadow:
        inset 4px 4px 8px rgba(255,255,255,0.7),
        inset -3px -3px 6px rgba(0,0,0,0.15),
        0 4px 8px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.4);
}

/* Player 2 (AI) – Pastel Red */
.foursight-token.player2 {
    background: linear-gradient(145deg, #fecaca 0%, #fca5a5 30%, #f87171 70%, #ef4444 100%);
    box-shadow:
        inset 4px 4px 8px rgba(255,255,255,0.6),
        inset -3px -3px 6px rgba(0,0,0,0.2),
        0 4px 8px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.3);
}

/* Gravity drop animation */
.foursight-token.drop-anim {
    animation: token-drop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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

/* Winning tokens – pulse/glow */
.foursight-token.winner {
    animation: winner-pulse 0.8s ease-in-out infinite;
}

@keyframes winner-pulse {
    0%, 100% {
        box-shadow:
            inset 4px 4px 8px rgba(255,255,255,0.7),
            inset -3px -3px 6px rgba(0,0,0,0.15),
            0 0 0 0 rgba(255, 255, 255, 0.6),
            0 4px 8px rgba(0,0,0,0.2);
    }
    50% {
        box-shadow:
            inset 4px 4px 8px rgba(255,255,255,0.8),
            inset -3px -3px 6px rgba(0,0,0,0.1),
            0 0 20px 4px rgba(255, 255, 255, 0.5),
            0 6px 16px rgba(0,0,0,0.25);
    }
}

.foursight-token.player2.winner {
    animation-name: winner-pulse-red;
}

@keyframes winner-pulse-red {
    0%, 100% {
        box-shadow:
            inset 4px 4px 8px rgba(255,255,255,0.6),
            inset -3px -3px 6px rgba(0,0,0,0.2),
            0 0 0 0 rgba(248, 113, 113, 0.5),
            0 4px 8px rgba(0,0,0,0.2);
    }
    50% {
        box-shadow:
            inset 4px 4px 8px rgba(255,255,255,0.7),
            inset -3px -3px 6px rgba(0,0,0,0.15),
            0 0 24px 6px rgba(248, 113, 113, 0.6),
            0 6px 16px rgba(0,0,0,0.25);
    }
}

.hint {
    color: var(--text-secondary, #8B949E);
    font-size: 0.85rem;
    margin-top: 16px;
    text-align: center;
    max-width: 420px;
}
