/* ==========================================
   1. DEFINISI TEMA & RESET SISTEM
   ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

/* Mode Gelap (Midnight Cyber / Neon Vibe) */
:root,
[data-theme="dark"] {
    --bg-body: #09090b; /* Lebih pekat */
    --bg-sidebar: #18181b;
    --bg-card: #141417;
    --bg-input: #27272a;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(99, 102, 241, 0.5);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent-blue: #6366f1; /* Indigo berani */
    --accent-glow: rgba(99, 102, 241, 0.4);
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --primary-btn: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --primary-btn-hover: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    --shadow-glow: 0 8px 30px rgba(99, 102, 241, 0.2);
    --shadow-card: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
    
    --radius-card: 24px;
    --radius-btn: 99px; /* Pill shape */
    --radius-input: 16px;
}

/* Mode Terang (Clean & Playful) */
[data-theme="light"] {
    --bg-body: #f4f4f5;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #f4f4f5;
    --border-color: #e4e4e7;
    --border-hover: #a1a1aa;
    --text-primary: #09090b;
    --text-secondary: #52525b;
    --text-muted: #a1a1aa;
    --accent-blue: #4f46e5;
    --accent-glow: rgba(79, 70, 229, 0.3);
    --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #0ea5e9 100%);
    --primary-btn: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    --primary-btn-hover: linear-gradient(135deg, #1d4ed8 0%, #4338ca 100%);
    --shadow-glow: 0 8px 30px rgba(79, 70, 229, 0.15);
    --shadow-card: 0 20px 40px -15px rgba(9, 9, 11, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    display: flex;
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

/* Custom Scrollbar Minimalis */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 99px;
    border: 2px solid var(--bg-body);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ==========================================
   2. NAVIGASI SIDEBAR
   ========================================== */
#sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1001; /* Pastikan lebih tinggi dari overlay agar link dapat diklik di mobile */
}

.sidebar-header {
    padding: 32px 24px 24px;
}

.sidebar-header h3 {
    font-size: 1.5rem;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.04em;
}

.nav-list {
    list-style: none;
    padding: 0 16px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-radius: var(--radius-btn); /* Pill shape */
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid transparent;
}

.nav-link:hover {
    background: var(--bg-input);
    color: var(--text-primary);
    transform: translateX(4px);
}

.nav-link.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
    border: 2px solid var(--accent-blue);
    box-shadow: var(--shadow-glow);
}

/* ==========================================
   3. TATA LETAK UTAMA & TOPBAR
   ========================================== */
#main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Aksen glow di background (Opsional tapi keren) */
#main-area::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: var(--accent-blue);
    filter: blur(150px);
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}

.topbar {
    height: 72px;
    padding: 0 32px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(var(--bg-sidebar), 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10;
}

#content-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 48px 32px;
    scroll-behavior: smooth;
    z-index: 1;
}

/* ==========================================
   4. TOMBOL & KONTROL UMUM (SQUISHY FEEL)
   ========================================== */
.btn-primary {
    background: var(--primary-btn);
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius-btn);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 25px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
    transform: translateY(2px) scale(0.95); /* Efek membal saat diklik */
}

.btn-secondary {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    padding: 10px 24px;
    border-radius: var(--radius-btn);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: translateY(-2px);
}

/* ==========================================
   5. MODAL (GLASS & BENTO STYLE)
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

.modal-overlay.active {
    display: flex !important;
}

/* LOGIN SPLASH (global) */
#login-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(0,0,0,0.6), rgba(0,0,0,0.6));
    z-index: 2000;
}

#login-screen .login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 28px;
    width: 92%;
    max-width: 420px;
    text-align: center;
    border-radius: 14px;
    box-shadow: var(--shadow-card);
}

#login-screen h2 {
    margin-bottom: 8px;
    font-size: 1.25rem;
    font-weight: 800;
}

