/* ============================================
   趣味英语乐园 - Pop Art Style CSS
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    --pop-red: #FF3B5C;
    --pop-yellow: #FFD93D;
    --pop-blue: #4D96FF;
    --pop-green: #6BCB77;
    --pop-purple: #9B5DE5;
    --pop-orange: #FF8C32;
    --pop-pink: #FF6B9D;
    --pop-cyan: #00D2D3;
    --pop-dark: #1A1A2E;
    --pop-white: #FFFDF7;
    --shadow-pop: 4px 4px 0px #1A1A2E;
    --shadow-pop-lg: 6px 6px 0px #1A1A2E;
    --shadow-pop-xl: 8px 8px 0px #1A1A2E;
    --border-thick: 3px solid #1A1A2E;
    --border-thicker: 4px solid #1A1A2E;
    --radius-pop: 16px;
    --radius-round: 50%;
    --font-display: 'Bangers', cursive;
    --font-body: 'Fredoka', sans-serif;
    --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--pop-yellow);
    color: var(--pop-dark);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* ---------- Halftone Background ---------- */
.halftone-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image: radial-gradient(circle, rgba(26,26,46,0.06) 1px, transparent 1px);
    background-size: 12px 12px;
}

/* ---------- Confetti Canvas ---------- */
#confettiCanvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* ---------- Pop Art Decorations ---------- */
.pop-decorations {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.pop-dot {
    position: absolute;
    border-radius: 50%;
    border: var(--border-thick);
    animation: floatDot 6s ease-in-out infinite;
}

@keyframes floatDot {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* ---------- Screen System ---------- */
.screen {
    display: none;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

.screen.active {
    display: flex;
    flex-direction: column;
    animation: screenIn 0.5s var(--transition-bounce);
}

@keyframes screenIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* ============================================
   SPLASH SCREEN
   ============================================ */
#splashScreen {
    background: linear-gradient(135deg, var(--pop-yellow) 0%, #FFF0B3 30%, var(--pop-yellow) 60%, #FFE082 100%);
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.splash-content {
    max-width: 500px;
    width: 100%;
}

.logo-container {
    position: relative;
    margin-bottom: 2rem;
}

.speech-bubble {
    position: relative;
    display: inline-block;
    background: var(--pop-red);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-pop);
    border: var(--border-thick);
    box-shadow: var(--shadow-pop);
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    transform: rotate(-8deg);
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 15px solid var(--pop-red);
}

.bounce-in {
    animation: bounceIn 1s var(--transition-bounce);
}

@keyframes bounceIn {
    0% { transform: rotate(-8deg) scale(0); }
    60% { transform: rotate(-8deg) scale(1.2); }
    100% { transform: rotate(-8deg) scale(1); }
}

.main-title {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.5rem;
}

.pop-text {
    font-family: var(--font-display);
    font-size: 3.5rem;
    letter-spacing: 4px;
    color: var(--pop-dark);
    text-shadow:
        3px 3px 0 var(--pop-red),
        6px 6px 0 rgba(255, 59, 92, 0.3);
    position: relative;
    display: inline-block;
}

.pop-text.glow {
    color: var(--pop-red);
    text-shadow:
        3px 3px 0 var(--pop-dark),
        0 0 20px rgba(255, 59, 92, 0.4);
}

.subtitle {
    font-family: var(--font-body);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--pop-blue);
    text-shadow: 2px 2px 0 rgba(77, 150, 255, 0.2);
}

/* Mascot */
.mascot-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.mascot {
    position: relative;
}

.mascot-body {
    font-size: 5rem;
    animation: mascotBounce 2s ease-in-out infinite;
    filter: drop-shadow(3px 3px 0 var(--pop-dark));
}

@keyframes mascotBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.mascot-shadow {
    width: 60px;
    height: 10px;
    background: rgba(26,26,46,0.15);
    border-radius: 50%;
    margin: 0 auto;
    animation: shadowPulse 2s ease-in-out infinite;
}

@keyframes shadowPulse {
    0%, 100% { transform: scaleX(1); opacity: 0.3; }
    50% { transform: scaleX(0.7); opacity: 0.15; }
}

.mascot-speech {
    background: white;
    color: var(--pop-dark);
    padding: 0.8rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 500;
    transform: rotate(3deg);
    line-height: 1.5;
    max-width: 180px;
}

.mascot-speech::after {
    border-top-color: white;
    left: 20%;
}

/* Start Button */
.btn-start {
    margin-top: 1rem;
}

.pop-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--pop-red), #FF6B6B);
    border: var(--border-thicker);
    border-radius: var(--radius-pop);
    box-shadow: var(--shadow-pop-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    text-decoration: none;
}

.pop-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0px #1A1A2E;
}

