/* ==================== VARIABLE & COLORS ==================== */
:root {
    --primary: #FF6B6B;      /* Merah Muda Ceria */
    --secondary: #4ECDC4;    /* Tosca Spesial */
    --accent: #FFE66D;       /* Kuning Semangat */
    --dark: #2C3E50;         /* Biru Gelap Text */
    --light: #F7F9FC;
    --white: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    /* Gradient Background Ceria */
    --gradient-bg: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

/* ==================== GLOBAL ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Nunito', sans-serif;
    scroll-behavior: smooth;
}

body {
    background: var(--gradient-bg);
    background-attachment: fixed;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Poppins', sans-serif;
}

/* ==================== SIDEBAR NAVIGATION ==================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid var(--glass-border);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 4px 0 25px rgba(0,0,0,0.05);
}

.sidebar h2 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 800;
    font-size: 1.5rem;
    line-height: 1.4;
}

.nav-links {
    list-style: none;
    flex-grow: 1;
}

.nav-links li {
    margin-bottom: 0.8rem;
}

.nav-links a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--dark);
    font-weight: 700;
    padding: 14px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    background: var(--primary);
    color: var(--white);
    transform: translateX(8px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.nav-links a i {
    margin-right: 12px;
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.faz-learning-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(45deg, var(--secondary), #26a69a);
    color: var(--white);
    text-decoration: none;
    padding: 15px;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s ease;
    margin-top: auto;
    text-align: center;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

.faz-learning-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(78, 205, 196, 0.5);
    color: white;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    margin-left: 300px;
    padding: 3rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page {
    display: none;
    animation: fadeIn 0.6s ease-out forwards;
    flex-grow: 1;
    opacity: 0;
    transform: translateY(20px);
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    to { opacity: 1; transform: translateY(0); }
}

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--white);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(31, 38, 135, 0.07);
}

.page-title {
    color: var(--primary);
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    border-bottom: 3px dashed rgba(255, 107, 107, 0.3);
    padding-bottom: 1rem;
    display: inline-block;
}

.content-img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 15px;
    margin: 1.5rem 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.content-img:hover {
    transform: scale(1.02);
}

p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* ==================== BOX COMPONENT ==================== */
.interactive-box {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    border-left: 6px solid var(--accent);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.interactive-box h3 {
    margin-bottom: 1rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.interactive-box ul, .summary-box ul {
    padding-left: 1.5rem;
    margin-top: 1rem;
}

.interactive-box li, .summary-box li {
    margin-bottom: 0.8rem;
    font-size: 1.05rem;
}

.ref-materi {
    margin: 2rem 0 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    background: rgba(44, 62, 80, 0.06);
    border-left: 4px solid var(--dark);
    font-size: 0.95rem;
    line-height: 1.65;
}

.ref-materi h4 {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ref-materi ul {
    margin: 0;
    padding-left: 1.35rem;
}

.ref-materi li {
    margin-bottom: 0.5rem;
}

.materi-lead {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark);
    margin: 1.5rem 0 1rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid rgba(255, 107, 107, 0.25);
}

.img-caption {
    display: block;
    font-size: 0.88rem;
    color: #64748b;
    font-style: italic;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.summary-box {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(78, 205, 196, 0.2));
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    border: 2px dashed var(--secondary);
}

/* ==================== BUTTONS ==================== */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.btn {
    padding: 12px 28px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Nunito', sans-serif;
}

.btn-prev {
    background: #E2E8F0;
    color: var(--dark);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.btn-prev:hover {
    background: #CBD5E1;
    transform: translateX(-5px);
}

.btn-next {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-next:hover {
    background: #FF5252;
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

/* ==================== HAMBURGER MOBILE ==================== */
.hamburger {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background: var(--white);
    border: none;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    cursor: pointer;
    font-size: 1.6rem;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.hamburger:active {
    transform: scale(0.9);
}

/* ==================== SCREEN READER ONLY ==================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==================== FLOATING CHAT (FAB) ==================== */
/* Saat panel chat terbuka FAB disembunyikan agar tidak menangkap klik (ghost click membuka lagi).
   Penting: anak .fab-chat-btn punya pointer-events: auto — tanpa aturan ini anak tetap bisa menerima klik meski parent none (perilaku CSS). */
body.chat-open .fab-chat-wrap,
body.chat-open .fab-chat-wrap .fab-chat-label,
body.chat-open .fab-chat-wrap .fab-chat-btn {
    visibility: hidden;
    pointer-events: none !important;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.fab-chat-wrap {
    position: fixed;
    bottom: 100px;
    right: 24px;
    z-index: 1002;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
}

.fab-chat-wrap .fab-chat-label,
.fab-chat-wrap .fab-chat-btn {
    pointer-events: auto;
}

.fab-chat-label {
    background: var(--dark);
    color: var(--white);
    font-size: 0.82rem;
    font-weight: 800;
    padding: 10px 14px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.35);
    max-width: 220px;
    text-align: center;
    line-height: 1.35;
    animation: fabPulse 2.1s ease-in-out infinite;
}

@keyframes fabPulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.fab-chat-btn {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #6C5CE7, #a29bfe);
    color: var(--white);
    font-size: 1.55rem;
    box-shadow: 0 8px 28px rgba(108, 92, 231, 0.55);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.fab-chat-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 10px 32px rgba(108, 92, 231, 0.65);
}

.fab-chat-btn:active {
    transform: scale(0.96);
}

/* Chat panel — z-index tinggi agar selalu di atas sidebar (1000), hamburger (1001), dan FAB (1002) */
.chat-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(44, 62, 80, 0.35);
    z-index: 10050;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    cursor: pointer;
    pointer-events: auto;
}

.chat-backdrop[hidden] {
    display: none !important;
    pointer-events: none !important;
}

.chat-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(420px, 100vw);
    height: 100vh;
    max-height: 100dvh;
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-left: 2px solid var(--glass-border);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
    z-index: 10051;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1.25rem 1rem;
    animation: slideInChat 0.35s ease-out;
    pointer-events: auto;
}

.chat-panel[hidden] {
    display: none !important;
    pointer-events: none !important;
}

.chat-panel:not([hidden]) {
    display: flex !important;
}

@keyframes slideInChat {
    from { transform: translateX(100%); opacity: 0.9; }
    to { transform: translateX(0); opacity: 1; }
}

.chat-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 0.75rem;
    border-bottom: 2px dashed rgba(255, 107, 107, 0.3);
}

.chat-panel-header h3 {
    font-size: 1.15rem;
    color: var(--primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-close {
    position: relative;
    z-index: 2;
    background: #E2E8F0;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--dark);
    transition: background 0.2s;
    pointer-events: auto;
    flex-shrink: 0;
}

.chat-close:hover {
    background: #CBD5E1;
}

.chat-panel-hint {
    font-size: 0.88rem;
    color: var(--dark);
    opacity: 0.9;
    margin: 0.75rem 0 0.5rem;
    line-height: 1.45;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    padding: 0.5rem 4px 0.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 120px;
    scroll-behavior: smooth;
}

.chat-msg {
    padding: 12px 14px;
    border-radius: 14px;
    max-width: 100%;
    font-size: 0.98rem;
    line-height: 1.55;
    word-wrap: break-word;
}

.chat-msg.user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary), #FF8E8E);
    color: var(--white);
    margin-left: 2rem;
}

.chat-msg.assistant {
    align-self: flex-start;
    background: var(--white);
    border: 2px solid rgba(78, 205, 196, 0.45);
    margin-right: 0.5rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.chat-msg.assistant .ref-block {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(44, 62, 80, 0.2);
    font-size: 0.9rem;
    color: #374151;
}

.chat-processing {
    padding: 10px 12px;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(255, 230, 109, 0.35), rgba(78, 205, 196, 0.25));
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--dark);
    text-align: center;
    flex-shrink: 0;
    animation: pulseProc 1.2s ease-in-out infinite;
}

@keyframes pulseProc {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.75; }
}

.chat-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.chat-form textarea {
    flex: 1;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    padding: 12px;
    font-size: 1rem;
    font-family: inherit;
    resize: none;
    min-height: 52px;
    max-height: 140px;
    outline: none;
}

.chat-form textarea:focus {
    border-color: var(--secondary);
}

.chat-send {
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--secondary);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
}

.chat-send:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Gemini inline per materi */
.gemini-inline-input-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.gemini-inline-input-row textarea {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 2px solid #E2E8F0;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 72px;
    outline: none;
}

.gemini-inline-input-row textarea:focus {
    border-color: var(--secondary);
}

.btn-gemini-inline {
    align-self: flex-start;
    background: linear-gradient(45deg, #6C5CE7, #a29bfe);
    color: var(--white);
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(108, 92, 231, 0.4);
}

.btn-gemini-inline:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.gemini-quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.chip-gemini {
    font-size: 0.88rem;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 999px;
    border: 2px solid rgba(108, 92, 231, 0.45);
    background: rgba(108, 92, 231, 0.08);
    color: var(--dark);
    cursor: pointer;
    transition: all 0.2s;
}

.chip-gemini:hover {
    background: rgba(108, 92, 231, 0.18);
    border-color: #6C5CE7;
}

.chip-gemini:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gemini-inline-status {
    margin-top: 12px;
    padding: 12px;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(255, 230, 109, 0.35), rgba(78, 205, 196, 0.25));
    font-weight: 800;
    font-size: 0.92rem;
    text-align: center;
    animation: pulseProc 1.2s ease-in-out infinite;
}

.gemini-inline-output {
    margin-top: 14px;
    padding: 16px;
    border-radius: 14px;
    background: #F0F9FF;
    border: 2px dashed rgba(41, 128, 185, 0.35);
    font-size: 1.02rem;
    line-height: 1.6;
    min-height: 0;
}

.gemini-inline-output:empty {
    display: none;
}

/* Tantangan Pemahaman AI / Kuis */
.tantangan-pemahaman-ai {
    margin: 2rem 0;
    padding: 2rem;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(255, 230, 109, 0.35), rgba(255, 107, 107, 0.12));
    border: 3px solid rgba(255, 107, 107, 0.45);
    box-shadow: 0 10px 28px rgba(255, 107, 107, 0.12);
}

