/* Easter Nepali Quiz - Design System */
:root {
    --easter-pink: #FFD1DC;
    --easter-yellow: #FFF9C4;
    --easter-blue: #B3E5FC;
    --easter-green: #C8E6C9;
    --easter-purple: #E1BEE7;
    --text-color: #5D4037;
    --correct-bg: #81C784;
    --wrong-bg: #E57373;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --font-main: 'Outfit', 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background: url('images/easter_bg.png') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.quiz-container {
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    width: 90%;
    max-width: 450px;
    border-radius: 30px;
    padding: 25px;
    box-shadow: var(--shadow);
    position: relative;
    text-align: center;
    border: 3px solid white;
}

/* Header & Progress */
.header h1 {
    font-size: 1.8rem;
    color: #FF80AB;
    margin-bottom: 5px;
}

.header p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 20px;
}

.progress-container {
    height: 12px;
    background: #f0f0f0;
    border-radius: 10px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--easter-blue);
    width: 0%;
    transition: width 0.5s ease-out;
    position: relative;
}

.progress-egg {
    position: absolute;
    right: -10px;
    top: -15px;
    width: 25px;
    height: 25px;
    background: url('images/easter_egg.png') no-repeat center;
    background-size: contain;
}

/* Question Area */
.question-box {
    margin-bottom: 30px;
}

.image-display {
    width: 100%;
    height: 150px;
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 15px;
}

.question-text {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.pronunciation-hint {
    font-size: 1rem;
    color: #888;
    font-style: italic;
}

/* Options */
.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.option-btn {
    background: white;
    border: 2.5px solid #F8BBD0;
    padding: 18px;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    justify-content: center;
    align-items: center;
}

.option-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.option-btn.correct {
    background: var(--easter-green);
    border-color: #4CAF50;
    color: white;
}

.option-btn.wrong {
    background: var(--wrong-bg);
    border-color: #D32F2F;
    color: white;
    animation: shake 0.4s;
}

/* Basket & Floating Assets */
.basket-side {
    position: absolute;
    left: -60px;
    bottom: 20px;
    width: 100px;
    z-index: 5;
}

.basket-side img {
    width: 100%;
    animation: sway 3s infinite alternate ease-in-out;
}

.egg-count {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -10%);
    background: #FF80AB;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.bunny-corner {
    position: absolute;
    right: -40px;
    bottom: -20px;
    width: 120px;
}

.bunny-corner img {
    width: 100%;
    animation: bounce 2s infinite ease-in-out;
}

/* Animations */
@keyframes sway {
    from { transform: rotate(-5deg); }
    to { transform: rotate(5deg); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes flyToBasket {
    0% { transform: scale(1) translate(0, 0); opacity: 1; }
    50% { transform: scale(1.5) translate(-100px, -50px); opacity: 0.8; }
    100% { transform: scale(0.5) translate(-300px, 200px); opacity: 0; }
}

.flying-egg {
    position: fixed;
    width: 40px;
    z-index: 1000;
    pointer-events: none;
    animation: flyToBasket 0.8s forwards ease-in;
}

/* Final Screen */
.final-screen {
    display: none;
}

.final-screen h2 {
    font-size: 2rem;
    color: #FF80AB;
    margin-bottom: 20px;
}

.final-basket {
    width: 150px;
    margin: 0 auto 20px;
}

.play-again-btn {
    background: #FF80AB;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.play-again-btn:hover {
    background: #F06292;
}

/* Review Screen Styling */
.review-container {
    margin-top: 30px;
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--easter-pink);
    text-align: left;
}

/* Custom Scrollbar for Review */
.review-container::-webkit-scrollbar {
    width: 8px;
}

.review-container::-webkit-scrollbar-track {
    background: transparent;
}

.review-container::-webkit-scrollbar-thumb {
    background: var(--easter-pink);
    border-radius: 10px;
}

.review-item {
    display: flex;
    gap: 15px;
    align-items: center;
    background: white;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-left: 5px solid transparent;
}

.review-item.correct {
    border-left-color: var(--correct-bg);
}

.review-item.wrong {
    border-left-color: var(--wrong-bg);
}

.review-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: #fdfdfd;
    border-radius: 10px;
    flex-shrink: 0;
}

.review-content {
    flex: 1;
}

.review-q {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-color);
}

.review-ans {
    font-size: 0.85rem;
}

.review-ans span {
    font-weight: bold;
}

.status-tag {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 4px;
}

.status-tag.correct { background: var(--easter-green); color: #2E7D32; }
.status-tag.wrong { background: #FFCDD2; color: #C62828; }

/* Ensure final screen can grow */
#finalScreen {
    max-height: calc(100vh - 100px);
    overflow-y: hidden; /* container scroll only */
}

/* Name Input */
.name-input {
    width: 80%;
    padding: 12px 20px;
    border-radius: 20px;
    border: 2px solid var(--easter-pink);
    font-size: 1.1rem;
    text-align: center;
    color: var(--text-color);
    outline: none;
    transition: border-color 0.3s;
}

.name-input:focus {
    border-color: #FF80AB;
    box-shadow: 0 0 10px rgba(255, 128, 171, 0.2);
}

/* Timer Styling */
.timer-container {
    position: absolute;
    top: -50px;
    right: 30px;
    z-index: 10;
}

.timer-circle {
    position: relative;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: center;
    align-items: center;
}

.timer-circle svg {
    transform: rotate(-90deg);
}

.timer-circle circle {
    fill: none;
    stroke: #f3f3f3;
    stroke-width: 5;
}

.timer-circle #timerCircleProgress {
    stroke: #FF80AB;
    stroke-dasharray: 157; /* 2 * pi * 25 */
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke 0.3s;
    stroke-linecap: round;
}

.timer-text {
    position: absolute;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-color);
}

/* Responsive */
@media (max-width: 600px) {
    .timer-container {
        top: -40px;
        right: 10px;
    }
    .basket-side {
        left: 10px;
        top: -60px;
        bottom: auto;
        width: 70px;
    }
    .bunny-corner {
        bottom: -70px;
        right: 10px;
        width: 80px;
    }
}

/* Egg Shower Effect */
.falling-emoji {
    position: fixed;
    top: -50px;
    font-size: 2rem;
    z-index: 1000;
    pointer-events: none;
    animation: fall linear forwards;
}

@keyframes fall {
    to {
        transform: translateY(110vh) rotate(360deg);
    }
}
