
:root {
    /* Warna Utama (Biru Danone) */
    --brand-blue: #007dc5; 
    --brand-blue-dark: #005a9e;

    /* Warna Aksen */
    --healthy-green: #73c412; /* Hijau segar untuk progres/sukses */
    --accent-sky: #89cff0;   /* Biru muda untuk highlight */

    /* Warna Netral */
    --light-gray: #f8f9fa;   /* Latar belakang yang lebih bersih */
    --medium-gray: #e9ecef; /* Untuk border & garis pemisah */
    --dark-slate: #212529;   /* Teks yang lebih solid */

    /* Warna Status */
    --correct-green: #28a745;
    --incorrect-red: #dc3545;
}

        body { font-family: 'Inter', sans-serif; background-color: var(--light-gray); }
        /* FIX UNTUK MASALAH LAYER TERTUTUP (Z-INDEX) */

/* 1. Beri semua halaman utama sebuah konteks tumpukan */
.page {
    position: relative;
}

/* 2. Pastikan halaman landing & login punya prioritas tertinggi */
#landing-page, #login-page {
    z-index: 20;
}

/* 3. Pastikan aplikasi utama berada di bawahnya */
#lms-app {
    z-index: 10;
}
        .path-connector { position: absolute; top: 50%; left: 50%; width: 150%; height: 4px; background: repeating-linear-gradient(90deg, #cbd5e1, #cbd5e1 10px, transparent 10px, transparent 20px); transform: translateX(-50%); z-index: 0; }
        .module-node { transition: all 0.3s ease; z-index: 1; }
        .module-node.unlocked:hover, .module-node.completed:hover { transform: scale(1.1); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
        .module-node.completed { background-image: linear-gradient(135deg, var(--fresh-aqua), var(--brand-blue)); color: white; border-color: var(--brand-blue); cursor: pointer; }
        .module-node.unlocked { background-color: white; cursor: pointer; }
        .module-node.locked { background-color: #e2e8f0; color: #94a3b8; cursor: not-allowed; }
        .challenge-node { border-width: 4px; border-style: dashed; }
        .modal-backdrop { transition: opacity 0.3s ease; }
        .modal-content { transition: transform 0.3s ease; }
        .streak-flame { filter: drop-shadow(0 0 5px #f59e0b); }
        .case-card:hover { border-color: var(--brand-blue); }
        .chat-bubble { max-width: 75%; }
        .chat-bubble-user { background-color: var(--brand-blue); color: white; }
        .chat-bubble-ai { background-color: #e2e8f0; color: var(--dark-slate); }
        .page, .lms-view { transition: opacity 0.5s ease-in-out; }
        .sidebar-link.active { background-color: #e0f2fe; color: var(--brand-blue); font-weight: 600; }
        
        /* Duolingo-like Lesson Styles */
        .lesson-option { border-width: 2px; border-bottom-width: 4px; transition: all 0.1s ease-in-out; }
        .lesson-option:hover { background-color: #f8fafc; transform: translateY(-2px); }
        .lesson-option.selected { border-color: var(--fresh-aqua); background-color: #ecfeff; }
        .lesson-option.correct { border-color: var(--correct-green); background-color: #f0fdf4; color: var(--correct-green); }
        .lesson-option.incorrect { border-color: var(--incorrect-red); background-color: #fef2f2; color: var(--incorrect-red); }
        .lesson-footer { transition: background-color 0.3s ease; }
        .progress-bar-fill { transition: width 0.5s ease; }
        
        .heart-icon { 
            transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55), color 0.5s ease; 
            fill: currentColor;
        }
        .heart-icon.lost { 
            transform: scale(0); 
        }

        /* High-Graphic Character Animations */
        #lesson-character-container {
            margin-bottom: 1rem;
            height: 150px; /* Reserve space */
            display: flex;
            justify-content: center;
            align-items: center;
        }

        #lesson-character.idle #character-group { animation: idle-bob 2.5s ease-in-out infinite; }
        #lesson-character.idle .eye { animation: idle-blink 5s linear infinite; }
        @keyframes idle-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
        @keyframes idle-blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(0.1); } }

        #lesson-character.correct #character-group { animation: correct-jump 0.6s ease-out; }
        #lesson-character.correct #mouth { animation: correct-smile 0.5s ease-out forwards; }
        #lesson-character.correct .eye circle:first-of-type { animation: correct-squint 0.5s ease-out forwards; }
        @keyframes correct-jump { 0% { transform: translateY(0) scale(1); } 50% { transform: translateY(-25px) scale(1.05) rotate(5deg); } 100% { transform: translateY(0) scale(1) rotate(0deg); } }
        @keyframes correct-smile { to { d: path("M 60 95 C 75 120, 85 120, 100 95"); } }
        @keyframes correct-squint { to { transform: scaleY(0.4) translateY(15px); } }

        #lesson-character.incorrect #character-group { animation: incorrect-shake 0.5s ease-in-out; }
        #lesson-character.incorrect #mouth { animation: incorrect-frown 0.4s ease-out forwards; }
        #lesson-character.incorrect #left-pupil, #lesson-character.incorrect #right-pupil { animation: incorrect-look-down 0.4s ease-out forwards; }
        @keyframes incorrect-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px) rotate(-3deg); } 75% { transform: translateX(8px) rotate(3deg); } }
        @keyframes incorrect-frown { to { d: path("M 65 105 C 75 95, 85 95, 95 105"); } }
        @keyframes incorrect-look-down { to { transform: translate(-1px, 5px); } }



.module-card.unlocked:hover {
    transform: translateY(-5px);
    border-color: var(--fresh-aqua);
}

.module-card.locked {
    background-color: #334155;
    cursor: not-allowed;
    opacity: 0.6;
}

.module-card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}


.module-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    flex-grow: 1;
}

.module-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #cbd5e1;
    margin-top: 1rem;
}

.module-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.module-card-badge {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
}

.module-card-badge img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.module-card-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #334155;
}

.module-card-action {
    color: var(--fresh-aqua);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.module-card.locked .module-card-action {
    color: #94a3b8;
    cursor: not-allowed;
}

.module-card.completed::after {
    content: '✔';
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--healthy-green);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}
/* Ganti style lama dengan yang ini */
.module-card-header {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 0.5rem;
    display: flex; /* Tambahkan ini */
    justify-content: space-between; /* Tambahkan ini */
    align-items: center; /* Tambahkan ini */
}


/* --- LAKUKAN PERUBAHAN INI --- */

.module-card {
    background-color: var(--dark-slate);
    color: white;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center; /* Ubah dari 'flex-start' ke 'center' */
    position: relative;
    overflow: hidden;
}


/* --- GANTI SEMUA STYLE .module-card-badge DENGAN YANG INI --- */

.module-card-aside {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem; /* Jarak antara badge dan teks XP */
    width: 80px; /* Beri lebar tetap agar rapi */
    margin-left: 1rem;
    flex-shrink: 0;
}

.module-card-aside img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.module-card-aside span {
    font-size: 0.8rem;
    font-weight: 600;
    color: #cbd5e1;
}

/* TAMBAHKAN INI DI style.css */
.toc-item.active {
    background-color: #e0f2fe; /* sky-100 */
    color: #00539F; /* var(--brand-blue) */
    font-weight: 600;
}

.toc-item.active .feather {
    stroke: #00539F; /* var(--brand-blue) */
}

/* TAMBAHKAN INI DI style.css */

/* --- Interactive Video Placeholder --- */
.video-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #0f172a; /* slate-900 */
    border-radius: 0.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
}

