/* ========================================
   VARIABLES CSS - IDENTIDAD VISUAL MARÍTIMA
   ======================================== */
:root {
    --primary-gradient: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --secondary-gradient: linear-gradient(135deg, #64b5f6 0%, #42a5f5 100%);
    --ai-gradient: linear-gradient(135deg, #1e3c72 0%, #4a90e2 100%);
    --future-gradient: linear-gradient(135deg, #2a5298 0%, #5ba3f5 100%);
    --dark-gradient: linear-gradient(135deg, #0f1c3a 0%, #1e3c72 100%);
    --ocean-blue: #1e3c72;
    --ocean-light: #2a5298;
    --accent-blue: #64b5f6;
    --accent-light: #42a5f5;
    --soft-white: #e3f2fd;
    --text-light: #bbdefb;
    --shadow-light: 0 5px 15px rgba(0,0,0,0.1);
    --shadow-medium: 0 10px 30px rgba(0,0,0,0.15);
    --shadow-heavy: 0 20px 40px rgba(0,0,0,0.2);
    --border-radius: 15px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   ANIMACIONES GLOBALES MARÍTIMAS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes wave {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(5px) rotate(1deg); }
    75% { transform: translateX(-5px) rotate(-1deg); }
}

@keyframes backgroundShift {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    25% {
        transform: translate(-15px, -15px) scale(1.1);
        opacity: 0.8;
    }
    50% {
        transform: translate(15px, 10px) scale(0.9);
        opacity: 0.4;
    }
    75% {
        transform: translate(-10px, 15px) scale(1.05);
        opacity: 0.7;
    }
}

@keyframes screenShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

@keyframes comboExplosion {
    0% { transform: scale(0) rotate(-10deg); opacity: 0; }
    50% { transform: scale(1.5) rotate(5deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

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

/* ========================================
   FONDO MARINO CON EFECTOS
   ======================================== */
body {
    background: linear-gradient(135deg, #0a0e1a 0%, #1e3c72 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ========================================
   INDICADOR DE COMBO
   ======================================== */
.combo-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    animation: float 3s ease-in-out infinite;
}

.combo-badge {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.95) 0%, rgba(255, 193, 7, 0.95) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 15px 25px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(255, 215, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
}

.combo-badge:hover {
    transform: scale(1.05);
    box-shadow: 
        0 12px 40px rgba(255, 215, 0, 0.6),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.combo-icon {
    font-size: 36px;
    animation: pulse 1.5s ease-in-out infinite;
}

.combo-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.combo-label {
    font-size: 12px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.7);
    letter-spacing: 1px;
    margin-bottom: 3px;
}

.combo-value {
    font-size: 28px;
    font-weight: 900;
    color: #1e3c72;
    text-shadow: 
        2px 2px 0 rgba(255, 255, 255, 0.3),
        -1px -1px 0 rgba(0, 0, 0, 0.2);
    line-height: 1;
}

.multiplier-badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: #fff;
    font-weight: 900;
    padding: 8px 15px;
    border-radius: 12px;
    font-size: 18px;
    box-shadow: 
        0 4px 15px rgba(255, 107, 107, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.combo-stat {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 193, 7, 0.15) 100%);
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.combo-stat .stat-number {
    color: #ffd700;
    text-shadow: 
        0 0 10px rgba(255, 215, 0, 0.5),
        2px 2px 4px rgba(0, 0, 0, 0.3);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(100, 181, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(74, 144, 226, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(66, 165, 245, 0.03) 0%, transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite;
    z-index: -1;
}

/* ========================================
   CONTENEDOR PRINCIPAL
   ======================================== */
.game-container {
    padding: 2rem 0;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

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

.game-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="anchor" width="30" height="30" patternUnits="userSpaceOnUse"><path d="M15 5 L15 25 M10 10 L20 10 M8 15 L22 15" stroke="white" stroke-width="1" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23anchor)"/></svg>');
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

.game-header h1 {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
    position: relative;
    z-index: 2;
}

.game-header h1 i {
    color: var(--accent-blue);
    animation: float 3s ease-in-out infinite;
}

.game-header .lead {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
    position: relative;
    z-index: 2;
}

.game-header .alert {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--border-radius);
    color: #ffffff;
    position: relative;
    z-index: 2;
}

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

.setup-container {
    background: var(--ai-gradient);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.setup-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="anchor" width="30" height="30" patternUnits="userSpaceOnUse"><path d="M15 5 L15 25 M10 10 L20 10 M8 15 L22 15" stroke="white" stroke-width="1" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23anchor)"/></svg>');
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

.setup-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
    z-index: 1;
}

.setup-container:hover::after {
    left: 100%;
}

.setup-container h3 {
    color: #ffffff;
    font-weight: 900;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    position: relative;
    z-index: 2;
}

.setup-container h3 i {
    color: var(--accent-blue);
    animation: float 3s ease-in-out infinite;
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
    position: relative;
    z-index: 2;
}

.form-group label {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.form-group label i {
    color: var(--accent-blue);
}

.form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border-radius: var(--border-radius);
    padding: 0.75rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-blue);
    box-shadow: 0 0 20px rgba(100, 181, 246, 0.3);
    color: #ffffff;
    outline: none;
}

.form-control option {
    background: var(--ocean-blue);
    color: #ffffff;
}

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

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem 1rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    min-width: 120px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="anchor" width="30" height="30" patternUnits="userSpaceOnUse"><path d="M15 5 L15 25 M10 10 L20 10 M8 15 L22 15" stroke="white" stroke-width="1" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23anchor)"/></svg>');
    opacity: 0.2;
    z-index: 0;
    pointer-events: none;
}

.stat-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-medium);
    border-color: rgba(255, 255, 255, 0.28);
}

.stat-number {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-blue);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.stat-item div:last-child {
    color: #ffffff;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
}

/* ========================================
   ÁREA DEL AHORCADO
   ======================================== */
.hangman-area {
    background: var(--ai-gradient);
    border-radius: var(--border-radius);
    padding: 3rem;
    margin-bottom: 2rem;
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.hangman-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="anchor" width="30" height="30" patternUnits="userSpaceOnUse"><path d="M15 5 L15 25 M10 10 L20 10 M8 15 L22 15" stroke="white" stroke-width="1" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23anchor)"/></svg>');
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

.hangman-area::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
    z-index: 1;
}

.hangman-area:hover::after {
    left: 100%;
}

.hangman-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    margin-bottom: 2rem;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    overflow: hidden;
    z-index: 2;
}

.hangman-drawing {
    position: relative;
    width: 320px;
    height: 380px;
    border: 2px solid rgba(100, 181, 246, 0.3);
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    z-index: 2;
}

/* Elementos del dibujo del ahorcado */
.hangman-element {
    position: absolute;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 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);
    border-radius: 3px;
}

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

