.main-container { margin-top: 100px; display: block; padding-bottom: 120px; }
.content-section { display: none; animation: fadeIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.content-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* NAVIGASI BAWAH BIAR GAK MATI RASA KETIMPA KARTU */
.tab-nav {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    background: rgba(20,20,20,0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 10px;
    border-radius: 30px;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 420px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    z-index: 999; /* 🌟 KASTA DEWA! Anti ketimpa apapun yang ada di layar */
}
.tab-btn { flex: 1; padding: 12px; background: transparent; border: none; color: #888; font-weight: bold; font-size: 0.82rem; border-radius: 20px; cursor: pointer; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.tab-btn:active { transform: scale(0.7); }
.tab-btn.active { background: linear-gradient(130deg, #1E90FF, #a78bfa); color: lavender; box-shadow: 0 4px 15px rgba(167, 139, 250, 0.3); inset 0 1px 2px rgba(255, 255, 255, 0.2); transform: scale(1.052); }

.huruf-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 20px 0; }
.huruf-grid.grid-3 { grid-template-columns: repeat(3, 1fr); }
.huruf-grid.grid-khusus { grid-template-columns: repeat(4, 1fr); }

.section-title { text-align: center; color: #66CDAA; font-size: 1.2rem; font-weight: bold; margin-top: 16px; }

.h-box { background: #1e1e1e; border: 1px solid #333; border-radius: 12px; aspect-ratio: 1/1; display: flex; flex-direction: column; justify-content: center; align-items: center; cursor: pointer; transition: transform 0.1s ease, background 0.3s ease; }
.h-box:active { transform: scale(0.9); }
.h-jp { font-size: 1.6rem; font-weight: bold; color: ivory; pointer-events: none; }
.h-romaji { font-size: 0.7rem; color: #aaa; pointer-events: none; }
.empty { visibility: hidden; }

.scroll-reveal { opacity: 0; transform: translateY(40px) scale(0.85); transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1); will-change: opacity, transform; }
.scroll-reveal.show { opacity: 1; transform: translateY(0) scale(1); }

.row-a.active { background: #ff3b3b !important; }
.row-k.active { background: #6c2cf5 !important; }
.row-s.active { background: #00d26a !important; }
.row-t.active { background: #00bfff !important; }
.row-n.active { background: #ff9f43 !important; }
.row-h.active { background: #ee5253 !important; }
.row-m.active { background: #5f27cd !important; }
.row-y.active { background: #ff4757 !important; }
.row-r.active { background: #2ed573 !important; }
.row-w.active { background: #1e90ff !important; }
.row-g.active { background: #f0932b !important; }
.row-z.active { background: #eb4d4b !important; }
.row-d.active { background: #4834d4 !important; }
.row-b.active { background: #6ab04c !important; }
.row-p.active { background: #be2edd !important; }

.partikel-container { display: flex; flex-direction: column; gap: 15px; padding-top: 15px; }
.partikel-card { background: #1e1e1e; border-left: 4px solid #D4C5B9; padding: 13px 14px; border-radius: 10px; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.p-huruf { font-size: 1.1rem; font-weight: bold; color: ivory; margin-bottom: 5px; }
.p-desc { font-size: 0.8rem; color: #aaa; line-height: 1.55; }
.section-subtitle { text-align: center; color: #D4C5B9; font-size: 0.92rem; margin-top: 8px; margin-bottom: 14px; opacity: 0.9; }

.level-container { display: flex; justify-content: center; gap: 10px; margin: 18px 0 16px; flex-wrap: wrap; }
.level-tab { border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03); color: #c9c9d4; padding: 10px 20px; border-radius: 999px; font-weight: 700; cursor: pointer; transition: all 0.25s ease; }
.level-tab.active { background: linear-gradient(125deg, #00c6ff, #1E90FF); color: ivory; box-shadow: 0 6px 18px rgba(0, 198, 255, 0.22); transform: translateY(-2px); }

.jp-table { width: 100%; border-collapse: collapse; margin-top: 15px; font-size: 15px; color: #e5e7eb; background: rgba(255,255,255,0.03); border-radius: 10px; overflow: hidden; }
.jp-table th, .jp-table td { padding: 10px; text-align: left; line-height: 1.3; }
.jp-table th { background: rgba(0, 198, 255, 0.15); color: #00c6ff; font-weight: 600; }
.jp-table td { border-bottom: 1px solid rgba(255,255,255,0.08); }
.jp-table tr:hover { background: rgba(255,255,255,0.03); }

/* =========================================
   UI TOOLBAR SEARCH & FILTER (SEJAJAR) 🔍🃏
   ========================================= */
/* BARIS PENCARIAN & FILTER DIANGKAT KE DEPAN */
.vocab-toolbar {
    margin: 0 auto 16px;
    max-width: 560px;
    padding: 0 4px;
    display: flex;     
    gap: 10px;         
    align-items: center;
    position: relative; /* 🌟 TAMBAHAN BARU */
    z-index: 100;       /* 🌟 NAIK KASTA! Biar laci bisa diklik */
}

.vocab-search { width: 100%; flex-grow: 1; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.04); color: #fff; outline: none; backdrop-filter: blur(10px); }
.vocab-search::placeholder { color: rgba(255,255,255,0.45); }

/* WADAH IKON FILTER KOTAK */
.filter-container-inline {
    position: relative;
    display: flex;
    perspective: 1000px; 
    z-index: 101;       /* 🌟 KASTA LEBIH TINGGI DARI KARTU! */
}

.btn-filter-icon { background: #1e1e2f; color: #00c6ff; border: 1px solid rgba(0, 198, 255, 0.4); width: 46px; height: 46px; border-radius: 14px; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); flex-shrink: 0; }
.btn-filter-icon:hover { background: rgba(0, 198, 255, 0.1); transform: translateY(-2px); border-color: #00c6ff; box-shadow: 0 6px 20px rgba(0, 198, 255, 0.3); }

.filter-menu { position: absolute; top: 125%; right: 0; background: #1a1a24; border: 1px solid rgba(0, 198, 255, 0.3); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 5px; min-width: 180px; box-shadow: 0 10px 30px rgba(0,0,0,0.6); z-index: 50; opacity: 0; visibility: hidden; pointer-events: none; transform-origin: top right; transform: translateY(-20px) rotateX(-30deg) scale(0.95); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.filter-menu.muncul { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) rotateX(0deg) scale(1); }
.filter-option { background: transparent; color: #dcdde1; border: none; padding: 10px 15px; border-radius: 8px; text-align: left; font-size: 0.95rem; cursor: pointer; display: flex; align-items: center; gap: 10px; transition: all 0.2s ease; }
.filter-option i { font-size: 1.2rem; color: #718093; transition: all 0.2s ease; }
.filter-option:hover, .filter-option.active { background: rgba(0, 198, 255, 0.15); color: #ffffff; padding-left: 20px; }
.filter-option:hover i, .filter-option.active i { color: #00c6ff; }

.vocab-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.vocab-card { position: relative; overflow: hidden; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: 18px; padding: 14px 14px 13px; box-shadow: 0 8px 24px rgba(0,0,0,0.18); transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease; }
.vocab-card:hover { transform: translateY(-4px); border-color: rgba(0, 198, 255, 0.25); box-shadow: 0 12px 30px rgba(0,0,0,0.26); }
.vocab-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(180deg, #00c6ff, #a78bfa); opacity: 0.85; }
.vocab-level { display: inline-flex; align-items: center; justify-content: center; padding: 4px 9px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; background: rgba(0, 198, 255, 0.12); color: #8be7ff; margin-bottom: 10px; }
.vocab-kana { font-size: 1.3rem; font-weight: 800; line-height: 1.2; color: #F0F4F8; margin-bottom: 4px; }
.vocab-romaji { font-size: 0.84rem; color: #a78bfa; margin-bottom: 10px; }
.vocab-arti { font-size: 0.9rem; color: #d5d7df; line-height: 1.5; }
.vocab-card:active { transform: scale(0.98); }

@media (min-width: 768px) {
    .tab-nav { max-width: 650px; padding: 14px; border-radius: 40px; bottom: 30px; }
    .tab-btn { padding: 18px 24px; font-size: 1.05rem; border-radius: 25px; }
}

.btn-back-to-top { position: fixed; bottom: 90px; right: 15px; background: rgba(108, 44, 245, 0.9); color: white; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 50%; width: 50px; height: 50px; font-size: 22px; cursor: pointer; box-shadow: 0 4px 15px rgba(108, 44, 245, 0.6); z-index: 9999; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transform: translateY(50px) scale(0.5); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.btn-back-to-top:hover { background: #8A2BE2; box-shadow: 0 6px 20px rgba(108, 44, 245, 0.8); }
.btn-back-to-top.muncul { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.api-roket { position: fixed; width: 10px; height: 10px; background: ivory; border-radius: 50%; pointer-events: none; z-index: 9998; box-shadow: 0 0 10px #ff9f43, 0 0 20px #ff3b3b; animation: semburanApi 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
@keyframes semburanApi { 0% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; background: #fff; } 40% { background: #ff9f43; } 100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0); opacity: 0; background: #ff3b3b; } }
.percikan-roket { position: fixed; width: 4px; height: 4px; background: #fff; border-radius: 50%; pointer-events: none; z-index: 9997; box-shadow: 0 0 5px #fff, 0 0 10px #f1c40f; animation: animasiPercikan 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards; }
@keyframes animasiPercikan { 0% { transform: translate(-50%, -50%) scale(1); opacity: 1; background: #fff; } 100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0); opacity: 0; background: #f39c12; } }

.modal-kuis-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 100000; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: all 0.4s ease; }
.modal-kuis-overlay.muncul { opacity: 1; visibility: visible; }
.modal-kuis-content { background: #1e1e1e; border: 2px solid #6c2cf5; border-radius: 20px; padding: 25px; width: 90%; max-width: 350px; text-align: center; box-shadow: 0 15px 40px rgba(108, 44, 245, 0.4); transform: scale(0.8) translateY(30px); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.modal-kuis-overlay.muncul .modal-kuis-content { transform: scale(1) translateY(0); }
.kuis-header { display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 10px; }
.kuis-instruksi { font-size: 0.85rem; color: #aaa; margin-bottom: 5px; }
.kuis-arti { font-size: 1.8rem; color: #00c6ff; margin-bottom: 20px; font-weight: 900; }
.wadah-jawaban { min-height: 50px; border-bottom: 2px dashed rgba(255,255,255,0.2); margin-bottom: 20px; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; padding-bottom: 10px; }
.wadah-huruf-acak { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 15px; }
.huruf-chip { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2); color: white; font-size: 1.2rem; font-weight: bold; width: 40px; height: 40px; border-radius: 10px; display: flex; justify-content: center; align-items: center; cursor: pointer; text-transform: uppercase; transition: all 0.2s ease; }
.huruf-chip:active { transform: scale(0.8); }
.huruf-chip.di-jawaban { background: #6c2cf5; border-color: #a78bfa; box-shadow: 0 0 10px rgba(108,44,245,0.6); }
.pesan-kuis { font-weight: bold; height: 20px; margin-bottom: 15px; font-size: 1rem; }
.pesan-kuis.benar { color: #00d26a; animation: kedip 1s infinite; }
.pesan-kuis.salah { color: #ff3b3b; }
.btn-tutup-kuis { background: transparent; border: 1px solid #aaa; color: #aaa; padding: 8px 20px; border-radius: 20px; cursor: pointer; transition: 0.3s; }
.btn-tutup-kuis:hover { background: rgba(255,255,255,0.1); color: white; }
@keyframes kedip { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.1); } }
.geter { animation: geterSalah 0.4s ease; }
@keyframes geterSalah { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.prompt-kuis-ngambang { position: fixed; bottom: 100px; right: 20px; background: linear-gradient(135deg, #ff3b3b, #ff9f43); color: white; padding: 12px 20px; border-radius: 16px; font-weight: 800; font-size: 0.9rem; text-align: center; box-shadow: 0 10px 25px rgba(255, 59, 59, 0.5); cursor: pointer; z-index: 9998; transform: translateX(150%) scale(0.8); transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.prompt-kuis-ngambang.muncul { transform: translateX(0) scale(1); }
.prompt-kuis-ngambang.ilang { transform: translateY(50px) scale(0); opacity: 0; pointer-events: none; }
.kuis-hint { color: #f1c40f; font-size: 0.85rem; margin-bottom: 15px; font-weight: bold; letter-spacing: 0.5px; background: rgba(241, 196, 15, 0.1); padding: 6px 12px; border-radius: 12px; display: inline-block; border: 1px dashed rgba(241, 196, 15, 0.4); cursor: pointer; transition: 0.3s; user-select: none; }
.kuis-hint span { color: #fff; text-transform: uppercase; font-size: 0.9rem; }
.kuis-aksi { display: flex; justify-content: center; gap: 12px; margin-top: 15px; }
.btn-reroll-kuis { background: rgba(0, 198, 255, 0.1); border: 1px solid #00c6ff; color: #00c6ff; padding: 8px 18px; border-radius: 20px; cursor: pointer; transition: 0.3s; font-weight: bold; }
.btn-reroll-kuis:hover { background: #00c6ff; color: #000; box-shadow: 0 0 15px rgba(0, 198, 255, 0.5); }
.huruf-chip.kosong { background: rgba(255, 255, 255, 0.05); border: 2px dashed rgba(255, 255, 255, 0.3); box-shadow: none; cursor: default; }
.huruf-chip.kosong:active { transform: none; }
.huruf-chip.hint-terkunci { background: linear-gradient(135deg, #f1c40f, #e67e22); border-color: #f39c12; color: #000; box-shadow: 0 0 15px rgba(241, 196, 15, 0.6); cursor: not-allowed; pointer-events: none; }
.kuis-hint:active { transform: scale(0.95); }
.kuis-hint:hover { background: rgba(241, 196, 15, 0.2); }
