:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --success: #10b981;
    --danger: #ef4444;
    --bg-color: #63b1ff;
    --card-bg: #ffffff;
    --text: #1e293b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text);
    min-height: 100vh;
}

/* Navbar */
.navbar {
    background: white;
    height: 70px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: fixed;
    top: 0; width: 100%; z-index: 100;
}

.nav-container {
    width: 90%; max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
}

.nav-logo { font-weight: 700; font-size: 1.2rem; color: var(--primary); }
.nav-menu { list-style: none; }
.nav-menu a { text-decoration: none; color: var(--text); font-weight: 600; font-size: 0.9rem; transition: 0.3s; }
.nav-menu a:hover { color: var(--primary); }

/* Main Wrapper */
.main-wrapper {
    width: 100%; max-width: 650px; margin: 100px auto 40px;
    padding: 0 15px;
}

.card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    padding-bottom: 30px;
}

.header-img-container {
    width: 100%; height: 220px; overflow: hidden; margin-bottom: 20px;
}

.header-img { width: 100%; height: 100%; object-fit: cover; }

.narration-box {
    background: #f1f5f9; padding: 20px; margin: 0 25px 20px 25px;
    border-radius: 12px; font-size: 0.95rem; line-height: 1.6;
    border-left: 4px solid var(--primary);
}

.narration-box.success { border-left-color: var(--success); background: #f0fdf4; }

/* Media Elements */
.narration-box img { max-width: 100%; border-radius: 8px; margin: 10px 0; display: block; }
.video-container {
    position: relative; padding-bottom: 56.25%; height: 0;
    margin-top: 15px; border-radius: 8px; overflow: hidden;
}
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.audio-player { width: 100%; margin-top: 10px; }

.title { text-align: center; margin-bottom: 20px; font-size: 1.5rem; }

.form-group { padding: 0 25px; margin-bottom: 15px; }
.form-group label { display: block; font-size: 0.85rem; margin-bottom: 5px; font-weight: 600; }
.form-group input {
    width: 100%; padding: 12px; border: 1px solid #e2e8f0; border-radius: 10px; outline: none;
}

.btn {
    display: block; width: calc(100% - 50px); margin: 10px 25px;
    padding: 14px; border: none; border-radius: 10px;
    font-weight: 600; cursor: pointer; transition: 0.3s;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-success { background: var(--success); color: white; width: 80%; margin: 10px auto; }
.btn-outline { background: transparent; border: 2px solid #e2e8f0; width: 80%; margin: 10px auto; }
.btn-danger { background: var(--danger); color: white; width: 100%; margin-top: 15px; }

.quiz-status { display: flex; justify-content: space-between; padding: 0 25px; margin-bottom: 10px; font-size: 0.8rem; }
.badge { background: #eef2ff; color: var(--primary); padding: 4px 12px; border-radius: 20px; font-weight: 600; }

.progress-container { height: 8px; background: #e2e8f0; margin: 0 25px 25px 25px; border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); width: 0%; transition: 0.5s; }

.question-text { padding: 0 25px; margin-bottom: 20px; font-size: 1.2rem; }

.options-grid { display: grid; gap: 12px; padding: 0 25px; }
.option-btn {
    text-align: left; padding: 15px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
    cursor: pointer; transition: 0.2s; font-family: inherit;
}
.option-btn:hover { border-color: var(--primary); background: #f5f7ff; }

.hidden { display: none !important; }
.text-center { text-align: center; }
.victory-icon { font-size: 4rem; margin: 15px 0; }

/* Modal & Popup */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modal-content { background: white; padding: 35px; border-radius: 20px; max-width: 500px; text-align: center; position: relative; }
.close-btn { position: absolute; top: 15px; right: 20px; font-size: 1.5rem; cursor: pointer; color: #94a3b8; }
.modal-body { text-align: left; line-height: 1.6; margin-top: 15px; font-size: 0.9rem; }
.error-icon { font-size: 3rem; margin-bottom: 15px; }

.fade-in { animation: fadeIn 0.4s ease-in; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; } }

@media (max-width: 480px) { .header-img-container { height: 150px; } .main-wrapper { margin-top: 80px; } }