/* ========== ESTILOS BASE DEL JUEGO DE AHORCADO ========== */

/* Animación de olas de fondo */
.wave-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".25" class="shape-fill"></path><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" opacity=".5" class="shape-fill"></path><path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" class="shape-fill"></path></svg>') no-repeat;
    background-size: cover;
    opacity: 0.1;
    z-index: -1;
    animation: wave 20s ease-in-out infinite;
}

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

/* Contenedor principal del juego */
.game-container {
    padding: 2rem 0;
    min-height: 100vh;
}

/* ========== ENCABEZADO DEL JUEGO ========== */
.game-header {
    text-align: center;
    margin-bottom: 2rem;
}

.game-header h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.game-header .lead {
    color: #b8d4f0;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

/* ========== CONFIGURACIÓN DEL JUEGO ========== */
.game-setup {
    max-width: 600px;
    margin: 0 auto;
}

.setup-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.setup-container h3 {
    color: #ffd700;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    color: white;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

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

.form-control:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ffd700;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.3);
    color: white;
}

.form-control option {
    background: #2c3e50;
    color: white;
}

/* ========== ESTADÍSTICAS DEL JUEGO ========== */
.game-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 120px;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-3px);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.stat-item div:last-child {
    color: white;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ========== ÁREA DEL AHORCADO MEJORADA ========== */
.hangman-area {
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.2) 0%, rgba(42, 82, 152, 0.2) 100%);
    border-radius: 30px;
    padding: 3rem;
    margin-bottom: 2rem;
    border: 4px solid rgba(100, 181, 246, 0.4);
    backdrop-filter: blur(20px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.hangman-area::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(100, 181, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(66, 165, 245, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(74, 144, 226, 0.08) 0%, transparent 50%);
    animation: float 8s ease-in-out infinite;
    pointer-events: none;
}

.hangman-area::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, rgba(100, 181, 246, 0.05) 50%, transparent 70%);
    animation: shimmer 4s ease-in-out infinite;
    pointer-events: none;
}

.hangman-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    margin-bottom: 2rem;
    position: relative;
    background: 
        linear-gradient(180deg, rgba(135, 206, 235, 0.1) 0%, rgba(70, 130, 180, 0.1) 100%);
    border-radius: 20px;
    border: 2px solid rgba(100, 181, 246, 0.2);
    overflow: hidden;
}

/* Escenario marítimo */
.hangman-container::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: 
        linear-gradient(180deg, transparent 0%, rgba(30, 60, 114, 0.3) 100%),
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 20px,
            rgba(100, 181, 246, 0.1) 20px,
            rgba(100, 181, 246, 0.1) 22px
        );
    animation: waves 3s ease-in-out infinite;
}

.hangman-container::after {
    content: '🌊';
    position: absolute;
    bottom: 10px;
    left: 20px;
    font-size: 24px;
    animation: float 2s ease-in-out infinite;
}

/* Olas animadas */
@keyframes waves {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

.hangman-drawing {
    position: relative;
    width: 320px;
    height: 380px;
    border: 4px solid rgba(100, 181, 246, 0.5);
    border-radius: 25px;
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%),
        radial-gradient(circle at 30% 20%, rgba(100, 181, 246, 0.1) 0%, transparent 50%);
    backdrop-filter: blur(15px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.25),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.hangman-drawing::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(100, 181, 246, 0.1) 50%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    animation: shine 4s ease-in-out infinite;
}

.hangman-drawing::after {
    content: '⚓';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 20px;
    opacity: 0.3;
    animation: float 3s ease-in-out infinite;
}

/* Elementos del dibujo del ahorcado mejorados */
.hangman-element {
    position: absolute;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: scale(0);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 2px 5px rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.hangman-element.show {
    opacity: 1;
    transform: scale(1);
    animation: hangmanAppearEnhanced 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes hangmanAppearEnhanced {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-10deg);
        filter: blur(5px);
    }
    30% {
        opacity: 0.6;
        transform: scale(1.2) rotate(5deg);
        filter: blur(2px);
    }
    60% {
        opacity: 0.9;
        transform: scale(0.95) rotate(-2deg);
        filter: blur(0px);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        filter: blur(0px);
    }
}

