/* ============================================
   REKA BENTUK APLIKASI MISI HIDUP SIHAT
   Pendidikan Kesihatan Tahun 3
   ============================================ */

/* Reset dan Asas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Comic Sans MS', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #333;
}

/* Kontena Utama */
.container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Skrin */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* ============================================
   SKRIN PERMULAAN
   ============================================ */

.title {
    font-size: 2.5rem;
    color: #4CAF50;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    text-align: center;
    margin-bottom: 40px;
}

.level-select {
    text-align: center;
}

.level-select h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 30px;
}

.btn-level {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 250px;
    margin: 15px auto;
    padding: 25px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-level:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-level:active {
    transform: translateY(-2px);
}

.level-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.level-name {
    font-size: 1.5rem;
}

/* ============================================
   SKRIN PERMAINAN
   ============================================ */

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.score-display {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.score-label {
    font-size: 0.9rem;
}

.score-value {
    font-size: 1.3rem;
    font-weight: 700;
}

.progress-bar {
    flex: 1;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    max-width: 300px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #8BC34A 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.question-counter {
    background: #FF9800;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.question-container {
    margin-bottom: 30px;
}

.question-text {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 30px;
    line-height: 1.6;
    text-align: center;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-btn {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border: 3px solid #ddd;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-family: 'Poppins', sans-serif;
}

.option-btn:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #2196F3;
    transform: translateX(5px);
}

.option-btn:active {
    transform: scale(0.98);
}

.option-btn.correct {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border-color: #4CAF50;
}

.option-btn.wrong {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    border-color: #f44336;
}

.option-btn.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.feedback-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 1rem;
    text-align: center;
    font-weight: 500;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feedback-message.correct {
    background: #e8f5e9;
    color: #2e7d32;
    border: 2px solid #4CAF50;
}

.feedback-message.wrong {
    background: #ffebee;
    color: #c62828;
    border: 2px solid #f44336;
}

/* ============================================
   SKRIN KEPUTUSAN
   ============================================ */

.result-title {
    font-size: 2rem;
    color: #4CAF50;
    text-align: center;
    margin-bottom: 30px;
}

.result-card {
    text-align: center;
}

.final-score {
    margin-bottom: 30px;
}

.final-score h2 {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 15px;
}

.score-big {
    font-size: 4rem;
    font-weight: 700;
    color: #2196F3;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.star-rating {
    font-size: 3rem;
    margin: 30px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.star {
    animation: starPop 0.5s ease;
}

@keyframes starPop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

.motivational-message {
    font-size: 1.3rem;
    color: #333;
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
    border-radius: 15px;
    border: 2px solid #FFC107;
}

.stats-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 15px;
    min-width: 120px;
}

.stat-icon {
    font-size: 2rem;
}

.stat-label {
    font-size: 1rem;
    color: #666;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2196F3;
}

.btn-primary {
    margin-top: 30px;
    padding: 18px 40px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    font-family: 'Poppins', sans-serif;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-icon {
    margin-right: 10px;
    font-size: 1.3rem;
}

/* ============================================
   REKA BENTUK RESPONSIF
   ============================================ */

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .question-text {
        font-size: 1.2rem;
    }

    .option-btn {
        padding: 15px;
        font-size: 1rem;
    }

    .game-header {
        flex-direction: column;
        align-items: stretch;
    }

    .progress-bar {
        max-width: 100%;
    }

    .score-big {
        font-size: 3rem;
    }

    .star-rating {
        font-size: 2.5rem;
    }

    .stats-container {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
        border-radius: 15px;
    }

    .title {
        font-size: 1.5rem;
    }

    .question-text {
        font-size: 1.1rem;
    }

    .option-btn {
        padding: 12px;
        font-size: 0.9rem;
    }

    .score-big {
        font-size: 2.5rem;
    }

    .star-rating {
        font-size: 2rem;
    }
}

