
/* =========================================
   1. RESET & BASIC SETUP
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f4f6f9;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* =========================================
   2. NAVBAR UTAMA (UNIVERSAL)
   ========================================= */
header {
    background: linear-gradient(135deg, #1f1f1f 0%, #1f1f1f 100%);
    color: white;
    padding: 10px 0;
    position: sticky;
    top: 0; 
    z-index: 1000;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

nav {   
    max-width: 1900px;
    margin: 0 auto;
    padding: 0 25px;
    display: flex;
    justify-content: space-between;
    align-items: center; 
}

.logo {
    font-size: 29px;
    font-weight: bold;
    cursor: pointer;
}

.logo {
    cursor: pointer; /* Membuat kursor berubah jadi gambar tangan saat menunjuk logo */
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center; 
    gap: 30px;
    margin: 0;
    padding: 0;
}

nav ul li {
    display: flex;
    align-items: center; 
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 20px;
    transition: all 0.2s ease;
    padding: 5px 10px;
    border-radius: 5px;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.1);
}

nav a.active {
    border-bottom: 3px solid #ff5e5e;
    font-weight: bold;
    border-radius: 0;
    background: transparent;
}

/* =========================================
   3. HERO SECTION (HOME)
   ========================================= */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url("Pic/yuru.png");
    background-size: cover;
    background-position: center;
    color: white;   
    padding: 6rem 2rem;
    text-align: left;
}

.hero-content {
    max-width: 800px;
    margin: 0 1.9rem auto;
    z-index: 2;
    text-align: left;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* =========================================
   4. COURSES & FEATURES
   ========================================= */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1b1b1b;
}

/* Pastikan margin bawah 0 agar menyambung ke developer */
.courses {
    background-color: #ffffff; 
    padding: 4rem 2rem 2rem 2rem; /* Padding bawah dikurangi sedikit agar transisi mulus */
    margin-bottom: 0; 
}

.course-grid, .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.course-card, .feature-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    text-align: center;
    padding-bottom: 1.5rem;
}

.course-card:hover, .feature-card:hover {
    transform: translateY(-5px);
}

.course-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #e75252 0%, #e75252 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
}

.course-content, .feature-card {
    padding: 1.5rem;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Pastikan ini ada di file CSS Anda */
.features {
    background-color: #ffffff; /* Ganti warna ini sesuai keinginan Anda */
    padding: 60px 0;          /* Memberikan jarak agar tidak terlalu rapat */
}

/* =========================================
   5. BANNERS (HIRAGANA, KATAKANA, KANJI)
   ========================================= */
.hero-banner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background-size: cover;     
    background-position: center;
    min-height: 250px;
    color: white;
    padding: 20px;
    margin-bottom: 2rem;
}

.banner-hiragana { background-image: url('yurubga.png'); }
.banner-katakana { background-image: url('yuruktk.png'); }
.banner-kanji { background-image: url('yurubga.png'); } /* Reusing image */

.hero-banner h1 {
    font-size: 70px;
    text-shadow: 3px 3px 10px rgba(0,0,0,0.8);
    position: relative;
    z-index: 2;
}

.hero-banner h2 {
    font-size: 40px;
    text-shadow: 3px 3px 10px rgba(0,0,0,0.8);
    position: relative;
    z-index: 2;
}

.hero-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.2));
    z-index: 1;
}

/* =========================================
   6. GRID HURUF & MATERI
   ========================================= */
.content {
    width: 95%;
    max-width: 1200px;
    margin: auto;
    padding: 20px 0 50px;
}

