* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    background: #CF9FFF;
}

.screen {
    display: none;
    min-height: 100vh;
    padding: 20px;
}

.screen.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* Welcome Screen */
.welcome-card {
    background: white;
    border-radius: 30px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.sprout-icon {
    font-size: 100px;
    animation: bounce 2s infinite;
    margin-bottom: 20px;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.main-title {
    font-size: 3rem;
    color: #166534;
    margin-bottom: 15px;
    font-weight: 800;
}

.subtitle {
    font-size: 1.3rem;
    color: #374151;
    margin-bottom: 30px;
}

.rules-box {
    background: #f0fdf4;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    text-align: left;
}

.rules-title {
    font-size: 1.8rem;
    color: #15803d;
    margin-bottom: 20px;
    font-weight: 700;
}

.rules-list {
    list-style: none;
}

.rules-list li {
    font-size: 1.1rem;
    color: #374151;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
}

.check {
    color: #16a34a;
    margin-right: 10px;
    font-weight: bold;
}

.cross {
    color: #dc2626;
    margin-right: 10px;
    font-weight: bold;
}

.star {
    color: #f59e0b;
    margin-right: 10px;
    font-weight: bold;
}

.green {
    color: #16a34a;
}

.red {
    color: #dc2626;
}

.btn-start {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    padding: 20px 60px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
    transition: all 0.3s ease;
}

.btn-start:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.6);
}

/* Playing Screen */
.game-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.game-header {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.header-left, .header-right {
    display: inline-block;
    font-size: 1.3rem;
    font-weight: 700;
    color: #166534;
}

.header-left {
    margin-right: 30px;
}

.sprout-small {
    font-size: 2rem;
    margin-right: 10px;
}

.score-value {
    color: #16a34a;
    font-size: 1.4rem;
}

.score-value.negative {
    color: #dc2626;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 10px;
    margin-top: 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.question-card {
    background: white;
    border-radius: 30px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.question-content {
    text-align: center;
    margin-bottom: 40px;
}

.question-emoji {
    font-size: 120px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.question-text {
    font-size: 1.6rem;
    color: #1f2937;
    font-weight: 600;
    line-height: 1.5;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.option-btn {
    padding: 25px 20px;
    font-size: 1.2rem;
    font-weight: 600;
    background: #dcfce7;
    color: #166534;
    border: 3px solid #86efac;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-btn:hover:not(:disabled) {
    transform: scale(1.05);
    background: #bbf7d0;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.option-btn.correct {
    background: #10b981;
    color: white;
    border-color: #059669;
}

.option-btn.wrong {
    background: #ef4444;
    color: white;
    border-color: #dc2626;
}

.option-btn.disabled {
    background: #e5e7eb;
    color: #6b7280;
    border-color: #d1d5db;
    cursor: not-allowed;
}

.feedback {
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 3px solid;
}

.feedback.hidden {
    display: none;
}

.feedback.correct {
    background: #dcfce7;
    border-color: #10b981;
}

.feedback.wrong {
    background: #fee2e2;
    border-color: #ef4444;
}

.feedback-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.feedback-emoji {
    font-size: 3rem;
}

.feedback-text {
    font-size: 1.8rem;
    font-weight: 700;
}

.feedback.correct .feedback-text {
    color: #15803d;
}

.feedback.wrong .feedback-text {
    color: #b91c1c;
}

.feedback-answer {
    font-size: 1.2rem;
    color: #374151;
    line-height: 1.6;
}

.btn-next {
    width: 100%;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 20px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-next:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.6);
}

.btn-next.hidden {
    display: none;
}

/* Results Screen */
.results-card {
    background: white;
    border-radius: 30px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.trophy-icon {
    font-size: 130px;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.results-title {
    font-size: 3.5rem;
    color: #166534;
    margin-bottom: 30px;
    font-weight: 800;
}

.score-box {
    background: linear-gradient(135deg, #dcfce7, #d1fae5);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
}

.final-score {
    font-size: 5rem;
    font-weight: 800;
    color: #15803d;
    margin-bottom: 10px;
}

.percentage {
    font-size: 2.5rem;
    font-weight: 600;
    color: #16a34a;
    margin-bottom: 15px;
}

.grade {
    font-size: 2rem;
    font-weight: 700;
    color: #374151;
}

.breakdown-box {
    background: #dbeafe;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 40px;
}

.breakdown-title {
    font-size: 1.5rem;
    color: #1e40af;
    margin-bottom: 20px;
    font-weight: 700;
}

.homeBtn {
        position: fixed;   /* stays at top-left even on scroll */
        top: 10px;         /* distance from top */
        left: 10px;        /* distance from left */
        z-index: 1000;     /* stays above other elements */
        }

        .homeBtn button {
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        }

        #imgbtn {
        width: 100px;       /* adjust size if needed */
        height: auto;
        }

.breakdown-item {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    color: #374151;
    margin-bottom: 10px;
}

.breakdown-value {
    font-weight: 700;
    color: #16a34a;
}

.results-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-play-again, .btn-exit {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 18px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-play-again {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

.btn-play-again:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.6);
}

.btn-exit {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    box-shadow: 0 10px 30px rgba(107, 114, 128, 0.4);
}

.btn-exit:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(107, 114, 128, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-title {
        font-size: 2rem;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .results-buttons {
        flex-direction: column;
    }
    
    .btn-play-again, .btn-exit {
        width: 100%;
    }
}