.content-greeting {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.18);
    color: var(--text-primary);
    padding: 18px 20px;
    border-radius: 18px;
    margin-bottom: 22px;
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.08);
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
}

.login-sub {
    color: var(--text-muted);
    margin-bottom: 18px;
}

.login-form-group {
    display: grid;
    gap: 8px;
    text-align: left;
    margin-bottom: 16px;
}

.login-form-group label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.login-form-group input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: var(--bg-input);
    color: var(--text-primary);
}

.login-form-group input::placeholder {
    color: var(--text-muted);
}

.login-error {
    color: #fca5a5;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.login-sub.large {
    font-size: 1.2rem;
    letter-spacing: 0.06em;
    font-weight: 900;
    margin-bottom: 6px;
    color: var(--accent-blue);
    background: linear-gradient(90deg, var(--accent-blue), #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-note {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

/* Animasi masuk */
@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

#login-screen .login-card {
    animation: cardFadeIn 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* Efek tombol */
#login-screen .btn-primary {
    transition: transform 160ms ease, box-shadow 160ms ease;
}
#login-screen .btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(99,102,241,0.18);
}
#login-screen .btn-primary:active {
    transform: translateY(0) scale(0.98);
}

#login-screen.hidden { display: none; }

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 40px;
    width: 90%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-card);
    animation: modalBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalBounce {
    0% { opacity: 0; transform: scale(0.8) translateY(30px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.close-btn {
    background: var(--bg-input);
    border: none;
    color: var(--text-secondary);
    width: 36px; height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg);
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-input);
    border: 2px solid transparent;
    border-radius: var(--radius-input);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.form-group input:focus, 
.form-group textarea:focus {
    border-color: var(--accent-blue);
    background: var(--bg-card);
    box-shadow: 0 0 0 6px var(--accent-glow);
    transform: translateY(-2px);
    outline: none;
}

/* ==========================================
   6. STYLING KONTEN BAB & LATIHAN
   ========================================== */
#bab-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

#bab-content h1 {
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
    letter-spacing: -0.04em;
}

#bab-content h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 3rem 0 1.2rem 0;
    display: inline-block;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-blue);
    border-radius: 12px;
}

#bab-content p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Callout bergaya widget */
.callout, .info-box {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 24px;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.callout::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 6px;
    background: var(--accent-blue);
}

.callout-warning::before { background: #f59e0b; }
.callout-success::before { background: #10b981; }

.summary-panel {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.08), rgba(79, 70, 229, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.22);
    border-radius: 28px;
    padding: 26px 28px;
    margin: 2.5rem 0;
    box-shadow: 0 18px 40px -22px rgba(99, 102, 241, 0.5);
}

.summary-panel h3 {
    margin-bottom: 16px;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent-blue);
}

.summary-panel ul {
    list-style: disc inside;
    color: var(--text-secondary);
    line-height: 1.8;
    padding-left: 16px;
}

.summary-panel ul li {
    margin-bottom: 0.9rem;
}

/* Area Latihan (Gamified Look) */
.latihan-card {
    background: var(--bg-input);
    border-radius: var(--radius-card);
    padding: 32px;
    margin: 3rem 0;
    border: 2px dashed var(--border-color);
}

.latihan-skenario {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 16px;
    font-size: 1rem;
    border-left: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.latihan-input {
    margin-top: 20px;
    display: grid;
    gap: 14px;
}

.latihan-input label {
    font-weight: 700;
    color: var(--text-primary);
}

.latihan-input .exercise-textarea {
    width: 100%;
    min-height: 140px;
    padding: 16px;
    border-radius: var(--radius-input);
    background: var(--bg-card);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: var(--text-primary);
    resize: vertical;
}

.latihan-input .exercise-textarea:focus {
    outline: none;
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.15);
    border-color: var(--accent-blue);
}

.latihan-input .btn-secondary {
    width: max-content;
    padding: 12px 18px;
}