@keyframes hangmanAppear {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-10deg);
    }
    50% {
        transform: scale(1.2) rotate(5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

.hangman-base {
    bottom: 0;
    left: 15px;
    width: 100px;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
}

.hangman-post {
    bottom: 12px;
    left: 25px;
    width: 12px;
    height: 220px;
    border-radius: 6px;
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
}

.hangman-beam {
    top: 25px;
    left: 25px;
    width: 120px;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
}

.hangman-rope {
    top: 25px;
    right: 25px;
    width: 6px;
    height: 35px;
    border-radius: 3px;
    background: linear-gradient(135deg, #8b4513 0%, #654321 100%);
    animation: ropeSway 2s ease-in-out infinite;
}

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

.hangman-head {
    top: 60px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 4px solid #1e3c72;
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
}

.hangman-body {
    top: 100px;
    right: 25px;
    width: 12px;
    height: 70px;
    border-radius: 6px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.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, #1e3c72 0%, #2a5298 100%);
}

.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, #1e3c72 0%, #2a5298 100%);
}

.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, #1e3c72 0%, #2a5298 100%);
}

.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, #1e3c72 0%, #2a5298 100%);
}

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

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

.word-letter {
    width: 40px;
    height: 50px;
    border-bottom: 3px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
    position: relative;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

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

.word-letter.wrong {
    color: #f87171;
    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;
    position: relative;
    z-index: 2;
}

.hint-box {
    display: inline-block;
    background: var(--secondary-gradient);
    color: #ffffff;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 700;
    box-shadow: var(--shadow-medium);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: hintPulse 2s infinite;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

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

.hint-box i {
    color: var(--accent-blue);
    animation: float 3s ease-in-out infinite;
}

/* ========================================
   PANEL DE CONTROL
   ======================================== */
.control-panel {
    background: var(--ai-gradient);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.control-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="anchor" width="30" height="30" patternUnits="userSpaceOnUse"><path d="M15 5 L15 25 M10 10 L20 10 M8 15 L22 15" stroke="white" stroke-width="1" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23anchor)"/></svg>');
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

.control-panel h4 {
    color: #ffffff;
    font-weight: 900;
    margin-bottom: 1.5rem;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    position: relative;
    z-index: 2;
}

.control-panel h4 i {
    color: var(--accent-blue);
    animation: float 3s ease-in-out infinite;
}

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

.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.1);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--border-radius);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.keyboard-key:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
    border-color: rgba(255, 255, 255, 0.3);
}

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

.keyboard-key.correct {
    background: #4ade80;
    border-color: #22c55e;
    animation: keyCorrect 0.5s ease-out;
}

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

.keyboard-key.disabled {
    background: rgba(255, 255, 255, 0.05);
    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;
    position: relative;
    z-index: 2;
}

.used-letters h5 {
    color: #ffffff;
    font-weight: 900;
    margin-bottom: 1rem;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.used-letters h5 i {
    color: var(--accent-blue);
    animation: float 3s ease-in-out infinite;
}

.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: 700;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

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

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

.letter-badge.correct {
    background: #4ade80;
    color: #ffffff;
    border: 1.5px solid #22c55e;
}

.letter-badge.wrong {
    background: #f87171;
    color: #ffffff;
    border: 1.5px solid #ef4444;
}

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

.action-buttons .btn {
    width: 100%;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.action-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.action-buttons .btn-warning {
    background: var(--secondary-gradient);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.18);
}

.action-buttons .btn-danger {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.18);
}

.action-buttons .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.18);
}

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

.result-container {
    background: var(--ai-gradient);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.result-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="anchor" width="30" height="30" patternUnits="userSpaceOnUse"><path d="M15 5 L15 25 M10 10 L20 10 M8 15 L22 15" stroke="white" stroke-width="1" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23anchor)"/></svg>');
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

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

.result-icon.win {
    color: #4ade80;
}

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

@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: 900;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    position: relative;
    z-index: 2;
}

.result-details {
    color: #ffffff;
    margin-bottom: 2rem;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

/* ========================================
   BOTONES PERSONALIZADOS
   ======================================== */
.btn-ocean {
    background: var(--secondary-gradient);
    border: none;
    color: #ffffff;
    font-weight: 600;
    transition: var(--transition);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.btn-ocean::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-ocean:hover::before {
    left: 100%;
}

.btn-ocean:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    color: #ffffff;
}

.btn-outline-light {
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    background: transparent;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    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: 1rem 0.75rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .hangman-drawing {
        width: 250px;
        height: 300px;
    }
    
    .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: 200px;
        height: 250px;
    }
    
    .word-letter {
        width: 25px;
        height: 35px;
        font-size: 1rem;
    }
    
    .keyboard-key {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
}

