/* Fondo verde claro y animación de letras */
    body {
        background-color: #00b4d8;
        /* Turquesa brillante */
        background-image: radial-gradient(circle at 1px 1px,
                rgba(233, 30, 99, 0.15) 1px,
                transparent 0);
        background-size: 20px 20px;
    }

    .floating-letters {
        position: fixed;
        top: 0px;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 0;
        opacity: 0.7;
        pointer-events: none;
    }

    .letter {
        position: absolute;
        font-size: 20px;
        font-weight: bold;
        color: #e91e63;
        /* Rosa intenso */
        animation: float 8s infinite linear;
        user-select: none;
        font-family: Arial, sans-serif;
    }

    @keyframes float {
        0% {
            transform: translateY(100vh) translateX(-10px) rotate(0deg);
            opacity: 0;
        }

        10% {
            opacity: 0.8;
        }

        90% {
            opacity: 0.8;
        }

        100% {
            transform: translateY(-100px) translateX(10px) rotate(180deg);
            opacity: 0;
        }
    }

    /* Estilos existentes (ajustados para tema claro) */
    #puzzleContainer {
        display: grid;
        gap: 1px;
        margin: 20px 0;
        background: #31262a;
        /* Rosa intenso */
        padding: 5px;
        border-radius: 5px;
        position: relative;
        z-index: 1;
    }

    #puzzleContainer div {
        width: 48px;
        height: 48px;
        line-height: 45px;
        text-align: center;
        user-select: none;
        background: #f5f5f5;
        cursor: pointer;
        font-weight: bold;
        color: #333;
        transition: all 0.2s;
        border: 0.8px solid #e0e0e0;
        font-size: 1.2em;
    }

    #puzzleContainer div.highlight {
        background-color: #4caf50;
        color: #fff;
    }

    .game-info {
        background: #f5f5f5;
        padding: 15px;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        margin-bottom: 20px;
        position: relative;
        z-index: 1;
        border: 1px solid #e0e0e0;
    }

    .words-row {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
        margin: 15px 0;
        padding: 10px;
        border-radius: 8px;
        position: relative;
        z-index: 1;
    }

    .word-item {
        padding: 8px 12px;
        background: rgb(157, 197, 158);
        border-radius: 20px;
        transition: all 0.3s;
        font-weight: 500;
        color: white;
        border: 1px solid #388e3c;
    }

    .game-header {
        text-align: center;
        margin-bottom: 15px;
    }

    .game-title {
        font-size: 2rem;
        font-weight: bold;
        color: #e91e63;
        margin-bottom: 5px;
    }

    .game-description {
        color: #616161;
        font-style: italic;
    }

.game-container {
    width: 85vw; /* Reducido de 80vw para evitar desbordamiento */
    min-height: 70vh;
    margin: 20px auto;
    display: flex;
    position: relative;
    flex-wrap: nowrap;
    gap: 20px; /* Reducido de 30px */
    padding: 20px; /* Reducido de 25px */
    border-radius: 10px;
    background: linear-gradient(135deg, #fdfcfb, #58a7f0);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    justify-content: space-between; /* Cambiado de space-around */
    max-width: 1400px; /* Límite máximo para pantallas grandes */
}





    .puzzle-section {
        flex: 1;
        min-width: 600px;
    }

.image-section {
    flex: 1;
    min-width: 400px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 30px;
    z-index: 1;
    margin-left: 190px; /* menor espacio a la izquierda para acercar la imagen */
}


    .game-image {
        max-width: 500px;
        height: 490px;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        border: 10px solid #e91e63;
    }

    /* Estilos para el selector */
    .word-selector {
        position: absolute;
        background-color: rgba(76, 175, 80, 0.3);
        border: 2px solid #4caf50;
        pointer-events: none;
        z-index: 10;
        transition: all 0.1s;
        border-radius: 2px;
        transform-origin: left center;
    }

    @media (max-width: 992px) {
        .game-container {
            flex-direction: column;
        }

        .puzzle-section {
            min-width: 100%;
        }
    }

    @media (max-width: 768px) {
        .words-row {
            justify-content: flex-start;
            overflow-x: auto;
            padding: 10px 5px;
        }

        #puzzleContainer div {
            width: 36px;
            height: 36px;
            line-height: 34px;
            font-size: 1em;
        }

    }

.game-controls {
    position: absolute;
    bottom: 20px;
    left: 50%; /* centro horizontal */
    transform: translateX(-50%); /* compensar el 50% para centrar exactamente */
    display: flex; /* fila horizontal */
    gap: 10px;
    z-index: 10;
}


    .game-controls .btn {
        border-radius: 50%;
        width: 45px;
        height: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    }

    .no-image-placeholder {
        width: 300px;
        height: 200px;
        background: #eee;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-style: italic;
        color: #666;
    }
    .game-timer {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    background: rgba(255, 255, 255, 0.8);
    padding: 6px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
}
.intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #1e2b17, #00b4d8);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
    color: white;
}

.intro-content {
    text-align: center;
}

.logo {
    width: 80px;
    margin-bottom: 20px;
}

.title {
    font-size: 28px;
    font-weight: bold;
}

.subtitle {
    font-size: 20px;
    color: #a8ff88;
    margin-bottom: 30px;
}

.player-box {
    background-color: #6c3;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.start-button {
    padding: 12px 30px;
    background-color: #ffd700;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    color: #333;
}

.countdown-screen {
    position: fixed;
    top: 0;
    left: 0;
    background: #000c;
    width: 100%;
    height: 100%;
    z-index: 9998;
    display: flex;
    justify-content: center;
    align-items: center;
}

.countdown-number {
    font-size: 100px;
    font-weight: bold;
    color: white;
    animation: scaleUp 1s ease-in-out infinite;
}

@keyframes scaleUp {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}
.modal-content {
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.modal-header {
    justify-content: center;
}
.game-container:fullscreen {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    /* si quieres que el contenido crezca también */
}

.game-container:-webkit-full-screen { /* Safari */
    width: 100vw;
    height: 100vh;
}

.game-container:-ms-fullscreen { /* IE11 */
    width: 100vw;
    height: 100vh;
}
.fullscreen-container {
    width: 100%;
    height: 100%;
    flex-grow: 1;
}
.danger-button {
    background-color: #e74c3c;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.danger-button:hover {
    background-color: #c0392b;
}