.latihan-note {
    font-size: 0.88rem;
    color: var(--text-muted);
}

details.kunci-jawaban summary {
    background: var(--bg-card);
    padding: 16px 24px;
    border-radius: var(--radius-input);
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* ==========================================
   7. GRADUATION & ALBUM ALUMNI (SOCIAL VIBE)
   ========================================== */
.glossary-section {
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.08), rgba(59, 130, 246, 0.06));
    border: 1px solid rgba(59, 130, 246, 0.18);
    border-radius: var(--radius-card);
    padding: 32px;
    margin: 2.5rem 0;
    box-shadow: 0 24px 50px -26px rgba(59, 130, 246, 0.45);
}

.glossary-section h2 {
    margin-bottom: 0.75rem;
    font-size: 1.8rem;
    color: var(--accent-blue);
}

.glossary-section p {
    margin-bottom: 24px;
    color: var(--text-secondary);
}

.glossary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.glossary-card {
    background: var(--bg-card);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    padding: 20px;
    box-shadow: var(--shadow-card);
}

.glossary-card h3 {
    margin-bottom: 10px;
    font-size: 1.05rem;
    color: var(--accent-blue);
}

.glossary-card p {
    font-size: 0.96rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.bab-hero {
    position: relative;
    padding: 32px 28px;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(79, 70, 229, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.16);
    box-shadow: var(--shadow-card);
    margin-bottom: 32px;
    overflow: hidden;
}

.bab-hero .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.16);
    color: var(--accent-blue);
    font-weight: 800;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.bab-hero h1 {
    margin: 0;
    font-size: 2.6rem;
    line-height: 1.05;
    color: var(--accent-blue);
    max-width: 760px;
}

.bab-hero p {
    margin-top: 18px;
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 760px;
    line-height: 1.8;
}

.glow-bg {
    position: absolute;
    border-radius: 999px;
    filter: blur(80px);
    opacity: 0.16;
    pointer-events: none;
    z-index: 0;
}

.glow-1 {
    width: 260px;
    height: 260px;
    background: rgba(79, 70, 229, 0.35);
    top: -40px;
    right: -40px;
}

.glow-2 {
    width: 220px;
    height: 220px;
    background: rgba(236, 72, 153, 0.28);
    top: 100px;
    left: -60px;
}

.glow-3 {
    width: 180px;
    height: 180px;
    background: rgba(37, 99, 235, 0.28);
    bottom: -40px;
    right: 80px;
}

.bab-page {
    position: relative;
    padding: 40px 28px 32px;
    overflow: hidden;
    min-height: 100vh;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.08), transparent 40%),
                radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.06), transparent 28%);
}

.bab-page main {
    position: relative;
    z-index: 1;
}

.category-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
    position: relative;
    z-index: 1;
}

.category-filter-btn {
    border: 1px solid rgba(99, 102, 241, 0.16);
    background: rgba(15, 23, 42, 0.72);
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.category-filter-btn:hover,
.category-filter-btn.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(56, 189, 248, 0.18));
    color: white;
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

.category-section {
    margin-bottom: 42px;
    position: relative;
    z-index: 1;
    padding: 22px 24px 24px;
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.08);
}

.category-section.is-hidden {
    display: none;
}

.section-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-blue);
    font-weight: 800;
    border: 1px solid rgba(99, 102, 241, 0.14);
    margin-bottom: 14px;
    font-size: 0.95rem;
}