.tantangan-pemahaman-ai h3 {
    color: var(--dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tantangan-desc {
    margin-bottom: 1rem;
    font-size: 1.02rem;
}

.btn-kuis-kilat {
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    color: var(--white);
    border: none;
    padding: 14px 22px;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.45);
    transition: transform 0.2s;
}

.btn-kuis-kilat:hover {
    transform: translateY(-2px);
}

.btn-kuis-kilat:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.kuis-kilat-panel {
    margin-top: 1.25rem;
    padding: 1.25rem 1.35rem;
    border-radius: 16px;
    background: var(--white);
    border: 2px solid rgba(44, 62, 80, 0.12);
    box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.04);
}

.kuis-kilat-panel[hidden] {
    display: none !important;
}

.kuis-soal {
    font-weight: 800;
    font-size: 1.08rem;
    margin-bottom: 1rem;
    color: var(--dark);
    line-height: 1.5;
}

.kuis-opsi-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kuis-opt-btn {
    text-align: left;
    padding: 14px 16px;
    border-radius: 12px;
    border: 2px solid #E2E8F0;
    background: #F8FAFC;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.kuis-opt-btn:hover:not(:disabled) {
    border-color: var(--secondary);
    background: #E0F2F1;
}

.kuis-opt-btn:disabled {
    cursor: default;
}