.pop-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #1A1A2E;
}

.pop-btn.small {
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
}

.pop-btn.secondary {
    background: linear-gradient(135deg, var(--pop-blue), #6DB3F2);
}

.btn-shine {
    position: absolute;
    top: -50%;
    left: -60%;
    width: 50%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: skewX(-25deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -60%; }
    30% { left: 120%; }
    100% { left: 120%; }
}

.stars-row {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.star-icon {
    font-size: 1.5rem;
    animation: starTwinkle 1.5s ease-in-out infinite;
}

.star-icon:nth-child(2) { animation-delay: 0.3s; }
.star-icon:nth-child(3) { animation-delay: 0.6s; }

@keyframes starTwinkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.3) rotate(20deg); opacity: 0.7; }
}

/* ============================================
   MAIN MENU
   ============================================ */
#mainMenu {
    background: linear-gradient(180deg, #FFF8E1 0%, var(--pop-yellow) 100%);
    padding-bottom: 2rem;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: white;
    border-bottom: var(--border-thicker);
    box-shadow: 0 4px 0 rgba(26,26,46,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-mascot {
    font-size: 1.8rem;
}

.header-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: 2px;
    color: var(--pop-dark);
}

.score-badge {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--pop-yellow);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    border: var(--border-thick);
    box-shadow: var(--shadow-pop);
    font-weight: 700;
    font-size: 1.1rem;
}

.score-badge.small {
    padding: 0.3rem 0.8rem;
    font-size: 0.95rem;
}

.score-icon {
    font-size: 1.2rem;
}

.menu-content {
    padding: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.menu-heading {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--pop-dark);
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.module-card {
    position: relative;
    padding: 1.5rem 1rem;
    border-radius: var(--radius-pop);
    border: var(--border-thicker);
    box-shadow: var(--shadow-pop-lg);
    cursor: pointer;
    transition: all 0.3s var(--transition-bounce);
    text-align: center;
    overflow: hidden;
}

.module-card:hover {
    transform: translate(-3px, -3px) rotate(-1deg);
    box-shadow: 10px 10px 0px #1A1A2E;
}

.module-card:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #1A1A2E;
}

