* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
}

:root {
    --primary: #FF6B6B;
    --secondary: #4ECDC4;
    --accent: #FFE66D;
    --math-color: #FF8C42;
    --chinese-color: #6B5B95;
    --english-color: #88D8B0;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    min-height: 100vh;
    background: var(--bg-gradient);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#app {
    width: 100%;
    max-width: 900px;
    min-height: 600px;
    position: relative;
}

.screen {
    display: none;
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hidden {
    display: none;
}

.login-container {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.login-container h1 {
    color: #333;
    font-size: 2.2em;
    margin-bottom: 10px;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.form-box {
    background: #f8f8f8;
    border-radius: 20px;
    padding: 30px;
}

.form-box h2 {
    color: #333;
    margin-bottom: 20px;
}

.form-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 1.1em;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-hint {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.pet-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.mini-pet {
    font-size: 3em;
    padding: 15px 20px;
    background: white;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.mini-pet:hover,
.mini-pet.selected {
    transform: scale(1.1);
    border-color: var(--accent);
    box-shadow: 0 5px 15px rgba(255, 230, 109, 0.4);
}

.pet-preview {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.pet-preview h3 {
    color: #333;
    margin-bottom: 10px;
}

.pet-preview h4 {
    color: #666;
    margin-top: 15px;
    margin-bottom: 10px;
}

.pet-info-name {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 8px;
}

.pet-info-desc {
    color: #666;
    font-size: 0.95em;
    line-height: 1.5;
}

.pet-stages {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 10px;
}

.stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 10px;
    min-width: 70px;
}

.stage-emoji {
    font-size: 2em;
    margin-bottom: 5px;
}

.stage-name {
    font-size: 0.75em;
    color: #666;
}

.form-link {
    margin-top: 15px;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.9em;
}

.form-link:hover {
    text-decoration: underline;
}

#main-game {
    min-height: 650px;
    display: flex;
    flex-direction: column;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px dashed #eee;
    flex-wrap: wrap;
    gap: 10px;
}

.pet-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pet-name {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

.level-badge {
    background: linear-gradient(135deg, var(--accent), #FFA500);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
}

.exp-bar-container {
    flex: 1;
    max-width: 200px;
    margin: 0 20px;
    position: relative;
    height: 20px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
}

.exp-bar {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 10px;
}

.exp-text {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75em;
    color: #666;
}

.btn-secondary {
    background: #ddd;
    color: #333;
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #ccc;
}

.game-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.pet-area {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.pet-container {
    flex: 1;
    min-height: 280px;
    background: linear-gradient(180deg, #87CEEB 0%, #98FB98 100%);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pet-talk-btn {
    position: absolute;
    bottom: 80px;
    right: 20px;
    font-size: 2em;
    background: white;
    border: none;
    border-radius: 50%;
    padding: 10px 15px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.pet-talk-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.pet-talk-btn:active {
    transform: scale(0.95);
}

.greeting-bubble {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    opacity: 0;
    animation: greetingFade 4s ease-in-out;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    max-width: 80%;
    text-align: center;
}

.greeting-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px;
    border-style: solid;
    border-color: white transparent transparent transparent;
}

@keyframes greetingFade {
    0% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    20% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

.pet-sprite {
    font-size: 10em;
    position: relative;
    z-index: 2;
    animation: idle 2s ease-in-out infinite;
    transition: transform 0.3s ease;
}

@keyframes idle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.dog-idle {
    animation: dogIdle 1.5s ease-in-out infinite;
}

@keyframes dogIdle {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(-3deg); }
    75% { transform: translateY(-5px) rotate(3deg); }
}

.cat-idle {
    animation: catIdle 2s ease-in-out infinite;
}

@keyframes catIdle {
    0%, 100% { transform: translateY(0) scaleY(1); }
    50% { transform: translateY(-8px) scaleY(0.95); }
}

.parrot-idle {
    animation: parrotIdle 1s ease-in-out infinite;
}

@keyframes parrotIdle {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

.dinosaur-idle {
    animation: dinosaurIdle 3s ease-in-out infinite;
}

@keyframes dinosaurIdle {
    0%, 100% { transform: translateY(0) scaleX(1); }
    50% { transform: translateY(-5px) scaleX(0.98); }
}

.pig-idle {
    animation: pigIdle 1.8s ease-in-out infinite;
}

@keyframes pigIdle {
    0%, 100% { transform: translateY(0) scale(1); }
    30% { transform: translateY(-6px) scale(1.05); }
    60% { transform: translateY(0) scale(0.98); }
}

.robot-idle {
    animation: robotIdle 2.5s steps(2) infinite;
}

@keyframes robotIdle {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-3px) rotate(-2deg); }
    75% { transform: translateY(-3px) rotate(2deg); }
}

.pet-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4em;
    z-index: 3;
    opacity: 0;
    pointer-events: none;
}

.pet-effect.eating {
    animation: eatingEffect 1s ease forwards;
}

@keyframes eatingEffect {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    30% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
    100% { opacity: 0; transform: translate(-50%, -80%) scale(1); }
}

.pet-effect.drinking {
    animation: drinkingEffect 1s ease forwards;
}

@keyframes drinkingEffect {
    0% { opacity: 0; transform: translate(-50%, -50%); }
    30% { opacity: 1; transform: translate(-30%, -60%); }
    60% { opacity: 1; transform: translate(-70%, -60%); }
    100% { opacity: 0; transform: translate(-50%, -80%); }
}

.pet-effect.playing {
    animation: playingEffect 1s ease forwards;
}

@keyframes playingEffect {
    0% { opacity: 0; transform: translate(-50%, -50%) rotate(0deg); }
    25% { opacity: 1; transform: translate(-50%, -50%) rotate(15deg); }
    50% { transform: translate(-50%, -50%) rotate(-15deg); }
    75% { transform: translate(-50%, -50%) rotate(15deg); }
    100% { opacity: 0; transform: translate(-50%, -50%) rotate(0deg); }
}

.mood-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2em;
    z-index: 5;
    transition: all 0.3s ease;
}

.pet-sprite.happy {
    animation: happy 0.5s ease infinite;
}

@keyframes happy {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(5deg); }
}

.pet-sprite.sad {
    animation: sad 2s ease infinite;
    filter: grayscale(30%);
}

@keyframes sad {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

.pet-sprite.eating-anim {
    animation: eatingAnim 0.6s ease;
}

@keyframes eatingAnim {
    0% { transform: scale(1); }
    30% { transform: scale(1.15) rotate(-5deg); }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.pet-sprite.drinking-anim {
    animation: drinkingAnim 0.8s ease;
}

@keyframes drinkingAnim {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-15deg); }
    100% { transform: rotate(0deg); }
}

.pet-sprite.playing-anim {
    animation: playingAnim 0.6s ease;
}

@keyframes playingAnim {
    0% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-30px) rotate(10deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(-20px) rotate(-10deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

/* ========== 各宠物专属动作动画 ========== */

/* --- 喂食动画差异 --- */
.pet-sprite.dog-eating { animation: dogEat 0.4s ease; }
@keyframes dogEat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2) rotate(-5deg); }
    50% { transform: scale(1.15) rotate(3deg); }
    75% { transform: scale(1.1); }
}

.pet-sprite.cat-eating { animation: catEat 0.7s ease; }
@keyframes catEat {
    0%, 100% { transform: scale(1); }
    20% { transform: scale(1.05) translateY(-3px); }
    40% { transform: scale(1.08); }
    60% { transform: scale(1.05) translateY(-1px); }
    80% { transform: scale(1.02); }
}

.pet-sprite.parrot-eating { animation: parrotEat 0.3s steps(3); }
@keyframes parrotEat {
    0% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-8px) rotate(-10deg); }
    66% { transform: translateY(-5px) rotate(5deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

.pet-sprite.dinosaur-eating { animation: dinosaurEat 0.5s ease; }
@keyframes dinosaurEat {
    0%, 100% { transform: scale(1); }
    40% { transform: scale(1.25) rotate(3deg); }
    70% { transform: scale(1.1) rotate(-2deg); }
}

.pet-sprite.pig-eating { animation: pigEat 0.35s ease; }
@keyframes pigEat {
    0%, 100% { transform: scale(1); }
    30% { transform: scale(1.15) translateY(-5px); }
    60% { transform: scale(1.1); }
    80% { transform: scale(1.05) translateY(-2px); }
}

.pet-sprite.robot-eating { animation: robotEat 0.8s steps(4); }
@keyframes robotEat {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(5deg); }
    50% { transform: scale(1.15) rotate(0deg); }
    75% { transform: scale(1.1) rotate(-5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* --- 喂水动画差异 --- */
.pet-sprite.dog-drinking { animation: dogDrink 0.6s ease; }
@keyframes dogDrink {
    0%, 100% { transform: rotate(0deg); }
    30% { transform: rotate(-8deg) translateY(-3px); }
    70% { transform: rotate(5deg); }
}

.pet-sprite.cat-drinking { animation: catDrink 1s ease; }
@keyframes catDrink {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-5deg); }
}

.pet-sprite.parrot-drinking { animation: parrotDrink 0.5s ease; }
@keyframes parrotDrink {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    30% { transform: rotate(-20deg) translateY(-10px); }
    70% { transform: rotate(0deg) translateY(-5px); }
}

.pet-sprite.dinosaur-drinking { animation: dinosaurDrink 0.7s ease; }
@keyframes dinosaurDrink {
    0%, 100% { transform: rotate(0deg) scale(1); }
    40% { transform: rotate(-12deg) scale(1.05); }
    80% { transform: rotate(5deg) scale(1.02); }
}

.pet-sprite.pig-drinking { animation: pigDrink 0.4s ease; }
@keyframes pigDrink {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-6deg) scale(1.08); }
    50% { transform: rotate(3deg) scale(1.05); }
    75% { transform: rotate(-4deg) scale(1.08); }
}

.pet-sprite.robot-drinking { animation: robotDrink 0.9s steps(3); }
@keyframes robotDrink {
    0% { transform: rotate(0deg); }
    33% { transform: rotate(-15deg); }
    66% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

/* --- 玩耍动画差异 --- */
.pet-sprite.dog-playing { animation: dogPlay 0.5s ease; }
@keyframes dogPlay {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    20% { transform: translateY(-35px) rotate(15deg); }
    40% { transform: translateY(0) rotate(-10deg); }
    60% { transform: translateY(-25px) rotate(5deg); }
    80% { transform: translateY(0) rotate(-5deg); }
}

.pet-sprite.cat-playing { animation: catPlay 0.7s ease; }
@keyframes catPlay {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    30% { transform: translateY(-20px) rotate(5deg) scaleX(-1); }
    60% { transform: translateY(0) rotate(-5deg) scaleX(-1); }
    80% { transform: translateY(-15px) rotate(0deg) scaleX(1); }
}

.pet-sprite.parrot-playing { animation: parrotPlay 0.4s ease; }
@keyframes parrotPlay {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-40px) rotate(8deg); }
    50% { transform: translateY(-10px) rotate(-8deg); }
    75% { transform: translateY(-30px) rotate(4deg); }
}

.pet-sprite.dinosaur-playing { animation: dinosaurPlay 0.6s ease; }
@keyframes dinosaurPlay {
    0%, 100% { transform: translateY(0) scaleX(1); }
    30% { transform: translateY(-25px) scaleX(1.05); }
    60% { transform: translateY(0) scaleX(0.98); }
    85% { transform: translateY(-15px) scaleX(1.02); }
}

.pet-sprite.pig-playing { animation: pigPlay 0.45s ease; }
@keyframes pigPlay {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
    25% { transform: translateY(-25px) rotate(-8deg) scale(1.1); }
    50% { transform: translateY(0) rotate(5deg) scale(1); }
    75% { transform: translateY(-20px) rotate(-3deg) scale(1.05); }
}

.pet-sprite.robot-playing { animation: robotPlay 0.7s steps(4); }
@keyframes robotPlay {
    0% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-25px) rotate(15deg); }
    50% { transform: translateY(-15px) rotate(-15deg); }
    75% { transform: translateY(-20px) rotate(0deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

.stats-panel {
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f5f5f5;
    padding: 12px 15px;
    border-radius: 15px;
}

.stat-icon {
    font-size: 1.5em;
}

.stat-label {
    width: 60px;
    font-size: 0.9em;
    color: #666;
}

.stat-bar-container {
    flex: 1;
    height: 15px;
    background: #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.stat-bar {
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 8px;
}

.hunger-bar {
    background: linear-gradient(90deg, #FF6B6B, #FF8E53);
}

.thirst-bar {
    background: linear-gradient(90deg, #4ECDC4, #45B7D1);
}

.mood-bar {
    background: linear-gradient(90deg, #FFE66D, #FFD93D);
}

.stat-value {
    width: 45px;
    text-align: right;
    font-size: 0.85em;
    color: #333;
    font-weight: bold;
}

.activity-area {
    text-align: center;
}

.activity-area h2 {
    color: #333;
    margin-bottom: 8px;
}

.activity-hint {
    color: #888;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.activity-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.activity-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 30px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.activity-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.activity-icon {
    font-size: 2.5em;
}

.activity-name {
    font-size: 1.2em;
    font-weight: bold;
    color: white;
}

.activity-effect {
    font-size: 0.85em;
    opacity: 0.9;
}

.math-btn {
    background: linear-gradient(135deg, var(--math-color), #FF6B35);
}

.chinese-btn {
    background: linear-gradient(135deg, var(--chinese-color), #8B7BA8);
}

.english-btn {
    background: linear-gradient(135deg, var(--english-color), #6BC5A0);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 100;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 25px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #FF8E8E);
    color: white;
    border: none;
    padding: 15px 50px;
    border-radius: 15px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.quiz-type-icon {
    font-size: 2.5em;
}

.quiz-header h2 {
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #333;
}

.quiz-question {
    font-size: 1.8em;
    text-align: center;
    padding: 25px;
    background: #f8f8f8;
    border-radius: 15px;
    margin-bottom: 25px;
    color: #333;
    min-height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.speaker-btn {
    font-size: 0.8em;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.speaker-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.speaker-btn:active {
    transform: scale(0.95);
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.quiz-option {
    padding: 18px;
    border: 2px solid #ddd;
    border-radius: 15px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    text-align: center;
}

.quiz-option:hover {
    border-color: var(--primary);
    background: #fff5f5;
}

.quiz-option.correct {
    border-color: #4CAF50;
    background: #E8F5E9;
    animation: correctPulse 0.5s ease;
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.quiz-option.wrong {
    border-color: #f44336;
    background: #FFEBEE;
    animation: wrongShake 0.5s ease;
}

@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.quiz-option:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.quiz-feedback {
    text-align: center;
    font-size: 1.2em;
    padding: 15px;
    border-radius: 10px;
    display: none;
}

.quiz-feedback.show {
    display: block;
}

.quiz-feedback.correct {
    background: #E8F5E9;
    color: #4CAF50;
}

.quiz-feedback.wrong {
    background: #FFEBEE;
    color: #f44336;
}

.quiz-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 2px solid #eee;
    color: #666;
    font-size: 0.95em;
}

.action-box {
    text-align: center;
}

.action-header h2 {
    color: #333;
    margin-bottom: 20px;
}

.action-animation {
    font-size: 8em;
    margin: 30px 0;
    animation: actionBounce 1s ease infinite;
}

@keyframes actionBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.action-message {
    font-size: 1.3em;
    color: #666;
    margin-bottom: 25px;
}

.levelup-box {
    text-align: center;
}

.levelup-animation {
    font-size: 5em;
    animation: celebrate 1s ease infinite;
}

@keyframes celebrate {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(10deg); }
}

.levelup-box h2 {
    color: #333;
    font-size: 2em;
    margin: 15px 0;
}

.levelup-box p {
    color: #666;
    margin-bottom: 25px;
    font-size: 1.1em;
}

.levelup-pet {
    font-size: 6em;
    margin: 20px 0;
    animation: levelUpPet 1.5s ease infinite;
}

@keyframes levelUpPet {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.3); }
}

.cloud {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    animation: floatCloud 15s linear infinite;
}

.cloud::before, .cloud::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 50%;
}

.cloud-1 {
    width: 80px;
    height: 40px;
    top: 15%;
    left: -80px;
    animation-duration: 18s;
}

.cloud-1::before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 15px;
}

.cloud-1::after {
    width: 35px;
    height: 35px;
    top: -15px;
    left: 50px;
}

.cloud-2 {
    width: 60px;
    height: 30px;
    top: 8%;
    left: -60px;
    animation-duration: 12s;
    animation-delay: 5s;
}

.cloud-2::before {
    width: 35px;
    height: 35px;
    top: -18px;
    left: 10px;
}

.cloud-2::after {
    width: 25px;
    height: 25px;
    top: -10px;
    left: 35px;
}

.cloud-3 {
    width: 70px;
    height: 35px;
    top: 20%;
    left: -70px;
    animation-duration: 20s;
    animation-delay: 10s;
}

.cloud-3::before {
    width: 45px;
    height: 45px;
    top: -22px;
    left: 12px;
}

.cloud-3::after {
    width: 30px;
    height: 30px;
    top: -12px;
    left: 45px;
}

@keyframes floatCloud {
    from { transform: translateX(0); }
    to { transform: translateX(calc(100vw + 150px)); }
}

.ground {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg, #90EE90 0%, #228B22 100%);
    border-radius: 0 0 20px 20px;
}

.ground::before {
    content: '🌱🌿🌱🌿🌱🌿🌱';
    position: absolute;
    top: -15px;
    left: 10%;
    font-size: 1.2em;
    letter-spacing: 20px;
}

@media (max-width: 768px) {
    .pet-area {
        flex-direction: column;
    }

    .stats-panel {
        width: 100%;
    }

    .activity-buttons {
        flex-direction: column;
        align-items: center;
    }

    .game-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .exp-bar-container {
        order: 3;
        max-width: 100%;
        width: 100%;
        margin: 10px 0;
    }

    .pet-selector {
        flex-wrap: wrap;
    }

    .pet-sprite {
        font-size: 7em;
    }

    .pet-stages {
        gap: 5px;
    }

    .stage {
        min-width: 55px;
        padding: 8px 5px;
    }

    .stage-emoji {
        font-size: 1.5em;
    }

    .stage-name {
        font-size: 0.65em;
    }
}