.video-placeholder .play-button {
    position: absolute;
    z-index: 10;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.video-placeholder.playing .play-button {
    opacity: 0;
    pointer-events: none;
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

#video-progress-bar {
    width: 0%;
    height: 100%;
    background-color: #38bdf8; /* sky-400 */
    border-radius: 4px;
    transition: width 0.1s linear;
}

#note-markers-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.note-marker {
    position: absolute;
    top: -4px; /* Position it slightly above the bar */
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background-color: #f59e0b; /* amber-500 */
    border-radius: 50%;
    border: 2px solid white;
    cursor: pointer;
    z-index: 20;
}

.note-marker:hover::after {
    content: 'View Note';
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1e293b;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}


/* --- Modern Dashboard Redesign --- */

/* 1. Latar Belakang Utama yang Lebih Hidup */
#lms-app main {
    background-color: var(--light-gray);
    background-image: radial-gradient(circle at 1% 1%, hsla(205, 100%, 95%, 1) 0px, transparent 30%);
}

/* 2. Kartu Welcome dengan Gradient & Pola */
.dashboard-welcome-card {
    color: white;
    padding: 2.5rem; /* Padding lebih besar */
    border-radius: 1.5rem; /* Sudut lebih tumpul */
    overflow: hidden; /* Penting untuk pola */
    position: relative;
    background-color: var(--brand-blue);
    background-image: linear-gradient(135deg, var(--accent-sky) 0%, var(--brand-blue) 100%);
}

