.main-container {
    margin-top: 80px; 
    display: block;
    padding-bottom: 120px; /* Biar huruf paling bawah gak ketutupan bottom nav */
}

/* --- TAB CONTENT (ANIMASI FADE IN) --- */
.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); }
}

/* --- BOTTOM NAVIGASI (ALA APLIKASI) --- */
.tab-nav {
    display: flex;
    justify-content: center;
    background: rgba(26, 26, 26, 0.85); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
    
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 450px;
    z-index: 9999;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    color: #888;
    font-weight: bold;
    font-size: 0.95rem;
    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.9); }

.tab-btn.active {
    background: linear-gradient(135deg, #ff3b3b, #cc0000);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 59, 59, 0.4);
    transform: scale(1.05);
}

/* --- GRID HURUF --- */
.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: 15px;
}

.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: white; pointer-events: none; }
.h-romaji { font-size: 0.7rem; color: #aaa; pointer-events: none; }
.empty { visibility: hidden; }

/* =========================================
   ANIMASI SCROLL MUNCUL (SMOOTH REVEAL)

/* 1. Posisi Awal (Ngumpet, Turun ke bawah, Mengecil) */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.85); 
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1); /* Ini yang bikin mulus dan mantul */
    will-change: opacity, transform; 
}

/* 2. Posisi Akhir Pas JS Nambahin Class 'show' (Muncul Normal) */
.scroll-reveal.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}


/* --- WARNA TAP PER BARIS --- */
.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; }

/* --- STYLE PARTIKEL --- */
.partikel-container {
    display: flex; flex-direction: column; gap: 15px; padding-top: 15px;
}
.partikel-card {
    background: #1e1e1e; border-left: 4px solid #ff3b3b; padding: 15px 20px;
    border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.p-huruf { font-size: 1.4rem; font-weight: bold; color: white; margin-bottom: 5px; }
.p-desc { font-size: 0.9rem; color: #aaa; line-height: 1.5; }