body {
    background-image: url('../../img/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

.container {
    background: rgba(86, 43, 243, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: white;
}

.game-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 2rem;
}

.game-title i {
    font-size: 2.5rem;
    color: #0d6efd;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.input-group {
    margin-bottom: 1rem;
}

.input-group-text {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    transition: all 0.3s ease;
}

.input-group:focus-within .input-group-text {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(13, 110, 253, 0.5);
}

.form-control {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    transition: all 0.3s ease;
    padding: 0.75rem 1rem;
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    border-color: rgba(13, 110, 253, 0.5);
}

.form-control::placeholder {
    color: #6c757d;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
    transition: all 0.3s ease;
    border-radius: 10px;
    padding: 10px 20px;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.4);
}

.btn-success {
    background-color: #198754;
    border-color: #198754;
    transition: all 0.3s ease;
    border-radius: 10px;
    padding: 10px 20px;
}

.btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(25, 135, 84, 0.4);
}

.form-label {
    color: white;
    font-weight: 500;
}

.btn-link {
    color: #0d6efd;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-link:hover {
    color: #0b5ed7;
    text-decoration: underline;
}

/* Títulos y etiquetas */ 
h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
}

label {
    color: #ffffff;
    font-weight: bold;
}

.card-header {
    background-color: #333;
    border-bottom: 1px solid #444;
    color: #ffffff;
}

.card-body {
    background-color: #2d2d2d;
    color: #ffffff;
}

.btn-secondary {
    background-color: #666;
    border-color: #555;
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: #555;
    border-color: #444;
    color: #ffffff;
}

/* Estilos para el juego */
.game-container {
    /*display: none;*/
}

.grid {
    display: grid;
    gap: 2px;
    background-color: #444;
    padding: 10px;
    border-radius: 5px;
}

.cell {
    aspect-ratio: 1;
    background-color: #3d3d3d;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
    color: #ffffff;
}

.cell:hover {
    background-color: #4d4d4d;
}

.cell.ship {
    background-color: #2d2d2d;
    border: 1px solid #666;
}

.cell.hit {
    background-color: #ff4444;
}

.cell.miss {
    background-color: #4444ff;
}

.cell.clickable {
    cursor: pointer;
}

.cell.sunk {
    background-color: #ff4444;
    border: 2px solid #ff0000;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Chat */
.chat-messages {
    height: 300px;
    overflow-y: auto;
    background-color: #2d2d2d;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.message {
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 5px;
    max-width: 80%;
    color: #ffffff;
}

.message.mine {
    background-color: #0066cc;
    margin-left: auto;
}

.message.theirs {
    background-color: #333;
    margin-right: auto;
}

/* Estado del juego */
#gameStatus {
    font-size: 1.2em;
    font-weight: bold;
    color: #ffffff;
    padding: 10px;
    background-color: #333;
    border-radius: 5px;
    display: inline-block;
}

/* Textos adicionales */
.text-muted {
    color: #aaaaaa !important;
}

.text-primary {
    color: #0066cc !important;
}

.text-success {
    color: #2ecc71 !important;
}

.text-danger {
    color: #ff4444 !important;
}

/* Selectores de naves */
.ship-selector {
    padding: 10px;
    margin-bottom: 10px;
    background-color: #333;
    border: 1px solid #444;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.ship-selector:hover {
    background-color: #444;
}

.ship-selector.selected {
    background-color: #0066cc;
    border-color: #0055aa;
}

.ship-selector.disabled {
    background-color: #222;
    border-color: #333;
    cursor: not-allowed;
    opacity: 0.5;
}

.ship-selector .badge {
    font-size: 1em;
    padding: 5px 10px;
}

/* Contadores de naves */
#carrierCount,
#battleshipCount,
#cruiserCount,
#submarineCount,
#destroyerCount {
    background-color: #0066cc;
}

.score-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #2c3e50;
    border-radius: 5px;
}

.score {
    font-size: 1.2em;
    font-weight: bold;
    color: #ecf0f1;
}

.score.highlight {
    color: #2ecc71;
    animation: highlight 1s infinite;
}

@keyframes highlight {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.game-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 1.2em;
    z-index: 1000;
    display: none;
    text-align: center;
    min-width: 300px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.game-result {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 30px;
    border-radius: 10px;
    font-size: 2em;
    z-index: 1000;
    text-align: center;
    min-width: 400px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -60%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999;
    display: none;
}

.waves {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 300px;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 150px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0) 100%);
    border-radius: 50% 50% 0 0 / 30% 30% 0 0;
    transform-origin: bottom;
    transform: scaleY(0.7);
}

.wave1 {
    animation: wave 8s linear infinite;
    z-index: 1000;
    opacity: 0.9;
    animation-delay: 0s;
    bottom: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 100%);
}

.wave2 {
    animation: wave2 12s linear infinite;
    z-index: 999;
    opacity: 0.7;
    animation-delay: -4s;
    bottom: 20px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 100%);
}

.wave3 {
    animation: wave 16s linear infinite;
    z-index: 998;
    opacity: 0.5;
    animation-delay: -2s;
    bottom: 40px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0) 100%);
}

@keyframes wave {
    0% {
        transform: scaleY(0.7) translateX(0);
    }
    50% {
        transform: scaleY(0.7) translateX(-50%);
    }
    100% {
        transform: scaleY(0.7) translateX(0);
    }
}

@keyframes wave2 {
    0% {
        transform: scaleY(0.7) translateX(0);
    }
    50% {
        transform: scaleY(0.7) translateX(50%);
    }
    100% {
        transform: scaleY(0.7) translateX(0);
    }
}

.game-report {
    padding: 20px;
    text-align: center;
    color: white;
}

.game-report h3 {
    margin-bottom: 30px;
    font-size: 2em;
    color: #0d6efd;
}

.report-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.stat-label {
    display: block;
    font-size: 0.9em;
    color: #aaa;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.5em;
    font-weight: bold;
    color: #0d6efd;
}

.report-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.report-actions .btn {
    min-width: 150px;
}

.modal-content {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
}

.modal-body {
    padding: 30px;
} 

@media (max-width: 650px) { /* aggiustare 700px?  */
    .grid-container {
        flex-direction: column;
        align-items: center;
    }
}