/* Connect 4 Specific Styles */

:root {
    --p1-color: #00d4ff; /* Matches --primary */
    --p2-color: #ff2e63; /* Neon Red/Pink for contrast */
    --board-bg: #111827; /* Matches --dark-card */
    --slot-empty: #1f2937;
}

.game-hero {
    padding: 150px 0 50px;
    position: relative;
    overflow: hidden;
}

.game-section {
    padding-bottom: 100px;
}

.game-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 0 auto 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.player-turn {
    background: var(--dark-card);
    padding: 1rem 2rem;
    border-radius: 50px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text);
}

.turn-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--p1-color);
    box-shadow: 0 0 10px var(--p1-color);
    transition: all 0.3s;
}

.scores {
    display: flex;
    gap: 1rem;
}

.score-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1.5rem;
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.score-box.p1 .p-label { color: var(--p1-color); }
.score-box.p2 .p-label { color: var(--p2-color); }

.p-score {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Board Styles */
.board-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    perspective: 1000px;
}

.connect4-board {
    background: var(--dark-card);
    border: 2px solid rgba(0, 212, 255, 0.3);
    padding: 15px;
    border-radius: 15px;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 212, 255, 0.1);
    position: relative;
    max-width: 100%;
}

.cell {
    width: 60px;
    height: 60px;
    background: var(--slot-empty);
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    box-shadow: inset 0 5px 10px rgba(0,0,0,0.5);
    transition: background-color 0.3s;
}

.cell:hover {
    background: #374151;
}

/* Column hover effect (optional, handled via JS or specific CSS) */
.cell.hover-p1 {
    box-shadow: inset 0 0 10px var(--p1-color);
}
.cell.hover-p2 {
    box-shadow: inset 0 0 10px var(--p2-color);
}

/* Pieces */
.piece {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    transform: scale(0);
    animation: dropIn 0.5s cubic-bezier(0.5, 0, 0.5, 1) forwards;
}

.piece.p1 {
    background: radial-gradient(circle at 30% 30%, #4ddfff, var(--p1-color));
    box-shadow: 0 0 15px var(--p1-color), inset 0 0 10px rgba(255,255,255,0.3);
}

.piece.p2 {
    background: radial-gradient(circle at 30% 30%, #ff8fa3, var(--p2-color));
    box-shadow: 0 0 15px var(--p2-color), inset 0 0 10px rgba(255,255,255,0.3);
}

@keyframes dropIn {
    0% { transform: translateY(-300px) scale(1); opacity: 0; }
    60% { transform: translateY(0) scale(1); opacity: 1; }
    80% { transform: translateY(-20px) scale(1); }
    100% { transform: translateY(0) scale(1); }
}

.game-actions {
    text-align: center;
    position: relative;
    height: 60px; /* Prevent jumping */
}

.winner-message {
    margin-top: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    min-height: 2rem;
    text-shadow: 0 0 10px var(--primary);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Winning cells highlight */
.cell.win {
    animation: winPulse 1.5s infinite;
}

@keyframes winPulse {
    0%, 100% { transform: scale(1); filter: brightness(1.2); }
    50% { transform: scale(0.95); filter: brightness(1.5); }
}

/* Responsive */
@media (max-width: 600px) {
    .cell {
        width: 40px;
        height: 40px;
    }

    .connect4-board {
        gap: 5px;
        padding: 10px;
    }

    .game-controls {
        flex-direction: column;
    }

    .scores {
        width: 100%;
        justify-content: center;
    }
}