/* Estilos para el juego interactivo
   Versión: 1.0.0 - 18/06/2025
*/

.juego-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    font-family: var(--font-secondary);
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.juego-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.juego-header h2 {
    font-family: var(--font-script);
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.juego-subtitle {
    font-size: 1.2rem;
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
}

/* Barra de progreso del quiz */
.quiz-progress-container {
    width: 100%;
    height: 12px;
    background-color: var(--light-gray);
    border-radius: 10px;
    overflow: hidden;
    margin: 1.5rem auto;
    position: relative;
}

.quiz-progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--gold-color), var(--secondary-color));
    width: 0;
    transition: width 0.5s ease;
    border-radius: 10px;
}

.quiz-progress-text {
    position: absolute;
    top: -22px;
    right: 0;
    font-size: 0.9rem;
    color: var(--medium-gray);
}

/* Contenedor principal del quiz */
.quiz-box {
    background-color: #f9f9f9;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    position: relative;
}

.quiz-box:before {
    content: "";
    position: absolute;
    top: -10px;
    left: 30px;
    width: 20px;
    height: 20px;
    background-color: #f9f9f9;
    transform: rotate(45deg);
}

/* Estilo de la pregunta */
.quiz-question-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.quiz-question {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 500;
    line-height: 1.4;
}

.question-indicator {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background-color: var(--gold-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* Opciones de respuesta */
.quiz-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 2rem;
}

.quiz-option {
    background-color: white;
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid var(--light-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    align-items: center;
    min-height: 60px;
}

.quiz-option:hover {
    border-color: var(--gold-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.quiz-option.correct {
    background-color: rgba(46, 204, 113, 0.15);
    border-color: #2ecc71;
}

.quiz-option.incorrect {
    background-color: rgba(231, 76, 60, 0.15);
    border-color: #e74c3c;
}

.quiz-option.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.option-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background-color: var(--light-gray);
    color: var(--dark-gray);
    border-radius: 50%;
    margin-right: 10px;
    font-weight: bold;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.quiz-option:hover .option-letter {
    background-color: var(--gold-color);
    color: white;
}

.quiz-option.correct .option-letter {
    background-color: #2ecc71;
    color: white;
}

.quiz-option.incorrect .option-letter {
    background-color: #e74c3c;
    color: white;
}

/* Controles del quiz */
.quiz-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.quiz-btn {
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: var(--font-secondary);
    font-size: 1rem;
}

.quiz-btn-primary {
    background: linear-gradient(135deg, var(--gold-color), var(--secondary-color));
    color: white;
}

.quiz-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.quiz-btn-secondary {
    background-color: var(--light-gray);
    color: var(--dark-gray);
}

.quiz-btn-secondary:hover {
    background-color: var(--medium-gray);
    color: white;
}

/* Explicación de la respuesta */
.quiz-explanation {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.03);
    border-left: 4px solid var(--gold-color);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    animation: fadeIn 0.5s ease;
}

/* Resultado final */
.quiz-result {
    text-align: center;
    padding: 1rem;
    margin-top: 1rem;
    font-weight: 500;
    color: var(--primary-color);
    min-height: 60px;
}

.result-message {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-family: var(--font-script);
}

.result-score {
    font-size: 2.5rem;
    color: var(--gold-color);
    margin-bottom: 0.5rem;
    animation: pulse 1.5s infinite;
}

.result-description {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Instrucciones del quiz */
.quiz-instructions {
    background-color: rgba(241, 196, 15, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 2rem;
}

.instruction-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.instruction-item:last-child {
    margin-bottom: 0;
}

.instruction-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.instruction-text {
    line-height: 1.4;
    color: var(--dark-gray);
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Confeti para celebrar el resultado */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: #f2d74e;
    animation: confetti-fall 3s ease-in-out infinite;
    z-index: 9999;
}

@keyframes confetti-fall {
    0% { transform: translate(0, -10vh) rotate(0deg); opacity: 1; }
    100% { transform: translate(0, 100vh) rotate(720deg); opacity: 0; }
}

/* Responsive */
@media (max-width: 768px) {
    .juego-header h2 {
        font-size: 2.3rem;
    }
    
    .quiz-options {
        grid-template-columns: 1fr;
    }
    
    .quiz-box {
        padding: 1.5rem;
    }
    
    .quiz-question {
        font-size: 1.3rem;
    }
    
    .quiz-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .quiz-btn {
        width: 100%;
        padding: 12px;
    }
}