.kuis-opt-btn.picked {
    border-color: #94A3B8;
}

.kuis-opt-btn.correct {
    border-color: #22c55e;
    background: #F0FDF4;
}

.kuis-opt-btn.wrong {
    border-color: #ef4444;
    background: #FEF2F2;
}

.kuis-pembahasan {
    margin-top: 1rem;
    padding: 14px;
    border-radius: 12px;
    background: #F0FDF4;
    border: 2px dashed #22c55e;
    font-size: 0.98rem;
    line-height: 1.55;
}

.kuis-pembahasan[hidden] {
    display: none !important;
}

.kuis-status-bar {
    margin-top: 10px;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--dark);
}

/* ==================== FLOATING UP BUTTON ==================== */
.btn-up {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--secondary);
    color: var(--white);
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 999;
    transform: translateY(20px);
}

@media (max-width: 900px) {
    .fab-chat-wrap {
        bottom: 88px;
        right: 16px;
    }
    .fab-chat-label {
        font-size: 0.75rem;
        max-width: 180px;
        padding: 8px 10px;
    }
    .btn-up {
        right: 16px;
        bottom: 22px;
    }
}

.btn-up.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.btn-up:hover {
    background: #3eb5ac;
    transform: translateY(-5px);
}

/* ==================== FOOTER ==================== */
footer {
    text-align: center;
    padding: 2rem;
    margin-top: auto;
    color: var(--dark);
    font-weight: 700;
}

