/* ==========================================================================
   juegos/assets/css/juego_variables.css
   ========================================================================== */

body { background-color: #1e1e1e; color: #d4d4d4; }

.game-header { text-align: center; padding: 40px 20px 20px; position: relative; z-index: 2; }
.btn-back {
    position: absolute; top: 20px; left: 20px; display: flex; align-items: center; gap: 8px;
    text-decoration: none; color: #fff; font-weight: 600; background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2); padding: 8px 16px; border-radius: 50px;
    backdrop-filter: blur(10px); transition: all 0.3s ease; z-index: 10;
}
.btn-back:hover {
    background: var(--theme-color, #F1C40F); color: #000; border-color: var(--theme-color, #F1C40F);
    transform: translateY(-2px); box-shadow: 0 5px 15px rgba(241, 196, 15, 0.3);
}

.game-header h1 {
    font-size: 2.8rem; font-weight: 800; color: #fff; margin-bottom: 10px; letter-spacing: -1px;
    font-family: 'Courier New', Courier, monospace;
}
.game-header p { color: #cccccc; font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

.game-container {
    max-width: 850px; margin: 20px auto 60px; background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(241, 196, 15, 0.3); border-bottom: 3px solid var(--theme-color, #F1C40F);
    border-radius: 30px; padding: 25px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(241, 196, 15, 0.15);
    transition: max-width 0.3s;
}

.level-selector { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 25px; }
.level-btn {
    padding: 10px 20px; border-radius: 50px; text-decoration: none; font-weight: 700;
    font-size: 0.95rem; color: #d4d4d4; background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1); transition: all 0.3s ease;
}
.level-btn:hover { transform: translateY(-2px); }
.level-btn.active { color: #000; border-color: transparent; }

.level-btn.facil.active { background: #34C759; box-shadow: 0 8px 20px rgba(52, 199, 89, 0.4); color: #fff; }
.level-btn.medio.active { background: #0A84FF; box-shadow: 0 8px 20px rgba(10, 132, 255, 0.4); color: #fff; }
.level-btn.dificil.active { background: #FF9500; box-shadow: 0 8px 20px rgba(255, 149, 0, 0.4); color: #fff; }
.level-btn.muy_dificil.active { background: #FF3B30; box-shadow: 0 8px 20px rgba(255, 59, 48, 0.4); color: #fff; }
.level-btn.caxcan.active { background: linear-gradient(135deg, #AF52DE, #5856D6); box-shadow: 0 8px 20px rgba(175, 82, 222, 0.4); color: #fff; }

.status-bar {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;
    padding: 10px 20px; background: rgba(241, 196, 15, 0.1); border-radius: 15px; border: 1px solid rgba(241, 196, 15, 0.3);
    visibility: hidden; font-family: 'Courier New', Courier, monospace;
}
.status-item { font-size: 1.2rem; font-weight: 700; color: #fff; }
.status-item span { color: var(--theme-color, #F1C40F); }

.game-wrapper { position: relative; border-radius: 15px; min-height: 400px; overflow: hidden; padding: 10px; }

#quizBoard { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; width: 100%; animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.quiz-hint-label { font-size: 1.2rem; color: #cccccc; font-weight: 700; margin-bottom: 15px; text-align: center; font-family: 'Courier New', Courier, monospace; }

.data-box {
    width: 100%; max-width: 500px; background: #252526; color: #dcdcaa;
    font-family: 'Courier New', Courier, monospace; font-size: 3.5rem; font-weight: 900;
    padding: 30px 20px; border-radius: 15px; border: 2px dashed rgba(241, 196, 15, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(241, 196, 15, 0.05);
    margin-bottom: 40px; text-align: center; position: relative; word-break: break-all;
    animation: popInData 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.data-box::before {
    content: 'let value ='; position: absolute; top: -12px; left: 20px; background: #1e1e1e;
    padding: 0 10px; font-size: 1rem; color: #569cd6; font-weight: normal;
}
@keyframes popInData { 0% { transform: scale(0.8) translateY(-20px); opacity: 0; } 100% { transform: scale(1) translateY(0); opacity: 1; } }

.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; width: 100%; max-width: 700px; }

.btn-option {
    background: rgba(255, 255, 255, 0.05); border: 2px solid rgba(241, 196, 15, 0.3); color: #d4d4d4;
    padding: 15px 20px; border-radius: 12px; font-size: 1.2rem; font-weight: 700; cursor: pointer;
    transition: all 0.3s; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; text-align: center;
}
.btn-option:hover {
    transform: translateY(-5px); background: rgba(241, 196, 15, 0.15); border-color: var(--theme-color, #F1C40F);
    box-shadow: 0 8px 20px rgba(241, 196, 15, 0.3); color: #fff;
}

.btn-option.correct { background: #34C759 !important; border-color: #34C759 !important; color: white !important; box-shadow: 0 5px 20px rgba(52, 199, 89, 0.6) !important; transform: scale(1.05); }
.btn-option.wrong { background: #FF3B30 !important; border-color: #FF3B30 !important; color: white !important; animation: shakeError 0.4s ease; }
@keyframes shakeError { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

@media (max-width: 600px) { .quiz-options { grid-template-columns: 1fr; } .data-box { font-size: 2.5rem; padding: 25px 15px; } .btn-option { font-size: 1.1rem; } }

.game-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column;
    justify-content: center; align-items: center; background: rgba(30, 30, 30, 0.95); backdrop-filter: blur(10px);
    z-index: 10; text-align: center; padding: 20px;
}
.game-overlay h2 { font-size: 2.5rem; color: var(--theme-color, #F1C40F); margin-bottom: 10px; font-weight: 800; font-family: 'Courier New', Courier, monospace; }

.btn-game {
    background: var(--theme-color, #F1C40F); color: #000; border: none; padding: 14px 30px;
    border-radius: 50px; font-size: 1.1rem; font-weight: 800; cursor: pointer;
    box-shadow: 0 8px 20px rgba(241, 196, 15, 0.3); transition: all 0.3s; margin-top: 15px; display: inline-flex; align-items: center; gap: 8px;
}
.btn-game:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 12px 25px rgba(241, 196, 15, 0.5); background: #f39c12; }

.btn-volver-juegos { display: inline-flex; align-items: center; gap: 8px; color: #8b949e; text-decoration: none; font-weight: 600; transition: color 0.3s; padding: 10px 20px; }
.btn-volver-juegos:hover { color: var(--theme-color, #F1C40F); }

.modal-top3-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(8px);
    z-index: 9999; display: none; justify-content: center; align-items: center; padding: 20px;
}
.modal-top3-content {
    background: #1e1e1e; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 25px; width: 100%; max-width: 450px;
    padding: 30px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); position: relative; animation: popIn 0.3s ease; text-align: center;
}
@keyframes popIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
.btn-cerrar-modal { position: absolute; top: 15px; right: 20px; background: none; border: none; font-size: 1.5rem; color: #8b949e; cursor: pointer; }
.btn-cerrar-modal:hover { color: #FF3B30; }
.modal-top3-icon { font-size: 4rem; margin-bottom: 15px; filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.5)); color: #FFD700; }
.modal-top3-title { font-size: 1.8rem; font-weight: 800; color: #fff; margin-bottom: 5px; }

.ranking-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; text-align: left; }
.ranking-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 15px; }
.ranking-item .rank-pos { font-size: 1.5rem; font-weight: 800; width: 30px; }
.ranking-item.pos-1 { border-color: #FFD700; background: rgba(255, 215, 0, 0.1); } .ranking-item.pos-1 .rank-pos { color: #FFD700; }
.ranking-item.pos-2 { border-color: #C0C0C0; background: rgba(192, 192, 192, 0.1); } .ranking-item.pos-2 .rank-pos { color: #C0C0C0; }
.ranking-item.pos-3 { border-color: #CD7F32; background: rgba(205, 127, 50, 0.1); } .ranking-item.pos-3 .rank-pos { color: #CD7F32; }
.rank-info { flex-grow: 1; padding-left: 15px; }
.rank-name { font-weight: 700; color: #fff; font-size: 1.1rem; }
.rank-score { font-weight: 900; font-size: 1.2rem; color: #fff; }

@media (max-width: 768px) {
    .game-header { padding-top: 30px !important; display: flex; flex-direction: column; align-items: center; }
    .btn-back { position: relative; top: 0; left: 0; margin: 0 auto 20px auto; width: max-content; }
    .game-header h1 { font-size: 2.2rem; }
}