.card-letters { background: linear-gradient(135deg, #FF9A9E, #FAD0C4); }
.card-words { background: linear-gradient(135deg, #A8EDEA, #FED6E3); }
.card-colors { background: linear-gradient(135deg, #FFECD2, #FCB69F); }
.card-numbers { background: linear-gradient(135deg, #D4FC79, #96E6A1); }
.card-quiz { background: linear-gradient(135deg, #C9D6FF, #E2E2E2); }
.card-animals { background: linear-gradient(135deg, #FDCBF1, #E6DEE9); }

.card-icon-wrap {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-round);
    background: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.8rem;
    border: var(--border-thick);
    box-shadow: 3px 3px 0 rgba(26,26,46,0.2);
}

.card-icon {
    font-size: 2rem;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 0.3rem;
}

.card-desc {
    font-size: 0.8rem;
    opacity: 0.7;
    font-weight: 500;
}

.card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--pop-dark);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    letter-spacing: 1px;
}

/* Pass mark on module cards */
.card-pass-mark {
    position: absolute;
    bottom: 6px;
    right: 6px;
    font-size: 1.2rem;
    line-height: 1;
}

.card-pass-mark.passed::after {
    content: '✅';
}

.halftone-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: radial-gradient(circle, rgba(26,26,46,0.04) 1px, transparent 1px);
    background-size: 8px 8px;
    pointer-events: none;
}

/* ============================================
   MODULE SCREENS - Common
   ============================================ */
.module-screen {
    background: linear-gradient(180deg, #FFF8E1 0%, var(--pop-yellow) 100%);
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: white;
    border-bottom: var(--border-thicker);
    box-shadow: 0 4px 0 rgba(26,26,46,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.btn-back {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-pop);
    border: var(--border-thick);
    background: var(--pop-yellow);
    box-shadow: var(--shadow-pop);
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-back:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #1A1A2E;
}

.module-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: 2px;
}

/* Challenge button in each module */
.challenge-btn {
    background: linear-gradient(135deg, var(--pop-orange), #FFB347) !important;
    margin-top: 1rem;
    font-size: 1.1rem;
    width: 100%;
    justify-content: center;
}

/* ============================================
   LETTERS MODULE
   ============================================ */
.letters-container {
    padding: 1.5rem;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.letter-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.letter-card-big {
    width: 200px;
    height: 200px;
    background: white;
    border-radius: 24px;
    border: var(--border-thicker);
    box-shadow: var(--shadow-pop-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s var(--transition-bounce);
    cursor: pointer;
}

.letter-card-big::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,59,92,0.1) 0%, transparent 70%);
}

.letter-card-big:hover {
    transform: scale(1.05) rotate(-2deg);
}

/* Uppercase + Lowercase side by side, equal size */
.letter-pair {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    z-index: 1;
}

.letter-upper-sub {
    font-family: var(--font-display);
    font-size: 6rem;
    color: var(--pop-red);
    line-height: 1;
    text-shadow: 3px 3px 0 rgba(255,59,92,0.2);
}

.letter-lower-main {
    font-family: var(--font-display);
    font-size: 6rem;
    color: var(--pop-blue);
    line-height: 1;
    text-shadow: 3px 3px 0 rgba(77,150,255,0.2);
}

.letter-word {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: white;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-pop);
    border: var(--border-thick);
    box-shadow: var(--shadow-pop);
}

.word-emoji {
    font-size: 2.5rem;
}

.word-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.word-text {
    font-family: var(--font-display);
    font-size: 1.8rem;
    letter-spacing: 2px;
    color: var(--pop-dark);
    line-height: 1.1;
}

.word-cn {
    font-size: 1rem;
    font-weight: 600;
    color: var(--pop-purple);
    line-height: 1.2;
}

.btn-speak {
    background: linear-gradient(135deg, var(--pop-green), #8DD97E) !important;
}

.letter-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.btn-arrow {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-pop);
    border: var(--border-thick);
    background: white;
    box-shadow: var(--shadow-pop);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-family: var(--font-body);
    font-weight: 700;
}

.btn-arrow:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #1A1A2E;
    background: var(--pop-yellow);
}

.letter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    flex: 1;
}

.letter-dot {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 2px solid var(--pop-dark);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 2px 2px 0 rgba(26,26,46,0.15);
}

.letter-dot:hover {
    background: var(--pop-yellow);
    transform: scale(1.1);
}

.letter-dot.active {
    background: var(--pop-red);
    color: white;
    transform: scale(1.15);
    box-shadow: 3px 3px 0 rgba(26,26,46,0.3);
}

/* ============================================
   WORDS MODULE
   ============================================ */
.words-container {
    padding: 1.5rem;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.word-flashcard {
    width: 280px;
    height: 320px;
    perspective: 1000px;
    cursor: pointer;
}

.flashcard-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.6s var(--transition-bounce);
    transform-style: preserve-3d;
}

.flashcard-inner.flipped {
    transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    border: var(--border-thicker);
    box-shadow: var(--shadow-pop-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.flashcard-front {
    background: linear-gradient(135deg, white, #FFF8E1);
}

.flashcard-back {
    background: linear-gradient(135deg, var(--pop-blue), #6DB3F2);
    transform: rotateY(180deg);
    color: white;
}

.flashcard-emoji {
    font-size: 5rem;
    filter: drop-shadow(3px 3px 0 rgba(26,26,46,0.1));
}

.flashcard-word {
    font-family: var(--font-display);
    font-size: 2.5rem;
    letter-spacing: 3px;
    color: var(--pop-dark);
}

.flashcard-chinese {
    font-size: 2.5rem;
    font-weight: 700;
}

.flashcard-phonetic {
    font-size: 1.2rem;
    opacity: 0.8;
}

.flip-hint {
    font-size: 0.85rem;
    color: rgba(26,26,46,0.5);
    font-weight: 500;
}

.word-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.word-controls .btn-arrow {
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.word-progress {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.progress-bar {
    flex: 1;
    height: 12px;
    background: white;
    border-radius: 10px;
    border: 2px solid var(--pop-dark);
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--pop-green), var(--pop-cyan));
    border-radius: 8px;
    transition: width 0.5s var(--transition-bounce);
    width: 8%;
}

.progress-text {
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* ============================================
   COLORS MODULE
   ============================================ */
.colors-container {
    padding: 1.5rem;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.color-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.color-blob {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: var(--border-thicker);
    box-shadow: var(--shadow-pop-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s var(--transition-bounce);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.color-blob::after {
    content: '';
    position: absolute;
    top: 15%;
    left: 20%;
    width: 30%;
    height: 20%;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
    transform: rotate(-30deg);
}

.color-blob:hover {
    transform: scale(1.1);
}

.color-name-en {
    font-family: var(--font-display);
    font-size: 2rem;
    color: white;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.3);
    letter-spacing: 3px;
    position: relative;
    z-index: 1;
}

.color-name-cn {
    font-size: 1.3rem;
    font-weight: 700;
}

.color-palette {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
}

.color-swatch {
    aspect-ratio: 1;
    border-radius: 16px;
    border: var(--border-thick);
    box-shadow: var(--shadow-pop);
    cursor: pointer;
    transition: all 0.3s var(--transition-bounce);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: white;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
    letter-spacing: 1px;
}

.color-swatch:hover {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 6px 6px 0 #1A1A2E;
}

.color-swatch.active {
    transform: scale(1.15);
    box-shadow: 6px 6px 0 #1A1A2E;
    outline: 3px solid white;
    outline-offset: 2px;
}

/* ============================================
   NUMBERS MODULE
   ============================================ */
.numbers-container {
    padding: 1.5rem;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.number-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.number-big {
    width: 180px;
    height: 180px;
    background: white;
    border-radius: 24px;
    border: var(--border-thicker);
    box-shadow: var(--shadow-pop-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--transition-bounce);
    cursor: pointer;
}

.number-big:hover {
    transform: scale(1.05) rotate(-3deg);
}

.number-digit {
    font-family: var(--font-display);
    font-size: 5rem;
    line-height: 1;
    color: var(--pop-purple);
    text-shadow: 3px 3px 0 rgba(155,93,229,0.2);
}

.number-en {
    font-family: var(--font-display);
    font-size: 2rem;
    letter-spacing: 3px;
    color: var(--pop-dark);
}

.number-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 250px;
}

.number-item {
    font-size: 2rem;
    animation: popIn 0.3s var(--transition-bounce) both;
}

@keyframes popIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.number-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    width: 100%;
}

.number-btn {
    aspect-ratio: 1;
    border-radius: 16px;
    border: var(--border-thick);
    background: white;
    box-shadow: var(--shadow-pop);
    font-family: var(--font-display);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s var(--transition-bounce);
    display: flex;
    align-items: center;
    justify-content: center;
}

.number-btn:hover {
    transform: scale(1.1);
    background: var(--pop-yellow);
}

.number-btn.active {
    background: var(--pop-purple);
    color: white;
    transform: scale(1.1);
    box-shadow: 5px 5px 0 #1A1A2E;
}

/* ============================================
   ANIMALS MODULE
   ============================================ */
.animals-container {
    padding: 1.5rem;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.animal-card-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 2rem;
    border-radius: 24px;
    border: var(--border-thicker);
    box-shadow: var(--shadow-pop-xl);
    width: 100%;
    max-width: 320px;
}

.animal-emoji-big {
    font-size: 6rem;
    animation: animalWiggle 3s ease-in-out infinite;
    filter: drop-shadow(3px 3px 0 rgba(26,26,46,0.1));
}

@keyframes animalWiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.animal-info {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.animal-name-en {
    font-family: var(--font-display);
    font-size: 2.5rem;
    letter-spacing: 3px;
    color: var(--pop-red);
}

.animal-name-cn {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--pop-dark);
}

.animal-sound {
    font-size: 1rem;
    color: var(--pop-blue);
    font-weight: 500;
    font-style: italic;
}

.animal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
}

.animal-btn {
    aspect-ratio: 1;
    border-radius: 16px;
    border: var(--border-thick);
    background: white;
    box-shadow: var(--shadow-pop);
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s var(--transition-bounce);
    display: flex;
    align-items: center;
    justify-content: center;
}

.animal-btn:hover {
    transform: scale(1.15) rotate(-5deg);
    background: #FFF0F0;
}

.animal-btn.active {
    background: var(--pop-pink);
    transform: scale(1.1);
    box-shadow: 5px 5px 0 #1A1A2E;
}

/* ============================================
   QUIZ MODULE (综合 + module quiz overlay)
   ============================================ */
.quiz-container {
    padding: 1.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.quiz-progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255,255,255,0.5);
    border-radius: 10px;
    border: 2px solid var(--pop-dark);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--pop-green), var(--pop-cyan));
    border-radius: 8px;
    transition: width 0.5s var(--transition-bounce);
    width: 0%;
}

.quiz-question-area {
    text-align: center;
    margin-bottom: 1.5rem;
}

.quiz-number {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--pop-purple);
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.quiz-emoji {
    font-size: 5rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(3px 3px 0 rgba(26,26,46,0.1));
    animation: quizItemPop 0.5s var(--transition-bounce);
}

@keyframes quizItemPop {
    from { transform: scale(0) rotate(-20deg); }
    to { transform: scale(1) rotate(0deg); }
}

.quiz-question {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--pop-dark);
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 1rem;
}

.quiz-option {
    padding: 1rem 1.5rem;
    background: white;
    border-radius: var(--radius-pop);
    border: var(--border-thick);
    box-shadow: var(--shadow-pop);
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.quiz-option:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #1A1A2E;
    background: var(--pop-yellow);
}

.quiz-option.correct {
    background: var(--pop-green) !important;
    color: white;
    animation: correctPulse 0.5s ease;
}

.quiz-option.wrong {
    background: var(--pop-red) !important;
    color: white;
    animation: wrongShake 0.5s ease;
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-10px); }
    80% { transform: translateX(10px); }
}

.quiz-feedback {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    min-height: 2rem;
    padding: 0.5rem;
}

/* ============================================
   CHALLENGE OVERLAY (shared by all modules)
   ============================================ */
.challenge-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(26,26,46,0.85);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    padding: 1rem;
}

.challenge-panel {
    background: white;
    border-radius: 24px;
    border: var(--border-thicker);
    box-shadow: var(--shadow-pop-xl);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    animation: resultBounce 0.5s var(--transition-bounce);
}

.challenge-header {
    background: linear-gradient(135deg, var(--pop-orange), #FFB347);
    padding: 1rem 1.5rem;
    border-bottom: var(--border-thicker);
}

.challenge-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: 2px;
    color: white;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
    display: block;
    margin-bottom: 0.5rem;
}

.challenge-progress-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.challenge-progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.4);
    border-radius: 10px;
    overflow: hidden;
}

.challenge-progress-fill {
    height: 100%;
    background: white;
    border-radius: 8px;
    transition: width 0.4s var(--transition-bounce);
    width: 0%;
}

.challenge-progress-text {
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    white-space: nowrap;
}

.challenge-body {
    padding: 1.5rem;
    text-align: center;
}

.challenge-prompt {
    margin-bottom: 1rem;
}

.challenge-prompt-emoji {
    display: block;
    font-size: 5rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(3px 3px 0 rgba(26,26,46,0.1));
    animation: quizItemPop 0.5s var(--transition-bounce);
}

.challenge-prompt-text {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--pop-dark);
}

.challenge-speak-btn {
    margin-bottom: 1rem;
}

.challenge-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 0.5rem;
}

