.game-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: rgba(0, 53, 102, 0.3);
    border-radius: 10px;
    margin-bottom: 30px;
}

.player-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#player-name {
    font-size: 1.5rem;
    color: var(--accent-color);
}

#player-status {
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.game-boards {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.board-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.board {
    display: grid;
    grid-template-columns: repeat(10, 40px);
    grid-template-rows: repeat(10, 40px);
    gap: 2px;
    margin: 20px 0;
}

.board-cell {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: bold;
}

.board-cell:hover {
    background-color: rgba(0, 162, 43, 0.3);
}

.board-cell.hit {
    background-color: var(--danger-color);
    color: white;
}

.board-cell.miss {
    background-color: rgba(255, 255, 255, 0.5);
    color: #333;
}

.board-cell.ship {
    background-color: var(--primary-color);
}

.board-cell.ship.hit {
    background-color: var(--success-color);
}

.board-cell.occupied {
    background-color: rgba(0, 53, 102, 0.5);
}

/* Deshabilitar celdas cuando no es tu turno */
.board-cell.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.board-cell.disabled:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.game-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
}

/* game.css - añade al final */
.connect-options {
    max-width: 500px;
    margin: 30px auto;
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    font-size: 1rem;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.game-code-display {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background-color: rgba(0, 53, 102, 0.3);
    border-radius: 8px;
}

.code-display {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-color);
    letter-spacing: 3px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    margin: 15px 0;
}

.help-text {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-top: 10px;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

#waiting-for-opponent {
    text-align: center;
    margin-top: 30px;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* Game Over Modal */
.game-over-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-in-out;
}

.game-over-content {
    background: linear-gradient(135deg, rgba(0, 53, 102, 0.95), rgba(0, 32, 63, 0.95));
    border: 2px solid var(--accent-color);
    border-radius: 20px;
    padding: 50px;
    text-align: center;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.5s ease-out;
}

.game-over-icon {
    font-size: 6rem;
    margin-bottom: 20px;
    animation: bounce 1s ease-in-out infinite;
}

.game-over-title {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}

.game-over-message {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 30px;
}

.game-over-stats {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
}

.stat-item .stat-label {
    color: var(--secondary-color);
}

.stat-item .stat-value {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.3rem;
}

.game-over-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
    min-width: 200px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.game-over-modal.victory .game-over-icon {
    animation: bounce 1s ease-in-out infinite, spin 2s linear infinite;
}

.game-over-modal.defeat .game-over-content {
    background: linear-gradient(135deg, rgba(102, 0, 0, 0.95), rgba(63, 0, 0, 0.95));
    border-color: #ff4444;
}

.game-over-modal.defeat .game-over-title {
    color: #ff4444;
    text-shadow: 0 0 20px rgba(255, 68, 68, 0.5);
}

.game-over-modal.defeat .stat-item .stat-value {
    color: #ff6666;
}