/* Base del ahorcado mejorada */
.hangman-base {
    bottom: 0;
    left: 15px;
    width: 100px;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

/* Poste vertical mejorado */
.hangman-post {
    bottom: 12px;
    left: 25px;
    width: 12px;
    height: 220px;
    border-radius: 6px;
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 3px rgba(255, 255, 255, 0.2);
}

/* Poste horizontal mejorado */
.hangman-beam {
    top: 25px;
    left: 25px;
    width: 120px;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 3px rgba(255, 255, 255, 0.2);
}

/* Cuerda mejorada */
.hangman-rope {
    top: 25px;
    right: 25px;
    width: 6px;
    height: 35px;
    border-radius: 3px;
    background: linear-gradient(135deg, #8b4513 0%, #654321 100%);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
    animation: ropeSway 2s ease-in-out infinite;
}

@keyframes ropeSway {
    0%, 100% { transform: rotate(1deg); }
    50% { transform: rotate(-1deg); }
}

/* Cabeza mejorada */
.hangman-head {
    top: 60px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 4px solid #2c3e50;
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
    position: relative;
}

.hangman-head::before {
    content: '😟';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.hangman-head.show::before {
    opacity: 1;
}

/* Cuerpo mejorado */
.hangman-body {
    top: 100px;
    right: 25px;
    width: 12px;
    height: 70px;
    border-radius: 6px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 3px rgba(255, 255, 255, 0.1);
}

/* Brazo izquierdo mejorado */
.hangman-left-arm {
    top: 110px;
    right: 45px;
    width: 35px;
    height: 12px;
    border-radius: 6px;
    transform-origin: right center;
    transform: rotate(-35deg);
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 3px rgba(255, 255, 255, 0.1);
}

/* Brazo derecho mejorado */
.hangman-right-arm {
    top: 110px;
    right: 7px;
    width: 35px;
    height: 12px;
    border-radius: 6px;
    transform-origin: left center;
    transform: rotate(35deg);
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 3px rgba(255, 255, 255, 0.1);
}

/* Pierna izquierda mejorada */
.hangman-left-leg {
    top: 170px;
    right: 45px;
    width: 12px;
    height: 45px;
    border-radius: 6px;
    transform-origin: top center;
    transform: rotate(-25deg);
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 3px rgba(255, 255, 255, 0.1);
}

/* Pierna derecha mejorada */
.hangman-right-leg {
    top: 170px;
    right: 19px;
    width: 12px;
    height: 45px;
    border-radius: 6px;
    transform-origin: top center;
    transform: rotate(25deg);
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 3px rgba(255, 255, 255, 0.1);
}

/* ========== ELEMENTOS ADICIONALES DEL MUÑECO ========== */

/* Pie izquierdo */
.hangman-left-foot {
    top: 210px;
    right: 50px;
    width: 20px;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    box-shadow: 
        0 3px 10px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

/* Pie derecho */
.hangman-right-foot {
    top: 210px;
    right: 12px;
    width: 20px;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    box-shadow: 
        0 3px 10px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

/* Mano izquierda */
.hangman-left-hand {
    top: 105px;
    right: 55px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    box-shadow: 
        0 3px 10px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* Mano derecha */
.hangman-right-hand {
    top: 105px;
    right: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    box-shadow: 
        0 3px 10px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* Ojo izquierdo */
.hangman-left-eye {
    top: 70px;
    right: 25px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2c3e50;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Ojo derecho */
.hangman-right-eye {
    top: 70px;
    right: 15px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2c3e50;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Boca */
.hangman-mouth {
    top: 80px;
    right: 18px;
    width: 10px;
    height: 4px;
    border-radius: 0 0 10px 10px;
    background: #2c3e50;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* ========== ANIMACIONES ESPECIALES DEL MUÑECO ========== */
.hangman-element.show:nth-child(6) {
    animation: headShake 0.5s ease-in-out;
}

@keyframes headShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

.hangman-element.show:nth-child(7) {
    animation: bodySway 1s ease-in-out;
}

@keyframes bodySway {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(1deg); }
    75% { transform: rotate(-1deg); }
}

/* Animaciones para elementos adicionales */
.hangman-element.show:nth-child(8),
.hangman-element.show:nth-child(9) {
    animation: armWave 0.8s ease-in-out;
}

@keyframes armWave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
}

.hangman-element.show:nth-child(10),
.hangman-element.show:nth-child(11) {
    animation: legKick 0.6s ease-in-out;
}

@keyframes legKick {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(10deg); }
}

.hangman-element.show:nth-child(12),
.hangman-element.show:nth-child(13) {
    animation: footTap 0.4s ease-in-out;
}

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

.hangman-element.show:nth-child(14),
.hangman-element.show:nth-child(15) {
    animation: handWave 0.5s ease-in-out;
}

@keyframes handWave {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.hangman-element.show:nth-child(16),
.hangman-element.show:nth-child(17) {
    animation: eyeBlink 0.3s ease-in-out;
}

@keyframes eyeBlink {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.1); }
}

.hangman-element.show:nth-child(18) {
    animation: mouthOpen 0.4s ease-in-out;
}

@keyframes mouthOpen {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.5); }
}

/* Efecto de brillo para el contenedor */
@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Animación de shimmer */
@keyframes shimmer {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* ========== DISPLAY DE LA PALABRA ========== */
.word-display {
    text-align: center;
    margin-bottom: 2rem;
}

.word-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.word-letter {
    width: 40px;
    height: 50px;
    border-bottom: 3px solid #2c3e50;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
    position: relative;
}

.word-letter.revealed {
    color: #27ae60;
    animation: letterReveal 0.5s ease-out;
}

.word-letter.wrong {
    color: #e74c3c;
    animation: letterWrong 0.5s ease-out;
}

@keyframes letterReveal {
    0% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(90deg);
        opacity: 0.7;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes letterWrong {
    0% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
    100% {
        transform: translateX(0);
    }
}

/* ========== CONTENEDOR DE PISTA ========== */
.hint-container {
    text-align: center;
    margin-bottom: 2rem;
}

.hint-box {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #2c3e50;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: hintPulse 2s infinite;
}

@keyframes hintPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    }
}

/* ========== PANEL DE CONTROL ========== */
.control-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.control-panel h4 {
    color: #ffd700;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* ========== TECLADO VIRTUAL ========== */
.virtual-keyboard {
    margin-bottom: 2rem;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.keyboard-key {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.keyboard-key:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.keyboard-key:active {
    transform: translateY(0);
}

.keyboard-key.correct {
    background: #27ae60;
    border-color: #229954;
    animation: keyCorrect 0.5s ease-out;
}

.keyboard-key.wrong {
    background: #e74c3c;
    border-color: #c0392b;
    animation: keyWrong 0.5s ease-out;
}

.keyboard-key.disabled {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

@keyframes keyCorrect {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes keyWrong {
    0% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-3px);
    }
    75% {
        transform: translateX(3px);
    }
    100% {
        transform: translateX(0);
    }
}

/* ========== LETRAS USADAS ========== */
.used-letters {
    margin-bottom: 2rem;
}

.used-letters h5 {
    color: #ffd700;
    margin-bottom: 1rem;
    text-align: center;
}

.letters-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.correct-letters, .wrong-letters {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.correct-letters .label, .wrong-letters .label {
    font-size: 0.9rem;
    font-weight: bold;
    color: white;
}

.correct-letters .letters, .wrong-letters .letters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.letter-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    min-width: 25px;
    text-align: center;
}

.letter-badge.correct {
    background: #27ae60;
    color: white;
}

.letter-badge.wrong {
    background: #e74c3c;
    color: white;
}

/* ========== BOTONES DE ACCIÓN ========== */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.action-buttons .btn {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.action-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ========== RESULTADO DEL JUEGO ========== */
.game-result {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.result-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 3rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: resultBounce 1s ease-out;
}

.result-icon.win {
    color: #27ae60;
}

.result-icon.lose {
    color: #e74c3c;
}

@keyframes resultBounce {
    0% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(90deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.result-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: white;
}

.result-details {
    color: #b8d4f0;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ========== BOTONES PERSONALIZADOS ========== */
.btn-ocean {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-ocean:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: white;
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    background: transparent;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-2px);
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
    .game-header h1 {
        font-size: 2rem;
    }
    
    .game-stats {
        gap: 1rem;
    }
    
    .stat-item {
        min-width: 100px;
        padding: 0.75rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .hangman-drawing {
        width: 150px;
        height: 200px;
    }
    
    .word-letter {
        width: 30px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .keyboard-key {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .result-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 1rem 0;
    }
    
    .setup-container, .hangman-area, .control-panel {
        padding: 1.5rem;
    }
    
    .hangman-drawing {
        width: 120px;
        height: 160px;
    }
    
    .word-letter {
        width: 25px;
        height: 35px;
        font-size: 1rem;
    }
    
    .keyboard-key {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
}

/* ========== EFECTOS ESPECIALES ========== */
.particle-effect {
    position: absolute;
    pointer-events: none;
    z-index: 1000;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #ffd700;
    border-radius: 50%;
    animation: particleFloat 2s ease-out forwards;
}

@keyframes particleFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0);
    }
}

/* Efecto de confeti para victoria */
.confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ffd700;
    animation: confettiFall 3s linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}