/* ==================== INTERACTIVE GAMES / SIMULATIONS ==================== */
/* Calculator Grid */
.calc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}
.calc-grid input {
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #E2E8F0;
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.3s ease;
}
.calc-grid input:focus {
    border-color: var(--secondary);
}
.calc-grid button {
    grid-column: span 3;
    padding: 15px;
    border-radius: 10px;
    background: var(--secondary);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s;
}
.calc-grid button:hover {
    background: #3eb5ac;
    transform: translateY(-2px);
}
#calc-result {
    grid-column: span 3;
    padding: 20px;
    background: #E0F2F1;
    border-radius: 10px;
    text-align: center;
    font-weight: 800;
    font-size: 1.4rem;
    color: #00695C;
    border: 2px dashed #4DB6AC;
    margin-top: 10px;
}

/* Chart Simulation */
.chart-container {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    height: 250px;
    margin-top: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #CBD5E1;
    border-left: 3px solid #CBD5E1;
    padding-left: 20px;
}
.bar {
    flex: 1;
    border-radius: 8px 8px 0 0;
    transition: height 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    color: white;
    font-weight: 800;
    padding-top: 10px;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    position: relative;
}
.bar:hover {
    filter: brightness(1.1);
}
.bar::after {
    content: 'Data';
    position: absolute;
    bottom: -28px;
    color: var(--dark);
    font-size: 0.9rem;
    text-shadow: none;
    font-weight: 700;
}

/* ==================== KUIS INTERAKTIF (30 SOAL) ==================== */
.kuis-sticky-nav-wrap {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(180deg, rgba(247, 249, 252, 0.98) 0%, rgba(255, 255, 255, 0.96) 100%);
    padding: 12px 0 16px;
    margin: 0 -0.5rem 1.5rem;
    border-bottom: 2px dashed rgba(139, 92, 246, 0.35);
    backdrop-filter: blur(8px);
}

.kuis-nav-arrows-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.kuis-arrow-btn {
    flex: 1;
    max-width: 200px;
    padding: 10px 16px;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    color: #fff;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.kuis-arrow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.5);
}

.kuis-nav-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.kuis-num-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.9rem;
    border: 2px solid #cbd5e1;
    background: #f1f5f9;
    color: var(--dark);
    cursor: pointer;
    transition: all 0.2s;
}

.kuis-num-btn:hover:not(:disabled) {
    border-color: #8b5cf6;
    color: #7c3aed;
}

.kuis-num-btn.is-current {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: #fff;
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.45);
}

