* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #CF9FFF;
    min-height: 100vh;
    padding: 20px;
}
.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;
        }

.container {
    max-width: 900px;
    margin: 0 auto;
}

.header {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon {
    font-size: 45px;
}

.header h1 {
    font-size: 32px;
    color: #2563eb;
    font-weight: 800;
}

.header-right {
    text-align: right;
}

.score-label {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.score-value {
    font-size: 40px;
    font-weight: bold;
    color: #2563eb;
}

.screen {
    animation: fadeIn 0.4s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hidden {
    display: none !important;
}

.card {
    background: white;
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    padding: 45px;
}

/* Instructions */
.instructions-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 4px solid #e5e7eb;
}

.info-icon {
    font-size: 55px;
}

.instructions-header h2 {
    font-size: 36px;
    color: #1e293b;
    font-weight: 800;
}

.instruction-steps {
    margin-bottom: 35px;
}

.instruction-item {
    display: flex;
    gap: 20px;
    margin-bottom: 28px;
    align-items: flex-start;
}

.step-number {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

.instruction-item p {
    color: #475569;
    line-height: 1.8;
    font-size: 17px;
}

.instruction-item ul {
    margin-top: 12px;
    margin-left: 25px;
    color: #475569;
    line-height: 1.8;
}

.instruction-item li {
    margin-bottom: 10px;
    font-size: 16px;
}

.green {
    color: #10b981;
    font-weight: bold;
}

.red {
    color: #ef4444;
    font-weight: bold;
}

/* Buttons */
.btn-start, .btn-play-again, .btn-exit {
    width: 100%;
    padding: 20px;
    font-size: 22px;
    font-weight: bold;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.btn-start {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-start:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.5);
}

/* Quiz Screen */
.progress-bar {
    margin-bottom: 35px;
}

.progress-text {
    font-size: 18px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 12px;
}

.progress-bg {
    width: 100%;
    height: 14px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    border-radius: 10px;
    transition: width 0.4s ease;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.5);
}

.question-container {
    text-align: center;
    margin-bottom: 35px;
}

.emoji-display {
    font-size: 90px;
    margin-bottom: 25px;
    animation: bounce 1.2s ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.question-text {
    font-size: 26px;
    color: #1e293b;
    line-height: 1.6;
    margin-bottom: 20px;
    font-weight: 700;
}

.options-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.option-btn {
    padding: 20px 25px;
    font-size: 18px;
    font-weight: 600;
    border: 3px solid #cbd5e1;
    background: white;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    color: #1e293b;
    text-align: left;
    position: relative;
}

.option-btn:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.2);
}

.option-btn.correct {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-color: #10b981;
    animation: correctPulse 0.6s;
}

.option-btn.wrong {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-color: #ef4444;
    animation: wrongShake 0.6s;
}

.option-btn.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-12px); }
    40% { transform: translateX(12px); }
    60% { transform: translateX(-8px); }
    80% { transform: translateX(8px); }
}

.feedback {
    padding: 22px;
    border-radius: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 19px;
    margin-top: 25px;
}

.feedback.correct {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border: 3px solid #10b981;
}

.feedback.wrong {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    border: 3px solid #ef4444;
}

/* Final Screen */
.final-card {
    text-align: center;
}

.trophy-icon {
    font-size: 130px;
    animation: bounce 2.5s infinite;
}

.final-card h2 {
    font-size: 48px;
    color: #1e293b;
    margin: 30px 0;
    font-weight: 800;
}

.final-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 35px 0;
}

.stat-box {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 3px solid #cbd5e1;
}

.stat-label {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 42px;
    font-weight: bold;
    color: #2563eb;
}

.performance-message {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    padding: 25px;
    border-radius: 15px;
    font-size: 20px;
    font-weight: 700;
    color: #92400e;
    margin: 30px 0;
    border: 3px solid #f59e0b;
}

.final-buttons {
    display: flex;
    gap: 20px;
    margin-top: 35px;
}

.btn-play-again {
    flex: 1;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-play-again:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(16, 185, 129, 0.5);
}

.btn-exit {
    flex: 1;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.btn-exit:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(239, 68, 68, 0.5);
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 22px;
    }
    
    .final-stats {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 30px;
    }
}