#urekakids-quiz-container {
    max-width: 600px;
    margin: 20px auto;
    font-family: Arial, sans-serif;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

#progress-bar {
    width: 100%;
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}

#progress {
    height: 100%;
    width: 0%;
    background-color: #4CAF50;
    transition: width 0.3s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
}

.start-slide {
    text-align: center;
    padding: 20px;
    color: #333;
    margin-bottom: 20px;
}

.start-slide h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
}

.start-quiz-button {
    font-size: 1.2em;
    padding: 15px 30px;
    background-color: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.start-quiz-button:hover {
    background-color: #388E3C;
}

/* --- COMBO BOX STYLES --- */
.combo-box {
    display: block;
    width: 100%;
    margin-bottom: 25px;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.combo-header {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.combo-icon {
    font-size: 1.3em;
}

.learn-box {
    border: 2px solid #2196F3;
    background-color: #E3F2FD;
    color: #0D47A1;
}

.learn-btn {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 12px 0;
    font-size: 1.1em;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    margin-top: 15px;
}

.learn-btn:hover {
    background-color: #1976D2;
}

.test-box {
    border: 2px solid #4CAF50;
    background-color: #E8F5E9;
    color: #1B5E20;
}

.test-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 12px 0;
    font-size: 1.1em;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    margin-top: 15px;
}

.test-btn:hover {
    background-color: #388E3C;
}

/* --- QUESTION & OPTION STYLES --- */
.question-slide {
    padding: 20px 0;
    border-bottom: 2px solid #ddd;
    margin-bottom: 20px;
}

.question-image {
    display: block;
    margin: 0 auto 15px auto;
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 5px;
}

.question-text {
    color: #003366;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
    position: relative;
    min-height: 40px;
    /* Ensure space for button if text hidden */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.question-option-divider {
    border: none;
    height: 2px;
    background-color: #e0e0e0;
    margin: 20px 0;
}

.options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.option {
    width: 48%;
    background-color: #f0f0f0;
    border: 2px solid #ddd;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    min-height: 75px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.option:hover {
    border-color: #4CAF50;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.option .option-image {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: contain;
    border-radius: 5px;
}

.option-text {
    font-size: 1.2em;
    font-weight: bold;
    color: #b10d0d;
    margin: 0;
    text-align: center;
    transition: color 0.2s ease-in-out;
}

.option.selected {
    border-color: #4CAF50;
    background-color: #e8f5e9;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

/* REPLAY BUTTONS */
.replay-audio-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.replay-audio-btn:hover {
    transform: scale(1.2);
    background: #e8f5e9;
    color: #4CAF50;
    border-color: #4CAF50;
}

/* QUESTION REPLAY BUTTON */
.replay-question-btn {
    display: inline-block;
    width: 32px;
    height: 32px;
    background: #e3f2fd;
    color: #2196F3;
    border: 1px solid #2196F3;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 5px;
    /* Spacing above text */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.replay-question-btn:hover {
    background: #2196F3;
    color: white;
    transform: scale(1.1);
}

/* ANIMATIONS */

/* HAPPY BOUNCE + RAINBOW GLOW */
@keyframes bounce-happy {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: scale(1) translateY(0);
    }

    40% {
        transform: scale(1.1) translateY(-20px) rotate(-5deg);
        box-shadow: 0 15px 30px rgba(76, 175, 80, 0.4);
    }

    60% {
        transform: scale(1.1) translateY(-10px) rotate(5deg);
    }
}

@keyframes rainbow-border {
    0% {
        border-color: #FF5252;
        background-color: #FFEBEE;
    }

    20% {
        border-color: #FF9800;
        background-color: #FFF3E0;
    }

    40% {
        border-color: #FFEB3B;
        background-color: #FFFDE7;
    }

    60% {
        border-color: #4CAF50;
        background-color: #E8F5E9;
    }

    80% {
        border-color: #2196F3;
        background-color: #E3F2FD;
    }

    100% {
        border-color: #9C27B0;
        background-color: #F3E5F5;
    }
}

@keyframes bounce-glow {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px 10px rgba(76, 175, 80, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

/* 
   Combined Animation: Happy Bounce + Rainbow Flash on Card
*/
.option.correct-pulse {
    animation: bounce-happy 1.5s ease-in-out infinite, bounce-glow 0.6s ease-out, rainbow-border 1.5s linear infinite !important;
    z-index: 100;
}

/* 
    Flash Overlay -> Golden Warm Glow
*/
@keyframes flash-anim {
    0% {
        opacity: 0;
    }

    30% {
        opacity: 0.6;
    }

    100% {
        opacity: 0;
    }
}

.flash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 235, 59, 0.4) 0%, rgba(255, 152, 0, 0.1) 80%) !important;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
}

.flash-overlay.active {
    animation: flash-anim 0.8s ease-out !important;
}

/* Learn Mode Width Fix */
#urekakids-quiz-container[data-mode="learn"] .option,
.learn-box .option {
    width: 100%;
}

@media (max-width: 600px) {
    .option {
        width: 100%;
    }
}

.check-answer {
    display: block;
    width: auto;
    margin: 20px auto;
    padding: 15px 30px;
    background-color: #4CAF50;
    color: #fff;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.check-answer:hover {
    background-color: #388E3C;
}

.summary-slide {
    text-align: center;
    padding: 20px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    margin-top: 20px;
}

.summary-slide h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
}

.summary-slide p {
    font-size: 1.1em;
    margin: 5px 0;
}

.option.enlarged .option-text {
    transform: scale(1.5);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
}

.option.enlarged .option-image {
    transform: scale(1.1);
    box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 10;
}

/* Leaderboard & TTS */
.urekakids-leaderboard {
    max-width: 600px;
    margin: 40px auto;
    font-family: Arial, sans-serif;
    position: relative;
    z-index: 1;
}

.urekakids-leaderboard h3 {
    text-align: center;
    color: #003366;
    margin-top: 0;
}

.urekakids-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.urekakids-leaderboard-table th {
    background-color: #4CAF50;
    color: white;
    padding: 12px 15px;
    text-align: center;
}

.urekakids-leaderboard-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
}

.urekakids-leaderboard-table th,
.urekakids-leaderboard-table td {
    border-right: 1px solid #ddd;
}

.urekakids-leaderboard-table tbody tr:nth-child(even) {
    background-color: #f2f2f2;
}

.urekakids-leaderboard-table .rank-col {
    font-weight: bold;
    text-align: center;
    width: 10%;
}

.urekakids-leaderboard-table .name-col {
    font-weight: bold;
    color: red;
}

.urekakids-leaderboard-table .score-col,
.urekakids-leaderboard-table .percentage-col {
    text-align: center;
    width: 20%;
}

.tts-char {
    transition: all 0.1s;
}

.tts-highlight {
    background-color: #ffeb3b;
    color: #000 !important;
    border-radius: 3px;
}

.is-reading {
    color: #007bff !important;
}

.user-input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.user-input-textarea {
    width: 100%;
    max-width: 500px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.user-input-controls {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.dynamic-results-container .option {
    width: auto;
    padding: 5px 12px;
    flex-grow: 0;
    margin-bottom: 10px;
}

/* Sequence Mode */
.urekakids-sortable-list {
    flex-direction: column;
    align-items: stretch;
    counter-reset: sequence-counter;
    padding-left: 65px;
}

.urekakids-sortable-list .option {
    width: 100% !important;
    margin-bottom: 15px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    overflow: visible;
    position: relative;
}

.urekakids-sortable-list .option::before,
.ui-state-highlight::before {
    counter-increment: sequence-counter;
    content: counter(sequence-counter);
    position: absolute;
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: #2196F3;
    border-radius: 6px 0 0 6px;
    color: white;
    font-weight: bold;
    text-align: center;
    line-height: 32px;
    z-index: 2;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

.urekakids-sortable-list .option::after,
.ui-state-highlight::after {
    content: "";
    position: absolute;
    left: -36px;
    top: 50%;
    width: 22px;
    height: 22px;
    background: #2196F3;
    border-radius: 2px;
    transform: translateY(-50%) rotate(45deg);
    z-index: 1;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

.urekakids-sortable-list .option:nth-of-type(1)::before,
.urekakids-sortable-list .option:nth-of-type(1)::after {
    background-color: #FF5252;
}

.urekakids-sortable-list .option:nth-of-type(2)::before,
.urekakids-sortable-list .option:nth-of-type(2)::after {
    background-color: #448AFF;
}

.urekakids-sortable-list .option:nth-of-type(3)::before,
.urekakids-sortable-list .option:nth-of-type(3)::after {
    background-color: #66BB6A;
}

.urekakids-sortable-list .option:nth-of-type(4)::before,
.urekakids-sortable-list .option:nth-of-type(4)::after {
    background-color: #FF9800;
}

.urekakids-sortable-list .option:nth-of-type(5)::before,
.urekakids-sortable-list .option:nth-of-type(5)::after {
    background-color: #E040FB;
}

.urekakids-sortable-list .option:nth-of-type(6)::before,
.urekakids-sortable-list .option:nth-of-type(6)::after {
    background-color: #009688;
}

.ui-state-highlight {
    width: 100%;
    height: 60px;
    background: #fff9c4;
    border: 2px dashed #fbc02d;
    border-radius: 8px;
    margin-bottom: 15px;
    visibility: visible !important;
    position: relative;
    display: block !important;
}

.drag-handle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: #aaa;
    cursor: grab;
}

/* 
========================================
   PREMIUM CORRECTNESS ANIMATIONS
   Overriding JS-injected styles
========================================
*/

/* 1. Realistic Soap Bubble (Child Friendly: Colorful, Wobble) */
.balloon-anim {
    color: transparent !important;
    /* Hide the emoji */
    text-shadow: none !important;

    /* CHILD LOVE: Rainbow Iridescence */
    background: radial-gradient(130% 130% at 30% 30%,
            hsla(0, 0%, 100%, 0.9) 0%,
            hsla(280, 100%, 85%, 0.6) 20%,
            hsla(200, 100%, 80%, 0.6) 45%,
            hsla(140, 100%, 80%, 0.6) 60%,
            hsla(0, 0%, 100%, 0.4) 100%) !important;

    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow:
        inset 10px 10px 20px rgba(255, 255, 255, 0.5),
        inset -5px -5px 15px rgba(255, 255, 255, 0.3),
        0 15px 25px rgba(0, 0, 0, 0.05) !important;
    border-radius: 50% !important;
    font-size: 0 !important;
    width: 70px !important;
    height: 70px !important;

    /* Full Screen & Layout */
    position: fixed !important;
    z-index: 2147483647 !important;
    pointer-events: none !important;

    /* SLOWER for 4yo eyes (4s) */
    animation-name: floatUpWobble !important;
    animation-duration: 4s !important;
    animation-timing-function: ease-in-out !important;
    animation-fill-mode: forwards !important;
}

/* Bubbles 2 & 3 (Cluster) */
.balloon-anim::before,
.balloon-anim::after {
    content: '' !important;
    position: absolute;
    border-radius: 50%;
    background: inherit;
    border: inherit;
    box-shadow: inherit;
    z-index: -1;
}

.balloon-anim::before {
    width: 60% !important;
    height: 60% !important;
    bottom: -40px;
    left: -40px;
    animation: drift-secondary 2s ease-in-out infinite alternate;
}

.balloon-anim::after {
    width: 80% !important;
    height: 80% !important;
    bottom: -20px;
    right: -50px;
    animation: drift-secondary 2.5s ease-in-out infinite alternate-reverse;
}

@keyframes drift-secondary {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(10px, -10px);
    }
}

@keyframes floatUpWobble {
    0% {
        bottom: -150px;
        opacity: 0;
        transform: translateX(0) scale(0.5);
    }

    10% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    100% {
        bottom: 120vh;
        opacity: 0.9;
        /* Drift wide and wobbly */
        transform: translateX(var(--drift, 50px)) rotate(var(--rot, 360deg)) scale(1.2);
    }
}

/* 2. Enhanced Confetti (Shapes!) */
.confetti-piece {
    width: 14px !important;
    height: 14px !important;
    z-index: 2147483647 !important;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1) !important;
}

.confetti-piece:nth-child(2n) {
    border-radius: 0 !important;
}

.confetti-piece:nth-child(3n) {
    border-radius: 50% !important;
}

.confetti-piece:nth-child(5n) {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%) !important;
    border-radius: 0 !important;
}

/* 
    3. FLYING HEARTS (Transformed Fireworks) - NEW 
*/
.firework-particle {
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    z-index: 2147483647 !important;

    /* Use pseudo-element to draw heart */
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.firework-particle::before {
    content: '❤️' !important;
    /* Heart Emoji */
    font-size: 2rem !important;
    position: absolute;
    animation: pulse-heart 0.5s infinite alternate !important;
}

/* Add varied hearts & flowers */
.firework-particle:nth-child(2n)::before {
    content: '💖' !important;
}

.firework-particle:nth-child(3n)::before {
    content: '🌸' !important;
}

.firework-particle:nth-child(4n)::before {
    content: '⭐' !important;
}

@keyframes pulse-heart {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.3);
    }
}

/* 4. Card Ripple Effect (Screen Flow) */
.option.correct-pulse::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(76, 255, 82, 0.4) 0%, rgba(76, 175, 80, 0) 70%);
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
    animation: ripple-screen 1s ease-out forwards;
    pointer-events: none;
    z-index: 999;
}

@keyframes ripple-screen {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(8);
        opacity: 0;
    }
}

/* 5. Success Particles (Giant Star) */
.option.correct-pulse::after {
    content: '★';
    position: absolute;
    top: -30px;
    right: -20px;
    font-size: 40px;
    color: #FFD700;
    text-shadow: 0 0 20px #FFEB3B;
    opacity: 0;
    animation: star-pop 0.8s ease-out 0.1s;
    pointer-events: none;
    z-index: 2147483647 !important;
}

@keyframes star-pop {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }

    50% {
        transform: scale(1.5) rotate(180deg);
        opacity: 1;
    }

    100% {
        transform: scale(1) rotate(360deg);
        opacity: 0;
    }
}

/* Make sure container doesn't clip absolute flow */
#urekakids-quiz-container {
    overflow: visible !important;
}