/* Pola geometris samar di latar belakang kartu welcome */
/* Cari selector ini */
.dashboard-welcome-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,...");
    opacity: 0.5;
    z-index: 0; /* <-- TAMBAHKAN BARIS INI */
}

/* 3. Kartu Statistik dengan Efek "Frosted Glass" */
.stat-card-modern {
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); /* Untuk Safari */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stat-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* CSS untuk Animasi Teks di Pairing Modal */
.fade-in-out {
    animation: fadeInOut 2.5s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; transform: translateY(10px); }
    50% { opacity: 1; transform: translateY(0); }
}


/* --- Style untuk Chat Bubble di Role Play --- */
.chat-bubble {
    max-width: 75%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    line-height: 1.5;
}

/* Bubble untuk pengguna (Anda) */
.chat-bubble-user {
    background-color: var(--brand-blue);
    color: white;
    border-bottom-right-radius: 0.25rem;
}

/* Bubble untuk rekan (Customer/AI) */
.chat-bubble-peer {
    background-color: #e2e8f0; /* slate-200 */
    color: var(--dark-slate);
    border-bottom-left-radius: 0.25rem;
}

/* --- CSS UNTUK PROGRESS BAR VIDEO KUSTOM --- */
.custom-video-progress-bar {
    width: 100%;
    height: 12px; /* Sedikit lebih tebal agar marker terlihat */
    background-color: #e2e8f0; /* slate-200 */
    border-radius: 6px;
    margin-top: 8px;
    position: relative; /* Ini adalah kunci utamanya */
    cursor: pointer;
}

#video-progress-fill {
    height: 100%;
    background-color: var(--brand-blue);
    border-radius: 6px;
    width: 0%; /* Dimulai dari 0 */
}

/* Override style marker yang lama agar lebih pas di bar baru */
.note-marker {
    position: absolute;
    top: -3px; /* Posisi di tengah vertikal bar */
    transform: translateX(-50%);
    width: 18px;
    height: 18px;
    background-color: #f59e0b; /* amber-500 */
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 10;
}


/* --- CSS BARU UNTUK CUSTOM VIDEO PLAYER --- */

/* Kontainer utama untuk kontrol, muncul saat hover */
.custom-video-controls {
    transition: opacity 0.3s ease-in-out;
}

/* Progress bar utama */
.custom-video-progress-bar {
    width: 100%;
    height: 8px; /* Sedikit lebih tebal agar mudah diklik */
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    position: relative; /* Kunci agar note marker bisa diposisikan */
}

/* Bagian progress yang terisi */
#video-progress-fill {
    height: 100%;
    background-color: var(--brand-blue);
    border-radius: 4px;
    width: 0%;
    pointer-events: none; /* Agar tidak mengganggu klik pada bar utama */
}

/* Pastikan note marker berada di lapisan paling atas */
.note-marker {
    z-index: 10;
}

/* --- CSS BARU UNTUK DAFTAR CATATAN DI BAWAH VIDEO --- */

/* Kontainer untuk setiap item catatan */
.note-item {
    /* Menggunakan flexbox untuk alignment yang rapi */
}

/* Tombol timestamp yang bisa diklik */
.timestamp-btn {
    flex-shrink: 0; /* Mencegah tombol mengecil */
    transition: background-color 0.2s ease;
}