@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Fredoka', sans-serif;
}

body {
    background-color: #e0f7fa;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 15px;
}

#app-container {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 25px;
    text-align: center;
    overflow: hidden;
}

.screen { display: none; }
.screen.active { display: block; animation: fadeIn 0.4s ease-in-out; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

h1 { color: #2c3e50; font-size: 2.2rem; margin-bottom: 10px; }
h2 { color: #34495e; margin-bottom: 20px; font-size: 1.3rem; }
p { font-size: 1.1rem; color: #7f8c8d; margin-bottom: 20px; }
.mascot { font-size: 3.5rem; margin-bottom: 10px; }

.subject-tag {
    font-size: 0.9rem;
    color: #0984e3;
    background: #dfe6e9;
    padding: 5px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-weight: 600;
}

/* Butang Utama */
button {
    border: none;
    border-radius: 15px;
    padding: 14px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    width: 100%;
    margin-bottom: 12px;
}

button:active { transform: scale(0.96); }

.btn-primary {
    background: #ff4757;
    color: white;
    box-shadow: 0 5px 0 #ff1e34;
}

.grid-subjects {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 5px;
}

.grid-options { display: grid; gap: 10px; margin-bottom: 15px; }

.btn-subject { color: white; box-shadow: 0 4px 0 rgba(0,0,0,0.2); font-size: 1rem; padding: 12px 10px; }
.akidah { background: #00b894; }
.ibadah { background: #0984e3; }
.sirah { background: #6c5ce7; }
.adab { background: #e17055; }
.jawi { background: #fdcb6e; color: #2d3436 !important; }
.arab { background: #e84393; }
.tilawah { background: #00cec9; }
.amali { background: #b2bec3; color: #2d3436 !important; }
.pchi { background: #2d3436; }

.btn-option {
    background: #f1f2f6;
    color: #2f3542;
    border: 3px solid #dfe4ea;
    box-shadow: 0 4px 0 #dfe4ea;
    text-align: left;
    padding: 12px 15px;
}
.btn-option:hover { background: #ffeaa7; border-color: #fdcb6e; }
.btn-option.correct { background: #00b894; color: white; border-color: #00a884; }
.btn-option.wrong { background: #ff4757; color: white; border-color: #ff1e34; }

.btn-back { background: transparent; color: #7f8c8d; box-shadow: none; margin-top: 5px; }

/* Font Khas Arab / Jawi */
.arabic-text {
    font-size: 1.4rem !important;
    direction: rtl;
}

/* Progress Bar */
.progress-bar {
    width: 100%; background: #ecf0f1; height: 10px; border-radius: 10px; margin-bottom: 15px; overflow: hidden;
}
#progress {
    height: 100%; background: #00b894; width: 0%; border-radius: 10px; transition: width 0.3s;
}

#feedback { font-size: 1.3rem; font-weight: bold; min-height: 30px; }
