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

body {
    font-family: "Comic Sans MS", "Chalkboard SE", "Arial Rounded MT Bold", cursive, sans-serif;
    background: linear-gradient(135deg, #ffd6e8 0%, #c7e5ff 50%, #fff5e6 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#app {
    width: 100%;
    max-width: 600px;
}

.screen {
    display: none;
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: fadeIn 0.4s ease;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Welcome Screen */
.welcome-container {
    text-align: center;
}

.rainbow-title {
    font-size: 3.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, #ff6b6b, #ffd93d, #6bcf7f, #4dabf7, #cc5de8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    animation: rainbow 3s ease infinite;
}

@keyframes rainbow {
    0%, 100% {
        filter: hue-rotate(0deg);
    }
    50% {
        filter: hue-rotate(20deg);
    }
}

.welcome-message {
    font-size: 1.3rem;
    color: #555;
    margin-bottom: 40px;
    line-height: 1.6;
}

.animal-friends {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 40px 0;
}

.animal {
    animation: bounce 2s ease infinite;
}

.animal:nth-child(2) {
    animation-delay: 0.2s;
}

.animal:nth-child(3) {
    animation-delay: 0.4s;
}

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

.animal-icon {
    font-size: 5rem;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.1));
}

.lion {
    animation: roar 3s ease infinite;
}

.elephant {
    animation: wiggle 3s ease infinite;
}

.giraffe {
    animation: stretch 3s ease infinite;
}

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

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

@keyframes stretch {
    0%, 100% {
        transform: scaleY(1);
    }
    50% {
        transform: scaleY(1.1);
    }
}

.button-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 40px;
}

.btn {
    padding: 18px 40px;
    font-size: 1.3rem;
    font-weight: bold;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #ff9a56, #ff6b6b);
    color: white;
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 107, 107, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    box-shadow: 0 8px 20px rgba(78, 205, 196, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(78, 205, 196, 0.4);
}

/* Back Button */
.back-btn {
    background: #f0f0f0;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1.1rem;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #e0e0e0;
    transform: translateX(-5px);
}

/* Level Screen */
h2 {
    color: #333;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 25px;
}

.progress-bar {
    width: 100%;
    height: 25px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 30px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #56ccf2, #2f80ed);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-weight: bold;
}

.level-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.level-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: inherit;
}

.level-card:hover:not(.completed):not(.locked) {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.level-card.completed {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.level-card.locked {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.level-emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.level-name {
    font-size: 1.1rem;
    font-weight: bold;
}

/* Learning Screen */
.level-header {
    text-align: center;
    margin-bottom: 30px;
}

#letterProgress {
    color: #666;
    font-size: 1.1rem;
}

.flashcard {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 25px;
    padding: 60px;
    text-align: center;
    margin: 30px 0;
    box-shadow: 0 15px 35px rgba(240, 147, 251, 0.3);
}

.letter {
    font-size: 8rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.emoji {
    font-size: 6rem;
    margin-bottom: 20px;
}

.word {
    font-size: 2.5rem;
    color: white;
    font-weight: bold;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.navigation .btn {
    flex: 1;
}

/* Quiz Screen */
.quiz-progress {
    text-align: center;
    margin-bottom: 30px;
}

#quizProgress {
    font-size: 1.2rem;
    color: #666;
}

.quiz-question {
    text-align: center;
}

.question-emoji {
    font-size: 6rem;
    margin: 30px 0;
}

#questionText {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 30px;
}

.options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
}

.option-btn {
    padding: 20px;
    font-size: 1.3rem;
    font-weight: bold;
    border: 3px solid #ddd;
    border-radius: 15px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.option-btn:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.option-btn.correct {
    background: #38ef7d;
    border-color: #11998e;
    color: white;
}

.option-btn.incorrect {
    background: #ff6b6b;
    border-color: #c92a2a;
    color: white;
}

.quiz-feedback {
    margin-top: 30px;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.quiz-feedback.correct {
    background: #d3f9d8;
    color: #2b8a3e;
}

.quiz-feedback.incorrect {
    background: #ffe0e0;
    color: #c92a2a;
}

/* Celebration Screen */
.celebration {
    text-align: center;
}

.celebration h1 {
    font-size: 8rem;
    margin-bottom: 20px;
}

.celebration h2 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 20px;
}

.celebration p {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Bonus Screen */
.bonus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.bonus-card {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: inherit;
}

.bonus-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(250, 112, 154, 0.4);
}

.bonus-emoji {
    font-size: 4rem;
    display: block;
    margin-bottom: 15px;
}

.bonus-word {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 600px) {
    .screen {
        padding: 25px;
    }

    .rainbow-title {
        font-size: 2.5rem;
    }

    .welcome-message {
        font-size: 1.1rem;
    }

    .animal-icon {
        font-size: 3.5rem;
    }

    .btn {
        padding: 15px 30px;
        font-size: 1.1rem;
    }

    .flashcard {
        padding: 40px 20px;
    }

    .letter {
        font-size: 5rem;
    }

    .emoji {
        font-size: 4rem;
    }

    .word {
        font-size: 1.8rem;
    }

    .options {
        grid-template-columns: 1fr;
    }

    .celebration h1 {
        font-size: 5rem;
    }

    .celebration h2 {
        font-size: 2rem;
    }
}