/* VARIABEL TEMA INUZUKA CLAN */
:root { 
    --inuzuka-red: #8F233A; 
    --inuzuka-brown: #57443E; 
    --inuzuka-bg: #E4E6ED; 
    --inuzuka-dark: #323033; 
    --inuzuka-accent: #F0BEA6; 
    --success: #2ecc71;
    --danger: #e74c3c;
    --text-dark: #1a1a1a;
    --menu-bg: #ffffff;
    --input-bg: #f9f9f9;
    --card-border: #eee;
}

/* TEMA MALAM (DARK MODE) */
body.dark-mode {
    --inuzuka-bg: #121212; 
    --inuzuka-dark: #f5f5f5; 
    --inuzuka-brown: #b89a8f; 
    --text-dark: #f5f5f5;
    --menu-bg: #1e1e1e;
    --input-bg: #2c2c2c;
    --card-border: #444;
}

* {
    box-sizing: border-box;
}

body { 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
    background-color: var(--inuzuka-bg); 
    margin: 0; 
    padding: 0;
    color: var(--text-dark);
    overflow-x: hidden; 
    max-width: 100vw;
    transition: background-color 0.3s, color 0.3s;
}

/* GLOBAL HEADER */
.main-header {
    text-align: center;
    background-color: var(--inuzuka-red);
    color: white;
    padding: 15px 10px;
    font-weight: bold;
    font-size: 1rem; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* TOGGLE THEME BUTTON */
.btn-theme {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--menu-bg);
    border: 2px solid var(--inuzuka-brown);
    color: var(--inuzuka-brown);
    width: 45px; height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 500;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: 0.3s;
}
.btn-theme:hover { transform: scale(1.1); }

/* LAYOUT & CARDS */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}
.card {
    background: var(--menu-bg);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-left: 6px solid var(--inuzuka-red);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: block;
    color: inherit;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.card h3 { margin: 0 0 5px 0; color: var(--inuzuka-red); }
.card p { margin: 0; font-size: 0.9rem; color: #888; }

/* =========================================
   UPDATE FITUR TAMBAHAN
   ========================================= */

/* KANJI WAJIB KUNING */
.kanji-teks {
    color: yellow !important; 
    font-weight: bold;
}

/* KOTOBA/KANJI SUDAH HAFAL */
.sudah-hafal {
    opacity: 0.3; 
    text-decoration: line-through; 
    pointer-events: none; 
}

/* PERBAIKAN HAPYO MELUBER */
.hapyo-kolom, .hapyo-table td, .teks-sensor {
    white-space: pre-wrap !important; 
    word-break: break-word !important; 
    overflow-wrap: break-word !important;
    max-height: 400px; 
    overflow-y: auto; 
    display: block; 
}

/* PERBAIKAN MEMBER (HANYA SENSEI) */
.member-biasa {
    color: inherit; 
    text-shadow: none;
}
.efek-sensei {
    color: gold;
    text-shadow: 0 0 10px gold, 0 0 20px yellow;
    font-weight: bold;
}

/* POPUP 3 DETIK */
#popup-animasi {
    display: none; 
    position: fixed; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    z-index: 9999; 
    background: rgba(0,0,0,0.8); 
    padding: 20px; 
    border-radius: 15px; 
    text-align: center; 
    color: white; 
    min-width: 200px;
}
#popup-gif {
    width: 120px; 
    height: 120px; 
    margin-bottom: 15px; 
    border-radius: 10px;
}
#popup-teks {
    margin: 0; 
    font-size: 18px; 
    font-weight: bold;
}

/* LOADING SCREEN 4 DETIK (ANTI-BUG HP) */
#loading-layar {
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0; 
    background-color: #000000; 
    z-index: 999999; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    transition: opacity 0.5s ease;
}
.loading-content {
    text-align: center;
    padding: 20px;
    width: 100%;
}
.loading-gif {
    width: 150px; 
    height: 150px; 
    border-radius: 50%; 
    object-fit: cover;
    border: 4px solid var(--inuzuka-red);
    box-shadow: 0 0 20px rgba(143, 35, 58, 0.5);
    margin-bottom: 20px;
}
.loading-content h2 {
    color: #ffffff;
    font-size: 1.2rem; 
    line-height: 1.5;
    margin-top: 0;
    margin-bottom: 20px;
}
.loading-spinner {
    font-size: 2.5rem;
    color: var(--inuzuka-red);
}