/* Estilos específicos de Batalla Naval */

.game-controls {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
}

.game-info {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.info-value {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
}

.ships-remaining {
    display: flex;
    gap: 2rem;
}

.ships-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.ships-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.ships-count {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.placement-phase {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.placement-info h3 {
    margin-top: 0;
    color: var(--text-primary);
}

.placement-info p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.ship-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

#ship-orientation {
    color: var(--text-secondary);
    font-weight: 500;
}

.boards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.board-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.board-title {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.battleship-board {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    background: var(--surface-light);
    padding: 2px;
    border-radius: 4px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
}

.battleship-cell {
    background: var(--surface);
    border: 2px outset var(--surface-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    position: relative;
    aspect-ratio: 1;
}

.battleship-cell:hover:not(.placed):not(.hit):not(.miss):not(.ship) {
    background: var(--surface-light);
    transform: scale(0.95);
}

.battleship-cell.ship {
    background: #3b82f6;
    border-color: #2563eb;
}

.battleship-cell.ship:hover {
    background: #2563eb;
}

.battleship-cell.placed {
    background: #10b981;
    border-color: #059669;
    cursor: default;
}

.battleship-cell.hit {
    background: #ef4444;
    border-color: #dc2626;
}

.battleship-cell.hit::after {
    content: "💥";
    font-size: 1.2rem;
}

.battleship-cell.miss {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.battleship-cell.miss::after {
    content: "⚪";
    font-size: 1rem;
}

.battleship-cell.sunk {
    background: #7c2d12;
    border-color: #92400e;
}

.battleship-cell.sunk::after {
    content: "💥";
    font-size: 1.2rem;
}

.battleship-cell.invalid {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
    cursor: not-allowed;
}

.battleship-cell.preview {
    background: rgba(59, 130, 246, 0.5);
    border-color: #3b82f6;
}

/* Responsive */
@media (max-width: 768px) {
    .game-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .game-info {
        flex-direction: column;
        gap: 1rem;
    }

    .ships-remaining {
        justify-content: space-around;
    }

    .boards-container {
        grid-template-columns: 1fr;
    }

    .battleship-board {
        max-width: 100%;
    }
}