.challenge-option {
    padding: 0.9rem 1.2rem;
    background: #FFF8E1;
    border-radius: var(--radius-pop);
    border: var(--border-thick);
    box-shadow: var(--shadow-pop);
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.challenge-option:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #1A1A2E;
    background: var(--pop-yellow);
}

.challenge-option.correct {
    background: var(--pop-green) !important;
    color: white;
    animation: correctPulse 0.5s ease;
}

.challenge-option.wrong {
    background: var(--pop-red) !important;
    color: white;
    animation: wrongShake 0.5s ease;
}

.challenge-feedback {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    min-height: 1.8rem;
    padding: 0.3rem;
}

/* ============================================
   RESULT OVERLAY
   ============================================ */
.quiz-result {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(26,26,46,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    animation: fadeIn 0.3s ease;
    padding: 1rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.result-content {
    background: white;
    padding: 2.5rem;
    border-radius: 24px;
    border: var(--border-thicker);
    box-shadow: var(--shadow-pop-xl);
    text-align: center;
    max-width: 350px;
    width: 90%;
    animation: resultBounce 0.5s var(--transition-bounce);
}

@keyframes resultBounce {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.result-emoji {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

.result-title {
    font-family: var(--font-display);
    font-size: 2rem;
    letter-spacing: 3px;
    color: var(--pop-red);
    margin-bottom: 0.5rem;
}

.result-score {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--pop-purple);
    margin-bottom: 0.5rem;
}

.result-stars {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.result-msg {
    font-weight: 600;
    color: var(--pop-dark);
    margin-bottom: 1.5rem;
}

.result-content .pop-btn {
    display: block;
    width: 100%;
    margin-bottom: 0.8rem;
    justify-content: center;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 420px) {
    .pop-text {
        font-size: 2.5rem;
    }
    
    .module-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .letter-card-big {
        width: 170px;
        height: 170px;
    }
    
    .letter-upper-sub,
    .letter-lower-main {
        font-size: 4.5rem;
    }
    
    .word-text {
        font-size: 1.4rem;
    }
    
    .color-blob {
        width: 140px;
        height: 140px;
    }
    
    .number-big {
        width: 150px;
        height: 150px;
    }
    
    .word-flashcard {
        width: 260px;
        height: 300px;
    }
    
    .mascot-body {
        font-size: 3.5rem;
    }
    
    .mascot-speech {
        font-size: 0.8rem;
        max-width: 150px;
    }
    
    .challenge-prompt-emoji {
        font-size: 4rem;
    }
    
    .challenge-option {
        font-size: 1.2rem;
        padding: 0.8rem 1rem;
    }
}

@media (min-width: 768px) {
    .pop-text {
        font-size: 4.5rem;
    }
    
    .module-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ---------- Utility Animations ---------- */
.shake {
    animation: wrongShake 0.5s ease;
}

.pulse {
    animation: correctPulse 0.5s ease;
}

/* Score animation */
.score-pop {
    animation: scorePop 0.5s var(--transition-bounce);
}

@keyframes scorePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); color: var(--pop-red); }
    100% { transform: scale(1); }
}

/* Celebration burst */
.celebration-burst {
    position: fixed;
    font-size: 2rem;
    pointer-events: none;
    z-index: 9998;
    animation: burstUp 1s ease-out forwards;
}

@keyframes burstUp {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-100px) scale(1.5); }
}