.category-summary {
    margin: 0 0 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 760px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.card {
    background: var(--bg-card);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 18px 35px -24px rgba(15, 23, 42, 0.4);
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 260px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 26px 40px -14px rgba(15, 23, 42, 0.32);
    border-color: rgba(99, 102, 241, 0.2);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 18px;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0;
    color: #fff;
    box-shadow: 0 15px 25px -18px rgba(99, 102, 241, 0.7);
}

.card-icon::before {
    content: "";
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 55%;
}

.icon-chatgpt { background: linear-gradient(135deg, #10a37f, #4dd0b6); }
.icon-chatgpt::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpolygon points='32,10 52,22 52,42 32,54 12,42 12,22' fill='%23fff'/%3E%3C/svg%3E"); }
.icon-grok { background: linear-gradient(135deg, #1f2937, #4b5563); }
.icon-grok::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='18' fill='%23fff'/%3E%3Ccircle cx='32' cy='32' r='10' fill='none' stroke='%231f2937' stroke-width='8'/%3E%3C/svg%3E"); }
.icon-meta { background: linear-gradient(135deg, #4267B2, #6A8EDB); }
.icon-meta::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M16 44L24 20L32 30L40 20L48 44' fill='none' stroke='%23fff' stroke-width='8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.icon-perplexity { background: linear-gradient(135deg, #0f172a, #1e293b); }
.icon-perplexity::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='16' fill='none' stroke='%23fff' stroke-width='8'/%3E%3Ccircle cx='32' cy='32' r='4' fill='%23fff'/%3E%3C/svg%3E"); }
.icon-claude { background: linear-gradient(135deg, #1e293b, #3b82f6); }
.icon-claude::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M20 18h24l4 16c0 12-10 18-14 18s-14-6-14-18z' fill='%23fff'/%3E%3C/svg%3E"); }
.icon-midjourney { background: linear-gradient(135deg, #4f46e5, #a855f7); }
.icon-midjourney::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M25 18l14 28 14-28' fill='none' stroke='%23fff' stroke-width='8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.icon-ideogram { background: linear-gradient(135deg, #ec4899, #fb7185); }
.icon-ideogram::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M20 16h24v32H20z' fill='%23fff'/%3E%3C/svg%3E"); }
.icon-canva { background: linear-gradient(135deg, #00c4cc, #22d3ee); }
.icon-canva::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M22 18c8-8 20-8 24 0s-8 24-24 24' fill='none' stroke='%23fff' stroke-width='8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.icon-sora { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.icon-sora::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M18 34c8-12 18-14 28-10' fill='none' stroke='%23fff' stroke-width='8' stroke-linecap='round'/%3E%3Cpath d='M18 42c10-10 20-10 28-6' fill='none' stroke='%23fff' stroke-width='8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.icon-runway { background: linear-gradient(135deg, #f97316, #fb923c); }
.icon-runway::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M22 42l20-10-20-10' fill='none' stroke='%23fff' stroke-width='8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.icon-luma { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.icon-luma::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpolygon points='32,14 50,32 32,50 14,32' fill='%23fff'/%3E%3C/svg%3E"); }
.icon-kling { background: linear-gradient(135deg, #e11d48, #fb7185); }
.icon-kling::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M22 18v28l14-12-14-16zM36 18l12 16-12 12' fill='none' stroke='%23fff' stroke-width='8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.icon-suno { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.icon-suno::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M24 20v24l16-12-16-12z' fill='%23fff'/%3E%3Cpath d='M42 22v20' stroke='%23fff' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E"); }
.icon-udio { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.icon-udio::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M22 24h8l8-8v32l-8-8h-8z' fill='%23fff'/%3E%3Cpath d='M42 24c4 4 4 12 0 16' fill='none' stroke='%23fff' stroke-width='6' stroke-linecap='round'/%3E%3Cpath d='M48 18c8 8 8 20 0 28' fill='none' stroke='%23fff' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E"); }
.icon-elevenlabs { background: linear-gradient(135deg, #18181b, #52525b); }
.icon-elevenlabs::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M16 32c0-8 6-14 14-14s14 6 14 14-6 14-14 14-14-6-14-14z' fill='none' stroke='%23fff' stroke-width='8'/%3E%3Cpath d='M22 32h20' stroke='%23fff' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E"); }
.icon-gamma { background: linear-gradient(135deg, #22c55e, #4ade80); }
.icon-gamma::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M20 40c8 8 20 8 28 0 8-8 8-20 0-28' fill='none' stroke='%23fff' stroke-width='8' stroke-linecap='round'/%3E%3Ccircle cx='20' cy='44' r='4' fill='%23fff'/%3E%3C/svg%3E"); }
.icon-tome { background: linear-gradient(135deg, #8b5cf6, #a855f7); }
.icon-tome::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M18 16h28v32H18z' fill='none' stroke='%23fff' stroke-width='8'/%3E%3Cpath d='M18 20h28M18 28h28M18 36h16' stroke='%23fff' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E"); }
.icon-cursor { background: linear-gradient(135deg, #1d4ed8, #2563eb); }
.icon-cursor::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M24 16l24 16-24 16v-10l12-6-12-6z' fill='%23fff'/%3E%3C/svg%3E"); }
.icon-copilot { background: linear-gradient(135deg, #0f172a, #334155); }
.icon-copilot::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M32 12l18 8v14c0 14-9 20-18 20S14 48 14 34V20z' fill='none' stroke='%23fff' stroke-width='8'/%3E%3Cpath d='M24 28h16M24 36h10' stroke='%23fff' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E"); }
.icon-replit { background: linear-gradient(135deg, #f97316, #fb923c); }
.icon-replit::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect x='16' y='16' width='32' height='32' rx='8' fill='%23fff'/%3E%3Cpath d='M24 24h16v16' fill='none' stroke='%23f97316' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E"); }

.tag {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-blue);
    background: rgba(99, 102, 241, 0.12);
    border-radius: 999px;
    padding: 6px 12px;
}

.card-title {
    font-size: 1.15rem;
    margin: 0;
    color: var(--text-primary);
}

.card-desc {
    margin: 0;
    font-size: 0.96rem;
    color: var(--text-secondary);
    line-height: 1.7;
    flex-grow: 1;
}

.card-link {
    margin-top: auto;
    color: var(--accent-blue);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.card-link:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .bab-hero {
        padding: 24px 20px;
    }

    .bab-hero h1 {
        font-size: 2.1rem;
    }

    .grid {
        gap: 16px;
    }

    .card {
        padding: 20px;
    }

    .glow-1 {
        top: -20px;
        right: -20px;
    }

    .glow-2 {
        left: -40px;
        top: 80px;
    }

    .glow-3 {
        width: 140px;
        height: 140px;
        bottom: -20px;
        right: 40px;
    }

    .bab-page {
        padding: 28px 18px 24px;
    }

    .category-section {
        padding: 18px 18px 20px;
    }

    .category-filter-bar {
        gap: 8px;
    }

    .category-filter-btn {
        padding: 9px 13px;
        font-size: 0.86rem;
    }
}


@media (max-width: 640px) {
    .section-title {
        width: fit-content;
    }
}

@media (max-width: 520px) {
    .card {
        min-height: auto;
    }
}

@media (max-width: 440px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .glossary-grid {
        grid-template-columns: 1fr;
    }
}

.hero-graduation, .alumni-header {
    background: var(--accent-gradient);
    border-radius: var(--radius-card);
    padding: 48px 32px;
    text-align: center;
    color: white;
    box-shadow: var(--shadow-glow);
    border: none;
}

.hero-graduation h2, .alumni-header h2 {
    color: white;
    font-size: 2rem;
}

.hero-graduation p, .alumni-header p {
    color: rgba(255,255,255,0.9);
}

.alumni-grid {
    gap: 24px;
}

.alumni-card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 32px 24px;
    position: relative;
    border: 1px solid var(--border-color);
}

/* Avatar gaya story Instagram/Tiktok */
.alumni-card img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    padding: 4px;
    background: var(--accent-gradient);
    object-fit: cover;
    margin-bottom: 16px;
}

.alumni-card .alumni-meta {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-blue);
    border-radius: 99px;
    font-size: 0.8rem;
    margin-bottom: 16px;
}

.alumni-card blockquote {
    background: transparent;
    border: none;
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Badge sosial media */
.alumni-card .alumni-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 16px;
}
.alumni-card .alumni-contact p {
    background: var(--bg-input);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 0;
}

/* ==========================================
   8. RESPONSIVE MOBILE
   ========================================== */
@media (max-width: 768px) {
    #sidebar {
        position: fixed;
        height: 100%;
        transform: translateX(-100%);
    }
    #sidebar.show-mobile {
        transform: translateX(0);
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.8);
    }
    /* Overlay backdrop saat sidebar mobile terbuka */
    #sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        display: none;
        z-index: 900;
        transition: opacity 0.2s ease;
        opacity: 0;
    }
    #sidebar-overlay.active {
        display: block;
        opacity: 1;
    }
    
    
    #bab-content h1 { font-size: 2rem; }
    #content-scroll { padding: 32px 20px; }
    .hero-graduation { padding: 32px 20px; }
}
/* Styling Hero Graduation Banner */
.hero-graduation {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(147, 51, 234, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    margin-bottom: 32px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

.hero-graduation p {
    font-size: 1.05rem;
    color: var(--text-secondary, #cbd5e1);
    max-width: 600px;
    margin: 12px auto 20px;
    line-height: 1.6;
}

/* Grid Layout untuk Kartu Alumni */
.alumni-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
    padding: 10px 0;
}

/* Kartu Alumni Modern (Glassmorphism & Micro-interaction) */
.alumni-card {
    background: linear-gradient(180deg, rgba(20, 25, 40, 0.92), rgba(24, 30, 55, 0.95));
    border: 1px solid rgba(96, 165, 250, 0.18);
    border-radius: 24px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    overflow: hidden;
    min-height: 420px;
}

.alumni-card::before,
.alumni-card::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.alumni-card::before {
    width: 150px;
    height: 150px;
    background: rgba(59, 130, 246, 0.16);
    top: -40px;
    right: -40px;
}

.alumni-card::after {
    width: 120px;
    height: 120px;
    background: rgba(236, 72, 153, 0.12);
    bottom: -40px;
    left: -35px;
}

/* Effect Hover pada Kartu */
.alumni-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}

/* Wrapper Foto Avatar */
.alumni-avatar-wrapper {
    position: relative;
    margin-bottom: 18px;
    width: 132px;
    height: 132px;
}

.alumni-avatar-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    padding: 6px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(236, 72, 153, 0.25));
    -webkit-mask: radial-gradient(circle, transparent 60%, black 62%);
    mask: radial-gradient(circle, transparent 60%, black 62%);
}

.alumni-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(15, 23, 42, 0.9);
    box-shadow: 0 12px 26px rgba(59, 130, 246, 0.24);
    transition: transform 0.3s ease, filter 0.3s ease;
    position: relative;
    z-index: 1;
}

.alumni-card:hover img {
    transform: scale(1.05) rotate(-1deg);
    filter: saturate(1.05);
}

.alumni-nama {
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
    margin: 10px 0 6px;
}

.batch-info {
    font-size: 0.84rem;
    font-weight: 700;
    color: #eef2ff;
    background: rgba(99, 102, 241, 0.18);
    padding: 6px 16px;
    border-radius: 999px;
    margin-bottom: 14px;
    letter-spacing: 0.02em;
}

.alumni-kesan {
    font-size: 0.96rem;
    font-style: italic;
    color: #cbd5e1;
    line-height: 1.7;
    margin-bottom: 18px;
    padding: 0 4px;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Detail Kontak & Sosial Media */
.alumni-contacts {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-muted, #94a3b8);
    text-align: left;
}

.alumni-contacts p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.alumni-contacts p span {
    min-width: 22px;
    display: inline-flex;
    justify-content: center;
}

@media (max-width: 720px) {
    .alumni-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .alumni-card {
        min-height: auto;
    }

    .alumni-contacts {
        grid-template-columns: 1fr;
    }
}

/* Styling Container Video Responsif */
.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    margin: 20px 0 28px 0;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Judul Kecil Pembuka Video */
.video-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary, #f8fafc);
    margin-bottom: -10px;
}
/* Container Navigasi Bab Bawah */
.next-bab-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Tombol Next Bab */
.btn-next-bab {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 14px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

/* Efek Hover & Active */
.btn-next-bab:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

.btn-next-bab:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

/* Responsif untuk Layar HP */
@media (max-width: 640px) {
    .next-bab-container {
        justify-content: center;
    }
    
    .btn-next-bab {
        width: 100%;
        justify-content: center;
        text-align: center;
        font-size: 0.88rem;
        padding: 12px 16px;
    }
}.komponen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 24px 0;
}
/* Styling untuk kotak latihan (exercise) agar konsisten dengan Bab 1 */
.exercise-card {
    background: var(--bg-input);
    border-radius: var(--radius-card);
    padding: 32px;
    margin: 3rem 0;
    border: 2px dashed var(--border-color);
}

.exercise-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.exercise-textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px 16px;
    border-radius: var(--radius-input);
    background: var(--bg-card);
    border: 2px solid transparent;
    color: var(--text-primary);
    resize: vertical;
    font-size: 1rem;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.exercise-textarea:focus {
    outline: none;
    box-shadow: 0 0 0 6px var(--accent-glow);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: var(--primary-btn);
    color: #fff;
}

.feedback-box {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 14px 16px;
    border-radius: 12px;
    margin-top: 12px;
    color: var(--text-secondary);
}
.feedback-box.active {
    display: block;
}

/* Small adjustments for feedback visibility on mobile */
@media (max-width: 640px) {
    .exercise-card { padding: 20px; }
    .exercise-textarea { min-height: 100px; }
}

.crtc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 24px 0 28px;
}

.crtc-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 22px;
    min-height: 170px;
    box-shadow: 0 24px 40px -22px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.crtc-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 28px 42px -18px rgba(0, 0, 0, 0.35);
}

.crtc-card::after {
    content: '';
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--accent-glow);
    filter: blur(28px);
    top: -40px;
    right: -40px;
    opacity: 0.55;
    pointer-events: none;
}

.crtc-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.crtc-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--accent-blue);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
}

.crtc-card h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.crtc-card-text {
    margin: 0 0 10px;
    color: var(--text-secondary);
    font-size: 0.96rem;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.crtc-card-example {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.86rem;
    line-height: 1.55;
    font-style: italic;
    position: relative;
    z-index: 1;
}

.komponen-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.komponen-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(30, 41, 59, 0.8);
    transform: translateY(-3px);
}

.komponen-icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.komponen-card h4 {
    margin: 0 0 8px 0;
    font-size: 0.98rem;
    color: #60a5fa;
}

.komponen-card p {
    margin: 0;
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.5;
}
/* Container pembungkus gambar (opsional tapi sangat disarankan) */
.image-container {
    width: 100%;
    display: flex;
    justify-content: center; /* Memastikan gambar berada di tengah secara horizontal */
    align-items: center;
    margin: 24px 0; /* Jarak atas & bawah agar rapi */
}

/* Class utama untuk elemen <img> */
.img-responsive {
    display: block;
    margin-left: auto;
    margin-right: auto; /* Fallback centering */
    
    /* Batas lebar di layar monitor (sesuai kebutuhan: 80% - 90% atau max-width tertentu) */
    width: 85%;
    max-width: 850px; /* Batas maksimal di desktop agar gambar tampil besar tapi tidak meluap */
    height: auto; /* Menjaga rasio asli gambar agar tidak gepeng */
    
    border-radius: 12px; /* Sudut membulat modern */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); /* Bayangan lembut agar terkesan premium */
    object-fit: cover;
}

/* Penyesuaian khusus untuk layar HP / Mobile (Lebar layar <= 768px) */
@media (max-width: 768px) {
    .img-responsive {
        width: 100%; /* Pas memenuhi lebar kontainer HP */
        max-width: 100%;
        border-radius: 8px; /* Radius sedikit lebih kecil di HP */
    }
}
/* Styling Tombol Hamburger di HP */
.menu-toggle {
    display: none; /* Sembunyikan di desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001; /* Harus lebih tinggi dari elemen lain */
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--text-primary, #f8fafc);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* CSS Khusus Layar HP (Mobile) */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex; /* Munculkan hamburger di HP */
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%; /* Sembunyikan menu di luar layar kanan */
        width: 70%; /* Lebar menu overlay */
        max-width: 300px;
        height: 100vh;
        background: #0f172a; /* Warna background menu */
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        padding: 80px 24px 24px;
        display: flex;
        flex-direction: column;
        gap: 16px;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 25px rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }

    /* Class yang ditambahkan via JS saat tombol diklik */
    .nav-menu.active {
        right: 0; /* Geser menu masuk ke layar */
    }

    /* Efek Animasi Tombol Hamburger jadi Silang (X) saat aktif */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}
/* ==========================================
   TOPBAR & TOMBOL TOGGLE MENU MODERN
   ========================================== */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: transparent;
    margin-bottom: 20px;
}

/* Styling Tombol Menu Toggle Modern */
.btn-menu-toggle {
    display: none; /* Sembunyikan default di layar besar/desktop */
    align-items: center;
    gap: 8px;
    background: rgba(30, 41, 59, 0.7);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.btn-menu-toggle:hover {
    background: rgba(51, 65, 85, 0.9);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.btn-menu-toggle:active {
    transform: translateY(0);
}

/* RAG Chat AI */
#rag-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

#rag-chat-panel {
    display: none;
    position: absolute;
    bottom: 60px;
    right: 0;
    width: 340px;
    max-height: 460px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
    flex-direction: column;
    overflow: hidden;
}

#rag-chat-panel.active {
    display: flex;
}

#rag-chat-panel .rag-header {
    background: var(--accent-blue);
    color: #ffffff;
    padding: 14px 16px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#rag-chat-panel .rag-header button {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
}

#rag-messages {
    flex: 1;
    padding: 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: var(--text-primary);
    background: var(--bg-card);
}

.rag-message {
    padding: 13px 14px;
    border-radius: 16px;
    line-height: 1.65;
    letter-spacing: -0.01em;
    word-break: break-word;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
    max-width: 100%;
}

.rag-message.user {
    background: #2563eb;
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 6px;
    border-bottom-left-radius: 16px;
}

.rag-message.ai {
    background: var(--bg-input);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 16px;
}

#rag-chat-panel form {
    display: flex;
    gap: 10px;
    border-top: 1px solid var(--border-color);
    padding: 12px;
    background: var(--bg-body);
}

#rag-input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    outline: none;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--bg-card);
}

#rag-send-btn {
    background: var(--accent-blue);
    color: #ffffff;
    border: none;
    padding: 10px 16px;
    border-radius: 14px;
    font-size: 0.95rem;
    cursor: pointer;
}

/* Penyesuaian Tombol Mode Gelap/Terang */
.topbar .btn-secondary {
    background: rgba(30, 41, 59, 0.7);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
    margin-left: auto; /* Dorong tombol Mode Gelap selalu di paling kanan */
}

.topbar .btn-secondary:hover {
    background: rgba(51, 65, 85, 0.9);
    border-color: rgba(255, 255, 255, 0.25);
}

/* ==========================================
   RESPONSIF LAYAR HP/TABLET (<= 768px)
   ========================================== */
@media (max-width: 768px) {
    /* Munculkan tombol menu HANYA di layar HP/Tablet */
    .btn-menu-toggle {
        display: inline-flex;
    }
}