.card {
    background: white;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.card h2 { margin-bottom: 15px; color: #1e3c72; }
.card p { line-height: 1.8; color: #555; }
.card ul { padding-left: 20px; line-height: 2; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.item {
    background: #f9f9f9;
    text-align: center;
    padding: 20px;
    border-radius: 15px;
    font-size: 42px;
    font-weight: bold;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 120px;
    border: 1px solid #eee;
}

.item:hover {
    transform: translateY(-5px);
    background: #ffe7e7;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.item span {
    display: block;
    margin-top: 8px;
    font-size: 16px;
    color: #666;
    font-weight: normal;
}

/* Khusus Kanji */
.theme-label { font-size: 22px; font-weight: bold; margin-bottom: 15px; display:flex; align-items:center; gap:10px;}
.kanji-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.item .kanji { font-size: 46px; margin-bottom: 8px; color: #222; }
.item .meaning { font-size: 13px; color: #777; margin-bottom: 5px; }
.item .reading { font-size: 14px; font-weight: 500; }

/* =========================================
   7. BUTTONS
   ========================================= */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: #ff5e5e;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: bold;
    margin-top: 15px; /* TAMBAHKAN BARIS INI UNTUK MEMBERI JARAK */
}
.btn:hover { background: #e04848; transform: translateY(-2px); }
.back { text-align: center; margin-top: 30px; }

/* =========================================
   SECTION DEVELOPER STYLE
   ========================================= */
.developer-section {
    padding: 2rem 20px 60px 20px; /* Padding atas dikurangi agar jaraknya pas dengan courses */
    background-color: #ffffff; /* DISAMAKAN DENGAN BACKGROUND COURSES */
    text-align: center;
    margin-top: 0; /* Menghilangkan jarak pembatas */
}

.developer-section h2 {
    font-size: 2.5rem; /* Disamakan ukurannya dengan .section-title di atasnya */
    margin-bottom: 3rem;
    color: #1b1b1b;
    position: relative;
}

/* Container utama menggunakan Flexbox agar menyamping */
.developer-container {
    display: flex;
    justify-content: center; 
    gap: 30px;              
    flex-wrap: wrap;        
    max-width: 1200px;
    margin: 0 auto;
}

/* Style untuk masing-masing kartu/blok */
.developer-card {
    background: #ffffff; /* Kartunya dibuat putih agar menonjol di atas latar #f0f0f0 */
    border-radius: 15px;
    padding: 30px 20px;
    width: 280px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Disamakan dengan shadow course-card */
    transition: transform 0.3s ease;
}

.developer-card:hover {
    transform: translateY(-5px);
}

/* =========================================
   BINGKAI & STYLING FOTO DEVELOPER
   ========================================= */

/* Bingkai Bulat Premium dengan Efek Cincin Putih */
.avatar-placeholder {
    width: 140px;               /* Ukuran diperbesar sedikit agar pas */
    height: 140px;
    margin: 0 auto 20px auto;
    border-radius: 50%;         /* Membuat bentuk lingkaran sempurna */
    background: #ffffff;        /* Warna latar belakang dalam bingkai */
    
    /* Bingkai Utama: Tebal 4px dengan warna merah coral khas NihongoQu */
    border: 4px solid #ff5e5e; 
    
    /* Efek jarak (padding) antara bingkai merah dan foto agar ada lingkaran putih di dalamnya */
    padding: 5px;               
    
    /* Bayangan halus di bawah bingkai foto agar terlihat hidup/3D */
    box-shadow: 0 4px 12px rgba(255, 94, 94, 0.2); 
    
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Penyesuaian Foto di Dalam Bingkai */
.avatar-placeholder img {
    width: 100%;
    height: 100%;
    border-radius: 50%;         /* Mengikuti bentuk lingkaran dalam */
    object-fit: cover;          /* Memastikan foto otomatis terpotong rapi & tidak gepeng */
    display: block;
}

/* Efek Interaktif: Bingkai berubah warna & membesar sedikit saat kartu di-hover */
.developer-card:hover .avatar-placeholder {
    transform: scale(1.05);             /* Bingkai foto membesar 5% */
    border-color: #1f1f1f;              /* Warna bingkai berubah jadi hitam elegan */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15); /* Bayangan mengikuti perubahan warna */
}

/* =========================================
   8. MENU DROPDOWN PROFILE
   ========================================= */
.profile-menu { position: relative; }
.profile-icon {
    cursor: pointer;
    font-size: 24px;
    padding: 8px 12px;
    border-radius: 5px;
    transition: 0.3s;
    background: rgba(255,255,255,0.1);
}
.profile-icon:hover { background: rgba(255,255,255,0.2); }

.profile-dropdown {
    position: absolute;
    top: 55px;
    right: 0;
    background: #1e1e1e;
    padding: 15px;
    border-radius: 10px;
    width: 180px;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.profile-dropdown p { color: #aaa; margin-bottom: 10px; font-size: 13px; border-bottom: 1px solid #333; padding-bottom: 5px;}
.profile-dropdown a {
    display: block;
    color: white;
    text-decoration: none;
    margin: 10px 0;
    font-size: 15px;
    padding: 0;
}
.profile-dropdown a:hover { color: #ff6b6b; background: transparent; }
.profile-dropdown.show { display: block; opacity: 1; transform: translateY(0); }

/* =========================================
   9. OVERLAY & POPUP LOGIN/PROFILE
   ========================================= */
.overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: 0.3s; z-index: 2000;
}
.overlay.show { opacity: 1; visibility: visible; pointer-events: auto; }

.auth-panel {
    position: fixed;
    top: 0; right: -400px; 
    width: 380px; height: 100%;
    background: white; padding: 30px;
    box-shadow: -5px 0 20px rgba(0,0,0,0.3);
    transition: right 0.4s ease; z-index: 2100;
    display: flex; flex-direction: column; gap: 15px;
}
.auth-panel.show { right: 0; }

.close-btn {
    background: #f0f0f0; border: none; color: #333;
    font-size: 18px; width: 40px; height: 40px;
    border-radius: 50%; cursor: pointer; align-self: flex-end;
    transition: 0.3s;
}
.close-btn:hover { background: #ff5e5e; color: white; }

.auth-panel h2 { color: #1e3c72; font-size: 24px; margin-top: 10px; }
.desc { background: #fdf5e6; padding: 12px; border-radius: 8px; font-size: 14px; color: #666; border-left: 4px solid #f0ad4e;}

.auth-form input {
    width: 100%; padding: 12px; margin-bottom: 15px;
    border: 1px solid #ccc; border-radius: 6px; font-size: 15px;
}
.register-btn {
    width: 100%; background: #007bff; color: white;
    padding: 14px; border: none; border-radius: 6px; font-size: 16px;
    cursor: pointer; transition: 0.3s; font-weight: bold;
}
.register-btn:hover { background: #0056b3; }

.profile-view { text-align: center; padding-top: 20px; }
.profile-avatar { font-size: 60px; background: #eef2f5; width: 100px; height: 100px; line-height: 100px; border-radius: 50%; margin: 0 auto 15px; }
.profile-view h3 { color: #333; font-size: 22px; margin-bottom: 5px; }
.profile-view p { color: #666; font-size: 15px; margin-bottom: 15px; }
.profile-view hr { border: 0; border-top: 1px solid #eee; margin: 15px 0; }
.stat-box { background: #f9f9f9; padding: 15px; border-radius: 10px; text-align: left; margin-bottom: 20px;}
.stat-box strong { display: block; color: #1e3c72; margin-bottom: 5px; }

/* =========================================
   10A. Quiz pages
   ========================================= */
.quiz-access-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 30px;
    margin: 40px auto 20px auto;
    max-width: 700px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.quiz-access-card h3 {
    font-size: 24px;
    color: #1f1f1f;
    margin-bottom: 8px;
}

.quiz-access-card p {
    color: #666;
    font-size: 15px;
    max-width: 550px;
    margin: 0 auto 20px auto;
}

.quiz-badge {
    display: inline-block;
    background: #ff5e5e;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.btn-start-quiz {
    display: inline-block;
    padding: 14px 35px;
    background: #28a745; /* Warna hijau indikasi siap mulai */
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.btn-start-quiz:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(40, 167, 69, 0.3);
}

/* =========================================
   10B, HiraganaQuiz pages
   ========================================= */

.quiz-main-container {
    max-width: 800px; 
    margin: 40px auto; 
    background: #ffffff;
    padding: 35px; 
    border-radius: 16px; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-top: 5px solid #ff5e5e;
}

.quiz-score-header {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 15px;
}

.stat-item { 
    font-size: 16px; 
    font-weight: 600; 
    color: #444; 
}

.val { 
    font-weight: 800; 
    color: #111; 
    margin-left: 5px; 
}

.percent-badge { 
    background: #e3f2fd; 
    color: #1e3c72; 
    padding: 4px 12px; 
    border-radius: 20px; 
    border: 1px solid #bbdefb; 
}

.quiz-progress-track {
    width: 100%; 
    height: 12px; 
    background: #eef0f3; 
    border-radius: 20px;
    overflow: hidden; 
    margin-bottom: 30px; 
    border: 1px solid #e2e8f0;
}

.quiz-progress-fill {
    height: 100%; 
    background: linear-gradient(90deg, #ff5e5e, #28a745); 
    width: 0%;
    border-radius: 20px; 
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-box-card {
    text-align: center; 
    padding: 40px 20px; 
    background: #fcfdfe;
    border: 2px dashed #cbd5e1; 
    border-radius: 12px; 
    margin-bottom: 30px;
}

.quiz-char-display { 
    font-size: 95px; 
    font-weight: bold; 
    color: #1f1f1f; 
    margin-bottom: 15px; 
}

.quiz-options-grid {
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 16px; 
    max-width: 550px; 
    margin: 0 auto;
}

.quiz-opt-btn {
    padding: 16px; 
    font-size: 18px; 
    font-weight: 700; 
    background: #ffffff;
    border: 2px solid #e2e8f0; 
    border-radius: 10px; 
    cursor: pointer; 
    color: #333; 
    transition: all 0.2s ease;
}

.quiz-opt-btn:hover:not([disabled]) { 
    background: #f8fafc; 
    border-color: #ff5e5e; 
    transform: translateY(-2px); 
}

.quiz-opt-btn.state-correct { 
    background: #d4edda !important; 
    border-color: #28a745 !important; 
    color: #155724 !important; 
}

.quiz-opt-btn.state-wrong { 
    background: #f8d7da !important; 
    border-color: #dc3545 !important; 
    color: #721c24 !important; 
}

.quiz-footer-nav { 
    display: flex; 
    justify-content: center; 
    gap: 15px; 
    margin-top: 10px; 
}

.btn-quiz-back {
    padding: 12px 24px; 
    background: #1f1f1f; 
    color: white; 
    border: none; 
    border-radius: 10px;
    font-size: 15px; 
    font-weight: 600; 
    cursor: pointer; 
    transition: background 0.3s;
}

.btn-quiz-back:hover { 
    background: #444; 
}

.btn-restart {
    padding: 12px 24px; 
    background: #ff5e5e; 
    color: white; 
    border: none; 
    border-radius: 10px;
    font-size: 15px; 
    font-weight: 600; 
    cursor: pointer; 
    transition: background 0.3s;
}

/* =========================================
   11. MENU SELEKTOR JUMLAH SOAL (SETUP SCREEN)
   ========================================= */
.quiz-setup-container {
    text-align: center;
    padding: 25px 15px;
    animation: fadeIn 0.4s ease;
}

.quiz-setup-container h3 {
    font-size: 26px;
    color: #1f1f1f;
    margin-bottom: 10px;
    font-weight: 700;
}

.quiz-setup-container p {
    color: #666;
    font-size: 15px;
    margin-bottom: 35px;
}

/* Container penampung tombol agar responsif */
.quiz-size-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 380px;
    margin: 0 auto;
}

/* Desain tombol opsi jumlah kuis */
.btn-size-opt {
    padding: 16px 24px;
    font-size: 17px;
    font-weight: 700;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    color: #333;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Efek Hover tombol opsi */
.btn-size-opt:hover {
    background: #fff5f5;
    border-color: #ff5e5e;
    color: #ff5e5e;
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(255, 94, 94, 0.12);
}

/* Efek aktif klik */
.btn-size-opt:active {
    transform: translateY(-1px);
}

/* Animasi halus saat transisi menu */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Layout horizontal saat di layar komputer / tablet */
@media (min-width: 650px) {
    .quiz-size-options {
        flex-direction: row;
        max-width: 100%;
        justify-content: center;
    }
    .btn-size-opt {
        flex: 1;
        max-width: 200px;
    }
}

.btn-restart:hover { 
    background: #e04848; 
}

/* =========================================
   10. FOOTER
   ========================================= */
footer { background-color: #1f1f1f; color: white; text-align: center; padding: 2rem; margin-top: 50px;}

/* =========================================
   12. RESPONSIVE DESIGN (MOBILE)
   ========================================= */
@media (max-width: 850px) {
    nav {
        flex-wrap: wrap;
        padding: 15px 20px;
        position: relative;
    }
    
    .logo {
        font-size: 24px;
        margin-bottom: 10px;
    }
    
    nav ul {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    nav ul li {
        margin-bottom: 5px;
    }
    
    nav a {
        font-size: 14px;
        padding: 6px 10px;
    }
    
    /* Posisikan ikon profile/hamburger tetap di kanan atas */
    nav ul li.profile-menu {
        position: absolute;
        top: 10px;
        right: 20px;
        margin-bottom: 0;
    }
}

