/* --- NECTAR VOCAB BANK STYLE --- */
:root { 
            --primary: #284469;
            --primary-hover: #1e3554;
            --accent: #FEC763; 
            --bg: #f4f7f6; 
            --success: #27ae60; 
            --danger: #e74c3c; 
            --surface: #ffffff;
            --text-main: #2c3e50;
            --text-muted: #7f8c8d;
        }

        * { margin:0; padding:0; box-sizing:border-box; font-family:'Segoe UI', sans-serif; }
        body { background: var(--bg); color: var(--text-main); }
        
        /* --- NAVBAR --- */
        nav { background: var(--primary); color: white; padding: 15px 5%; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 1000; box-shadow: 0 4px 15px #284469; }
        .nav-brand { font-size: 1.5rem; font-weight: bold; letter-spacing: 1px; }
        .nav-links a { color: white; text-decoration: none; margin-left: 20px; font-weight: 500; transition: 0.3s; }
        .nav-links a:hover { color: var(--accent); }

        /* --- HEADER & SEARCH --- */
        .header-section { background: var(--primary); color: white; padding: 40px 20px; text-align: center; border-bottom-left-radius: 30px; border-bottom-right-radius: 30px; margin-bottom: 30px; }
        .header-section h1 { font-size: 2rem; margin-bottom: 10px; }
        .header-section p { font-size: 1rem; opacity: 0.9; margin-bottom: 25px; }
        
        .search-container { max-width: 600px; margin: 0 auto; position: relative; }
        .search-container input { width: 100%; padding: 15px 20px 15px 50px; font-size: 1.1rem; border: none; border-radius: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); outline: none; }
        .search-container i { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 1.2rem; }

        /* --- FILTER CHIPS --- */
        .filter-container { max-width: 1200px; margin: 0 auto 20px; padding: 0 20px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
        .chip { background: var(--surface); border: 1px solid #ddd; padding: 8px 16px; border-radius: 20px; cursor: pointer; font-size: 0.9rem; font-weight: 500; color: var(--text-main); transition: 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
        .chip:hover { border-color: var(--primary); color: var(--primary); }
        .chip.active { background: var(--primary); color: white; border-color: var(--primary); }

        /* --- GRID & CARDS --- */
        .vocab-grid { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; padding-bottom: 50px; }
        .vocab-card { background: var(--surface); border-radius: 15px; padding: 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: transform 0.3s; position: relative; overflow: hidden; border-top: 4px solid var(--primary); }
        .vocab-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
        
        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start; /* Supaya judul panjang tidak mendorong badge ke tengah */
            gap: 10px; /* Jarak antara Judul dan Grup Badge */
            margin-bottom: 10px;
        }

        .badge-group {
            display: flex;
            gap: 6px; /* Jarak antara badge Type dan badge Level */
            flex-wrap: wrap; /* Jika layar sangat sempit, badge akan turun ke bawah secara rapi */
            justify-content: flex-end; /* Menjaga badge tetap di sisi kanan */
            min-width: fit-content; /* Mencegah badge terpotong */
        }
        
        .word-title {
            margin: 0;
            font-size: 1.25rem;
            line-height: 1.2;
            word-break: break-word; /* Memotong kata jika terlalu panjang di mobile */
        }
        .word-title { font-size: 1.5rem; color: var(--primary); margin: 0; }
        .phonetic { color: var(--primary-hover); font-family: monospace; font-size: 1rem; margin-bottom: 15px; display: block; }
 
        /* --- SEMANTIC VOCABULARY BADGES --- */
                .badge { 
                    padding: 4px 10px; 
                    border-radius: 6px; 
                    font-size: 0.75rem; 
                    font-weight: bold; 
                    color: #ffffff; 
                    text-transform: uppercase; 
                    letter-spacing: 0.5px;
                    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
                }
        
                /* 1. Naming Words (Biru: Fondasi & Ketenangan) */
                .bg-noun { background: #3498db; }         /* Bright Blue */
                .bg-pronoun { background: #2980b9; }      /* Dark Blue */
        
                /* 2. Action Words (Ungu: Aksi & Dinamika) */
                .bg-verb { background: #9b59b6; }         /* Amethyst */
                .bg-phrasal-verb { background: #8e44ad; } /* Dark Purple */
        
                /* 3. Describing Words (Jingga & Hijau: Visualisasi & Modifikasi) */
                .bg-adjective { background: #e67e22; }    /* Carrot Orange */
                .bg-adverb { background: #2ecc71; }       /* Emerald Green */
        
                /* 4. Sentence Glue (Turquoise & Hijau Laut: Lem & Struktur) */
                .bg-preposition { background: #1abc9c; }  /* Turquoise */
                .bg-conjunction { background: #16a085; }  /* Green Sea */
        
                /* 5. Helper & Expressions (Merah, Pink, Abu: Ekspresi & Penunjuk) */
                .bg-modal { background: #e84393; }        /* Vibrant Pink */
                .bg-interjection { background: #e74c3c; } /* Alizarin Red (Emosi) */
                .bg-determiner { background: #7f8c8d; }   /* Professional Grey */
                .bg-idiom { background: #c0392b; }        /* Deep Red */
                /* Badge Khusus untuk Kelompok Angka */
                .bg-number { background-color: #475569; color: #ffffff; } /* Warna Slate/Abu-abu gelap yang elegan */
        
                /* 6. System Badges */
                .bg-level { 
                    background: #2c3e50; /* Midnight Blue */
                    margin-left: 5px; 
                    border: 1px solid #1a252f;
                }       

        .meaning { font-size: 1.05rem; font-weight: 600; margin-bottom: 10px; color: var(--text-main); }
        .example-box { background: #f8f9fa; padding: 12px; border-radius: 8px; border-left: 3px solid var(--accent); margin-top: 10px; }
        .example-text { font-style: italic; font-size: 0.95rem; color: #555; margin-bottom: 8px; }
        /* --- USAGE NOTES BOX --- */
                .usage-note-box {
                    background: #f0f7ff;
                    border-left: 3px solid #3498db;
                    padding: 12px 15px;
                    border-radius: 8px;
                    margin-top: 15px;
                    font-size: 0.95rem;
                    color: var(--text-main);
                    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.05);
                }
                .usage-note-title {
                    font-weight: 700;
                    color: #2980b9;
                    margin-bottom: 6px;
                    display: flex;
                    align-items: center;
                    gap: 8px;
                    font-size: 0.8rem;
                    text-transform: uppercase;
                    letter-spacing: 0.5px;
                }
                
        /* --- AUDIO BUTTONS --- */
        .audio-controls { display: flex; gap: 8px; margin-top: 5px; }
        .btn-audio { background: transparent; border: 1px solid var(--primary); color: var(--primary); padding: 4px 10px; border-radius: 6px; font-size: 0.8rem; cursor: pointer; transition: 0.2s; display: flex; align-items: center; gap: 5px; }
        .btn-audio:hover { background: var(--primary); color: white; }
        .btn-audio-sm { font-size: 0.75rem; padding: 3px 8px; border-color: #aaa; color: #555; }
        .btn-audio-sm:hover { background: var(--accent); border-color: var(--accent); color: white; }

        #noResult { text-align: center; grid-column: 1 / -1; padding: 40px; color: var(--text-muted); display: none; }
                /* --- FOOTER STYLE --- */
        footer {
            background: var(--primary);
            color: white;
            padding: 40px 5% 20px;
            text-align: center;
            margin-top: 50px;
            border-top: 4px solid var(--accent);
        }
        
        .footer-content {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 15px;
        }
        
        .footer-logo {
            width: 80px;
            height: auto;
            margin-bottom: 10px;
        }
        
        .footer-links {
            margin: 10px 0;
        }
        
        .footer-links a {
            color: rgba(255, 255, 255, 0.7);
            text-decoration: none;
            margin: 0 10px;
            font-size: 0.85rem;
            transition: 0.3s;
        }
        
        .footer-links a:hover {
            color: var(--accent);
        }
        
        .copyright {
            font-size: 0.8rem;
            color: rgba(255, 255, 255, 0.5);
            margin-top: 20px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            padding-top: 20px;
            width: 100%;
        }
        /* =====================================================================
           🌟 REVISI: MINIMALIST & SLEEK WORD OF THE DAY CARD (KALEM)
           ===================================================================== */
        .wotd-container {
            max-width: 1200px; /* Melebar harmonis mengikuti grid bawah */
            margin: 0 auto 20px;
            padding: 12px 20px;
            background: var(--surface); /* Menggunakan putih bersih bawaan */
            border: 1px solid #eef2f5;
            border-left: 4px solid var(--accent); /* Garis aksen vertikal Emas Nectar */
            border-radius: 12px;
            color: var(--text-main);
            box-shadow: 0 4px 12px rgba(0, 33, 71, 0.02); /* Shadow sangat tipis */
            position: relative;
        }
        .wotd-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
            border-bottom: 1px dashed #eef2f5;
            padding-bottom: 6px;
        }
        .wotd-badge {
            background: rgba(243, 156, 18, 0.1); /* Amber translucent soft tint */
            color: #d35400;
            font-size: 0.7rem;
            font-weight: 700;
            padding: 3px 8px;
            border-radius: 4px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }
        /* Tombol Favorit di Dalam Kartu Kata */
        .btn-fav {
            background: transparent;
            border: none;
            color: #bdc3c7;
            font-size: 1.25rem;
            cursor: pointer;
            transition: all 0.2s ease;
            padding: 4px;
            margin-left: 8px;
        }
        .btn-fav:hover {
            transform: scale(1.2);
        }
        .btn-fav.active {
            color: #f1c40f; /* Bintang Emas Menyala */
            text-shadow: 0 0 8px rgba(241, 196, 15, 0.5);
        }
        
        /* =====================================================================
           👑 NECTAR FAVORITES LEDGER PANEL STYLE
           ===================================================================== */
        .fav-ledger-panel {
            max-width: 1200px;
            margin: 0 auto 25px;
            padding: 18px 22px;
            background: #ffffff;
            border: 1px solid #eef2f5;
            border-radius: 14px;
            box-shadow: 0 4px 12px rgba(0, 33, 71, 0.03);
            text-align: left;
            transition: all 0.3s ease;
        }
        .fav-ledger-title {
            font-family: 'Montserrat', sans-serif;
            font-size: 0.85rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            color: var(--primary);
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .fav-chips-container {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }
        /* Style Kepingan Kata Favorit (Interactive Chips) */
        .fav-word-chip {
            background: rgba(0, 33, 71, 0.03);
            color: var(--primary);
            border: 1px solid rgba(0, 33, 71, 0.06);
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
        }
        .fav-word-chip:hover {
            background: var(--primary);
            color: #ffffff;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 33, 71, 0.15);
        }
        /* Tombol silang kecil untuk menghapus langsung dari laci */
        .fav-word-chip .close-icon {
            color: #95a5a6;
            font-size: 0.75rem;
            transition: color 0.2s ease;
        }
        .fav-word-chip:hover .close-icon {
            color: var(--accent);
        }
        .fav-empty-text {
            font-size: 0.85rem;
            color: var(--text-muted);
            font-style: italic;
        }
/*Student's Exercise Book*/
/* Container Utama Notebook */
.notebook-container {
    position: relative;
    max-width: 900px;
    margin: 50px auto;
    background: var(--notebook-paper);
    border-radius: 4px 16px 16px 4px;
    box-shadow: 
        -5px 5px 0px #d1d5db,
        -10px 10px 0px #e5e7eb,
        0 20px 25px -5px rgba(0, 0, 0, 0.1), 
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 40px 40px 40px 60px;
    border-left: 15px solid var(--primary); /* Warna Navy Utama Nectar */
    overflow: hidden;
}

/* Animasi & Efek Lipatan Lembar Kertas (Modern Folding Corner Effect) */
.notebook-page-fold {
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 45px 45px 0;
    border-color: transparent transparent #e2e8f0 transparent;
    box-shadow: -3px 3px 5px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 10;
}
.notebook-container:hover .notebook-page-fold {
    border-width: 0 65px 65px 0;
    border-color: transparent transparent #cbd5e1 transparent;
}

/* Header Lembaran Buku */
.exercise-header {
    border-bottom: 2px dashed var(--primary);
    padding-bottom: 15px;
    margin-bottom: 30px;
}
.exercise-title {
    color: var(--primary);
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
}
.exercise-meta {
    display: flex;
    gap: 30px;
    margin-top: 10px;
    font-size: 0.95rem;
    color: var(--text-muted);
}
.exercise-meta strong { color: var(--text-main); }

/* Struktur Kertas Bergaris (Lined Paper System) */
.lined-paper {
    background: linear-gradient(var(--notebook-line) 1px, transparent 1px);
    background-size: 100% 2.5rem;
    line-height: 2.5rem;
    padding-top: 0.5rem;
    color: var(--text-notebook);
    position: relative;
}
/* Garis Margin Vertikal Buku */
.lined-paper::before {
    content: '';
    position: absolute;
    top: 0;
    left: -20px;
    width: 2px;
    height: 100%;
    background: var(--notebook-margin-line);
    opacity: 0.6;
}

/* Elemen Soal Didalam Notebook */
.question-item {
    margin-bottom: 25px;
    padding-left: 5px;
    page-break-inside: avoid;
}
.question-text {
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 8px;
}
.question-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-left: 5px;
}

/* Blok Kata Acak (Jumbled Token CSS) */
.jumbled-tokens-box {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 5px 0 10px 0;
    vertical-align: middle;
}
.token-badge {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: var(--primary);
    padding: 0px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.8rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

/* Input Isian Pendek Siswa */
.input-notebook {
    background: transparent;
    border: none;
    border-bottom: 1.5px solid var(--primary);
    font-size: 1.05rem;
    color: #1d4ed8;
    padding: 0 10px;
    width: 280px;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.3s;
}
.input-notebook:focus {
    outline: none;
    border-bottom-width: 2.5px;
    background: rgba(197, 160, 33, 0.05);
}

/* Panel Tombol & Feedback */
.exercise-actions {
    margin-top: 40px;
    display: flex;
    gap: 15px;
}
.btn-notebook {
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}
.btn-submit { background: var(--primary); color: white; }
.btn-submit:hover { background: #001229; transform: translateY(-2px); }
.btn-pdf { background: var(--success); color: white; }
.btn-pdf:hover { background: #1e7e34; transform: translateY(-2px); }

/* Feedback Status Validasi */
.answer-status {
    margin-top: 5px;
    font-size: 0.9rem;
    font-weight: 600;
}
.answer-status.correct { color: var(--success); }
.answer-status.wrong { color: var(--danger); }

/* Animasi Lembar Halaman Saat Generate */
@keyframes sheetFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-sheet {
    animation: sheetFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Papan Hasil Nilai Akhir */
.result-card-notebook {
    margin-top: 35px;
    padding: 20px;
    border-left: 5px solid var(--accent);
    background: #fffdf5;
    display: flex;
    align-items: center;
    gap: 25px;
    border-radius: 4px;
}
.score-badge {
    background: var(--accent);
    color: white;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(243, 156, 18, 0.3);
}
.score-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.5px; }
#score-value { font-size: 1.6rem; font-weight: 700; line-height: 1.6rem; }
.score-text { font-size: 1.1rem; font-weight: 600; color: var(--primary); }
/* =========================================================
   📱 MOBILE RESPONSIVENESS KHUSUS NOTEBOOK EXERCISE
========================================================= */
@media (max-width: 768px) {
    .notebook-container {
        margin: 20px 10px;
        padding: 25px 20px 25px 35px; /* Mengurangi padding namun tetap menyisakan ruang untuk garis margin buku */
        border-left-width: 10px;
    }
    .exercise-meta {
        flex-direction: column; /* Menumpuk info Topik dan Level ke bawah */
        gap: 5px;
    }
    .input-notebook {
        width: 100% !important; /* Input teks mengambil lebar penuh layar HP */
        margin-top: 10px;
    }
    .exercise-actions {
        flex-direction: column; /* Tombol bertumpuk vertikal */
        width: 100%;
    }
    .btn-notebook {
        width: 100%;
        justify-content: center;
    }
    .result-card-notebook {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px 15px;
    }
}
