.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 8px; color: var(--inuzuka-brown); }
.form-group select { width: 100%; padding: 12px; border-radius: 8px; border: 2px solid var(--card-border); background: var(--input-bg); color: var(--text-dark); outline:none; transition:0.3s;}
.form-group select:focus { border-color: var(--inuzuka-red); }
.btn-start { width: 100%; background: var(--inuzuka-brown); color: white; border: none; padding: 15px; border-radius: 10px; font-size: 1.2rem; font-weight: bold; cursor: pointer; transition: 0.3s; }
.btn-start:hover { background: var(--inuzuka-red); }

/* Flashcard Area */
.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.btn-back, .btn-acak { background: var(--menu-bg); border: none; padding: 10px 15px; border-radius: 10px; color: var(--inuzuka-red); font-weight: bold; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.progress-pill { background: var(--menu-bg); padding: 8px 20px; border-radius: 50px; font-weight: bold; color: var(--inuzuka-brown); border: 2px solid var(--inuzuka-red); box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.timer-container { text-align: center; margin-bottom: 15px; background: var(--menu-bg); padding: 10px 20px; border-radius: 15px; border: 2px dashed var(--inuzuka-red); }
.timer-title { font-size: 0.9rem; font-weight: bold; color: var(--inuzuka-brown); margin-bottom: 5px;}
.timer-display { font-size: 1.8rem; font-weight: bold; color: var(--inuzuka-red); font-family: monospace;}

.flashcard-container { perspective: 1000px; width: 100%; max-width: 350px; height: 350px; margin: 0 auto 25px auto; }
.flashcard { width: 100%; height: 100%; position: relative; transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1); transform-style: preserve-3d; cursor: pointer; box-shadow: 0 15px 35px rgba(0,0,0,0.15); border-radius: 20px; }
.flashcard.is-flipped { transform: rotateY(180deg); }
.card-face { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 20px; padding: 30px; box-sizing: border-box; text-align: center; }
.card-front { background: var(--menu-bg); color: var(--text-dark); border: 2px solid var(--card-border);}
.card-back { background: var(--inuzuka-red); color: white; transform: rotateY(180deg); }

#yomi-display { font-size: 1.3rem; margin-bottom: 15px; color: var(--inuzuka-accent); font-weight: bold;}
#arti-display { font-weight: bold; line-height: 1.4; }

.control-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; max-width: 350px; margin: 0 auto; }
.btn-fc { padding: 15px; border: none; border-radius: 12px; font-weight: bold; font-size: 1rem; cursor: pointer; transition: 0.2s; display: flex; justify-content: center; gap: 5px; }
.btn-nav { background: var(--input-bg); color: var(--inuzuka-brown); box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.btn-hafal { grid-column: span 2; background: var(--success); color: white; font-size: 1.2rem; }
.btn-hafal:hover { background: #27ae60; transform: translateY(-2px);}

/* Transisi Popup Memantul */
#transisi-popup {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(143, 35, 58, 0.95);
    color: white; z-index: 1000;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: 0.5s ease;
}
#transisi-popup.show { opacity: 1; visibility: visible; }
#transisi-popup h1 { font-size: 2.5rem; text-align: center; margin: 0 20px 20px 20px;}
#transisi-popup i { font-size: 4rem; margin-bottom: 20px; animation: bounce 2s infinite; }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% {transform: translateY(0);} 40% {transform: translateY(-30px);} 60% {transform: translateY(-15px);} }

/* Kuis Area */
.quiz-header { text-align: center; margin-top: 40px; margin-bottom: 30px; }
.quiz-header h2 { color: var(--inuzuka-red); margin: 0 0 10px 0;}
.card-latihan { background: var(--menu-bg); padding: 25px; border-radius: 15px; margin-bottom: 25px; border-left: 6px solid var(--inuzuka-brown); box-shadow: 0 5px 15px rgba(0,0,0,0.05);}
.soal-latihan { font-size: 1.4rem; font-weight: bold; margin-bottom: 20px; color: var(--text-dark); }
.opsi-container { display: flex; flex-direction: column; gap: 12px; }

.opsi-label { 
    display: flex; align-items: center; padding: 15px; 
    border: 2px solid var(--card-border); border-radius: 10px; 
    cursor: pointer; background: var(--input-bg); color: var(--text-dark); 
    font-size: 1.1rem; font-weight: 500; transition: 0.2s;
}
.opsi-label:hover { border-color: var(--inuzuka-brown); filter: brightness(0.95); }
input[type="radio"] { margin-right: 15px; transform: scale(1.3); cursor: pointer; accent-color: var(--inuzuka-red);}

.btn-submit-quiz { width: 100%; padding: 18px; border-radius: 50px; font-size: 1.2rem; font-weight: bold; color: white; background: var(--inuzuka-red); border: none; cursor: pointer; margin-bottom: 40px; box-shadow: 0 5px 15px rgba(143, 35, 58, 0.4);}
.btn-submit-quiz:hover { background: #7a1c31; transform: translateY(-3px);}

/* Warna Jawaban Benar dan Salah */
.jawaban-benar { background-color: #d4edda !important; border-color: #28a745 !important; color: #155724 !important;}
.jawaban-salah { background-color: #f8d7da !important; border-color: #dc3545 !important; color: #721c24 !important;}
.jawaban-koreksi { border: 3px solid #28a745 !important; background-color: #e8f5e9 !important; color:#155724 !important;}

/* Screen Toggle */
.screen { display: none; }
.screen.active { display: block; animation: fadeIn 0.5s ease; }

/* Result Popup */
#result-popup {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.85); z-index: 2000;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: 0.3s;
}
#result-popup.show { opacity: 1; visibility: visible; }
.result-card { background: var(--menu-bg); width: 90%; max-width: 400px; padding: 30px; border-radius: 20px; text-align: center; }
.result-card h2 { margin-top: 0; font-size: 1.8rem; color: var(--text-dark); }
.score-text { font-size: 1.5rem; font-weight: bold; margin: 15px 0; color: var(--text-dark);}
.chart-container { width: 200px; height: 200px; margin: 0 auto 25px auto; }
.result-actions { display: flex; flex-direction: column; gap: 15px; }
.btn-result { padding: 12px; border: none; border-radius: 10px; font-weight: bold; font-size: 1.1rem; cursor: pointer;}
.btn-retry { background: var(--inuzuka-red); color: white; }
.btn-home { background: var(--inuzuka-brown); color: white; }