.kuis-num-btn.is-correct {
    background: linear-gradient(135deg, #22c55e, #4ade80);
    color: #fff;
    border-color: #16a34a;
}

.kuis-num-btn.is-wrong {
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: #fff;
    border-color: #dc2626;
}

.kuis-num-btn:disabled {
    cursor: default;
    opacity: 0.85;
}

.kuis-questions-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.kuis-q-block {
    scroll-margin-top: 120px;
    padding: 1.5rem;
    border-radius: 18px;
    background: var(--white);
    border: 2px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.kuis-q-block .hots-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f97316, #fb923c);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
    letter-spacing: 0.04em;
}

.kuis-q-img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 12px;
    margin: 12px 0;
}

.kuis-opt-grid-interaktif {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.kuis-opt-interaktif {
    text-align: left;
    padding: 14px 16px;
    border-radius: 14px;
    border: 2px solid transparent;
    font-weight: 700;
    font-size: 0.98rem;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 40%, #fcd34d 100%);
    color: #422006;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.25);
}

.kuis-opt-interaktif:nth-child(2) {
    background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%);
    color: #1e3a5f;
}
.kuis-opt-interaktif:nth-child(3) {
    background: linear-gradient(135deg, #d1fae5 0%, #6ee7b7 100%);
    color: #064e3b;
}
.kuis-opt-interaktif:nth-child(4) {
    background: linear-gradient(135deg, #fce7f3 0%, #f9a8d4 100%);
    color: #831843;
}
.kuis-opt-interaktif:nth-child(5) {
    background: linear-gradient(135deg, #e9d5ff 0%, #c4b5fd 100%);
    color: #3b0764;
}

.kuis-opt-interaktif:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.kuis-opt-interaktif.is-correct-answer {
    background: linear-gradient(135deg, #22c55e, #4ade80) !important;
    color: #fff !important;
    border-color: #16a34a !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.45);
}

.kuis-opt-interaktif.is-wrong-pick {
    background: linear-gradient(135deg, #f87171, #fca5a5) !important;
    color: #450a0a !important;
}

.kuis-opt-interaktif:disabled {
    cursor: default;
}

.kuis-pembahasan-box {
    margin-top: 14px;
    padding: 14px;
    border-radius: 12px;
    background: #f0fdf4;
    border: 2px dashed #86efac;
    font-size: 0.95rem;
    line-height: 1.55;
    display: none;
}

.kuis-pembahasan-box.visible {
    display: block;
}

.kuis-ai-more-wrap {
    margin-top: 10px;
}

.kuis-ai-more-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.88rem;
    cursor: pointer;
}

.kuis-ai-more-out {
    margin-top: 8px;
    padding: 10px;
    background: #eef2ff;
    border-radius: 10px;
    font-size: 0.9rem;
    display: none;
}

.kuis-ai-more-out.visible {
    display: block;
}

.kuis-btn-reset {
    background: linear-gradient(135deg, #f43f5e, #fb7185);
    color: #fff;
    border: none;
    padding: 12px 22px;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(244, 63, 94, 0.35);
}

.kuis-btn-reset:hover {
    filter: brightness(1.05);
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 1.5rem;
        padding-top: 90px;
    }
    .hamburger {
        display: block;
    }
    .nav-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .btn {
        width: 100%;
        justify-content: center;
    }
    .calc-grid {
        grid-template-columns: 1fr;
    }
    .calc-grid button, #calc-result {
        grid-column: span 1;
    }
    .card {
        padding: 2rem 1.5rem;
    }
}

/* ==================== KIRIM NILAI BUTTON ==================== */
.kirim-nilai-btn {
    border: none;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    letter-spacing: 0.02em;
}

.kirim-nilai-btn:hover:not(:disabled) {
    transform: translateY(-3px);
}

.kirim-nilai-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.97);
}

.kirim-nilai-btn:disabled {
    opacity: 0.85;
    cursor: not-allowed;
    pointer-events: none;
}

/* Animasi pengiriman aktif */
@keyframes kirimPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(139, 92, 246, 0.45); }
    50%       { box-shadow: 0 8px 32px rgba(139, 92, 246, 0.7); }
}
