/* ==================== SISTEMA DE MÚLTIPLES FASES ==================== */

.multi-stage-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.stage-screen {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.stage-screen.active {
    display: flex;
    opacity: 1;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* ==================== FASE 1: QUIZ ==================== */

.quiz-container {
    text-align: center;
    max-width: 600px;
}

.quiz-container h1 {
    font-size: 2.5rem;
    color: #ff69b4;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 105, 180, 0.5);
}

.construction-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    padding: 15px 30px;
    border-radius: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 30px 0;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}

.quiz-message {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    margin: 20px 0;
    line-height: 1.6;
}

/* ==================== PANTALLAS DE TRANSICIÓN ==================== */

.transition-container {
    text-align: center;
    max-width: 700px;
}

.transition-container h2 {
    font-size: 3rem;
    color: white;
    margin-bottom: 30px;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    animation: pulseGlow 2s ease-in-out infinite;
}

.transition-message {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    line-height: 1.8;
}

.transition-hint {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    margin-bottom: 30px;
}

/* ==================== BOTONES ==================== */

.stage-btn {
    background: linear-gradient(135deg, #ff69b4 0%, #ff1493 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.3rem;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(255, 105, 180, 0.4);
    margin: 10px;
}

.stage-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.6);
}

.stage-btn:active {
    transform: translateY(-1px);
}

/* Botón secundario */
.stage-btn.secondary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stage-btn.secondary:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

/* Botones de dificultad */
.difficulty-selector {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.difficulty-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid white;
    color: white;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.difficulty-btn:hover {
    background: white;
    color: #333;
    transform: scale(1.05);
}

.difficulty-btn.easy {
    border-color: #90EE90;
}

.difficulty-btn.normal {
    border-color: #FFD700;
}

.difficulty-btn.hard {
    border-color: #FF6347;
}

/* ==================== ANIMACIONES ==================== */

@keyframes pulseGlow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    }
    50% {
        text-shadow: 0 0 40px rgba(255, 255, 255, 0.8);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stage-screen.active > * {
    animation: fadeInUp 0.6s ease-out;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .transition-container h2 {
        font-size: 2rem;
    }
    
    .transition-message {
        font-size: 1.1rem;
    }
    
    .stage-btn {
        padding: 12px 30px;
        font-size: 1.1rem;
    }
    
    .difficulty-selector {
        flex-direction: column;
    }
}

/* Asegurar que el contenedor de fases ocupe todo el espacio */
#multiStageContainer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    background: rgba(0, 0, 0, 0.95);
}

/* Cuando está oculto, no debe bloquear */
#multiStageContainer[style*="display: none"] {
    pointer-events: none;
}

/* Contenedor del Simon en multi-stage */
#stage-simon {
    display: none;
    width: 100%;
    min-height: 100%;
}

#stage-simon.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.simon-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

/* ==================== QUIZ COMPLETO ==================== */

.quiz-full {
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.quiz-progress {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.quiz-question {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.quiz-question p {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.quiz-input-date,
.quiz-input-text {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    border: 2px solid rgba(255, 105, 180, 0.5);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    margin-bottom: 15px;
}

.quiz-input-date:focus,
.quiz-input-text:focus {
    outline: none;
    border-color: #ff69b4;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.quiz-option {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.quiz-option:hover {
    background: rgba(255, 105, 180, 0.2);
    border-color: #ff69b4;
}

.quiz-option.selected {
    background: rgba(255, 105, 180, 0.4);
    border-color: #ff69b4;
}

.quiz-submit {
    width: 100%;
    margin-top: 10px;
}

.quiz-feedback {
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: 15px;
}

.quiz-feedback-correct {
    background: rgba(0, 255, 0, 0.2);
    color: #00ff00;
}

.quiz-feedback-wrong {
    background: rgba(255, 0, 0, 0.2);
    color: #ff4444;
}

.quiz-feedback-neutral {
    background: rgba(255, 255, 255, 0.1);
    color: #aaa;
}

.quiz-result {
    text-align: center;
    padding: 40px;
}

.quiz-result h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.quiz-passed h2 {
    color: #00ff00;
}

.quiz-failed h2 {
    color: #ff4444;
}

.quiz-result p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

/* ==================== PANTALLA INTRO QUIZ ==================== */

.quiz-intro-container {
    text-align: center;
    max-width: 800px;
    padding: 40px;
}

.quiz-intro-title {
    font-size: 3rem;
    background: linear-gradient(135deg, #ff0000 0%, #ff69b4 50%, #00ffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 40px;
    text-shadow: 0 0 30px rgba(255, 0, 0, 0.5);
    font-weight: 900;
    letter-spacing: 2px;
}

.quiz-intro-description {
    margin-bottom: 50px;
}

.quiz-intro-text {
    font-size: 1.3rem;
    color: white;
    margin: 20px 0;
    line-height: 1.8;
    font-weight: 500;
}

.quiz-intro-btn {
    background: linear-gradient(135deg, #ff0000 0%, #ff1493 100%);
    padding: 18px 45px;
    font-size: 1.3rem;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.5);
    animation: pulseGlow 2s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .quiz-intro-title {
        font-size: 2rem;
    }
    
    .decoding-text {
        font-size: 1.1rem;
    }
}