:root {
    --bg-color: #0f1115;
    --card-bg: #1c1f26;
    --text-primary: #f0f0f5;
    --text-secondary: #a0a5b5;
    --accent: #82aaff;
    --accent-purple: #c792ea;
    --success: #c3e88d;
    --error: #ff8b94;
    --border: #2c313c;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0; padding: 0; display: flex; justify-content: center; min-height: 100vh;
}

#app { width: 100%; max-width: 500px; padding: 25px 20px; position: relative; }
.hidden { display: none !important; }

header { display: flex; justify-content: space-between; margin-bottom: 25px; }

/* Botones de Navegación */
.btn-nav {
    background: var(--card-bg); border: 1px solid var(--border);
    color: var(--text-secondary); padding: 10px 18px; border-radius: 20px; cursor: pointer;
}

#exam-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; min-height: 45px; }

.btn-nav-next {
    position: fixed;
    top: 50%; /* Lo centra verticalmente */
    right: 15px; /* Lo pega al borde derecho */
    transform: translateY(-50%);
    background: var(--accent);
    border: none;
    color: #000;
    width: 60px;
    height: 60px;
    border-radius: 50%; /* Lo hace redondo */
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6); /* Sombreado para que resalte sobre el texto */
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s, background-color 0.2s;
}

.btn-nav-next:active {
    transform: translateY(-50%) scale(0.9); /* Efecto de pulsación */
    background: #5c85ff;
}

h1, h2, h3 { text-align: center; font-weight: 500; letter-spacing: 0.5px; }
.menu-grid { display: grid; gap: 15px; margin-top: 20px; }

button {
    background-color: var(--card-bg); color: var(--text-primary);
    border: 1px solid var(--border); padding: 22px; border-radius: 20px;
    font-size: 16px; cursor: pointer; transition: all 0.2s ease;
}

/* Resaltado de selección en modo Examen */
.option-selected { border-color: var(--accent) !important; background-color: rgba(130, 170, 255, 0.1) !important; box-shadow: 0 0 10px rgba(130, 170, 255, 0.3); }

.btn-special { border-color: var(--accent); color: var(--accent); background-color: rgba(130, 170, 255, 0.05); }
.btn-error { border-color: #ffcc80; color: #ffcc80; background-color: rgba(255, 204, 128, 0.05); }
.btn-soft { border-color: var(--accent); color: var(--accent); }
.btn-soft-purple { border-color: var(--accent-purple); color: var(--accent-purple); }
.btn-home-large { width: 100%; margin-top: 20px; border-radius: 20px; }

.soft-hr { border: 0; height: 1px; background: var(--border); margin: 30px 0; }

#question-text { font-size: 19px; line-height: 1.5; margin-bottom: 30px; }
.option-btn { text-align: left; padding: 18px; font-size: 15.5px; }

.correct { background-color: rgba(195, 232, 141, 0.15) !important; border-color: var(--success) !important; color: var(--success); }
.incorrect { background-color: rgba(255, 139, 148, 0.15) !important; border-color: var(--error) !important; color: var(--error); }

#feedback-container {
    margin-top: 25px; padding: 20px; border-radius: 16px;
    background: #181b21; border-left: 5px solid var(--accent); font-size: 15px;
}

#score-display { text-align: center; font-size: 54px; margin: 30px 0; color: var(--accent); }

.review-item { padding: 15px; border-radius: 16px; margin-bottom: 15px; background: var(--card-bg); border: 1px solid var(--border); }
.review-correct { border-left: 5px solid var(--success); }
.review-incorrect { border-left: 5px solid var(--error); }

/* Confetti - Ajustado para que no se vea antes de caer */
.confetti {
    position: fixed; font-size: 28px; z-index: 1000;
    top: -50px; /* Empieza fuera de pantalla */
    animation: fall 3.5s linear forwards;
}

@keyframes fall {
    to { transform: translateY(110vh) rotate(360deg); }
}

.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(5px);
    display: flex; justify-content: center; align-items: center; z-index: 100;
}
.modal-content {
    background: var(--bg-color); padding: 30px 20px; border-radius: 24px;
    width: 90%; max-width: 400px; border: 1px solid var(--border);
}