/* Tema Conecta 4 */
body.theme-connect4 {
    background: linear-gradient(135deg, #2c3e50, #34495e);
}

.game-screen {
    display: none;
    animation: fadeIn 0.5s ease;
}

.game-screen.active {
    display: block;
}

/* Tablero */
.board-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.c4-board {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 5px;
    background-color: #3498db; /* Azul clásico */
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 450px;
    aspect-ratio: 7/6;
}

.c4-cell {
    background-color: #2c3e50; /* Fondo oscuro para los huecos */
    border-radius: 50%;
    width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}

.c4-cell:hover {
    background-color: #34495e;
}

/* Fichas */
.c4-piece {
    width: 90%;
    height: 90%;
    border-radius: 50%;
    position: absolute;
    top: 5%;
    left: 5%;
    box-shadow: inset 0 -3px 5px rgba(0,0,0,0.3), 0 2px 5px rgba(0,0,0,0.2);
}

.c4-piece.p1 {
    background-color: #e74c3c; /* Rojo */
}

.c4-piece.p2 {
    background-color: #f1c40f; /* Amarillo */
}

/* Animación de caída */
.c4-piece.falling {
    animation: drop 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes drop {
    0% { transform: translateY(-500%); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Info Bar */
.game-info-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.turn-indicator {
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    color: white;
    text-align: center;
    width: 100%;
}

.turn-indicator.my-turn { background: #2ecc71; }
.turn-indicator.opponent-turn { background: #e74c3c; }

.players-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.player-badge {
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
}
.player-badge.p1 { border-bottom: 3px solid #e74c3c; }
.player-badge.p2 { border-bottom: 3px solid #f1c40f; }

/* Historial de movimientos */
.history-container {
    margin: 15px auto;
    background: rgba(0,0,0,0.2);
    padding: 10px;
    border-radius: 10px;
    max-width: 450px;
    width: 100%;
    border: 1px solid rgba(255,255,255,0.05);
}

.history-container h3 {
    color: rgba(255,255,255,0.9);
    text-align: center;
    margin: 0 0 10px 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 5px;
}

.move-history {
    max-height: 100px;
    overflow-y: auto;
    font-size: 0.85rem;
    color: #ecf0f1;
}

.move-entry {
    padding: 4px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
}

.move-entry.p1 { color: #ff8a80; } /* Rojo claro */
.move-entry.p2 { color: #ffd54f; } /* Amarillo claro */