.home-screen,
.map-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 3vw, 40px);
}

.hero-panel {
    width: min(980px, 100%);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(227, 30, 36, 0.92), rgba(15, 27, 94, 0.95));
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: clamp(20px, 4vw, 40px);
}

.hero-title {
    text-align: center;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero-avatar {
    text-align: center;
    font-size: clamp(4rem, 10vw, 7rem);
    margin: 1rem 0;
}

.hero-button {
    width: clamp(160px, 26vw, 280px);
    min-height: 100px;
    border: none;
    border-radius: 26px;
    background: linear-gradient(180deg, #ffe35b 0%, #f6b516 100%);
    color: #1a1a1a;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.35);
}

.hero-button:hover {
    transform: translateY(-4px) scale(1.02);
}

.hero-button:active {
    transform: translateY(0) scale(0.98);
}

.hero-stars {
    text-align: center;
    margin-top: 1.5rem;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    font-weight: 700;
}

.map-path {
    display: grid;
    gap: 1rem;
}

.mission-card {
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.25);
    padding: clamp(16px, 2.5vw, 24px);
}

.mission-card h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.mission-icon { font-size: clamp(3rem, 6vw, 4.5rem); line-height: 1; margin-bottom: 0.5rem; }
.letter-model { display: flex; align-items: center; justify-content: center; gap: 1.5rem; padding: 0.75rem 2rem; border-radius: 28px; background: rgba(255,255,255,0.18); border: 4px solid #fff; }
.letter-model-big { font-size: clamp(4rem, 10vw, 7rem); font-weight: 800; color: #ffe066; }
.letter-model-pic { font-size: clamp(3rem, 8vw, 5rem); }
.letter-model-word { font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 700; }
.first-letter { color: #ffe066; font-size: 1.4em; font-weight: 800; }
.learn-card { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 1.5rem 3rem; border-radius: 36px; background: rgba(255,255,255,0.18); border: 5px solid #fff; user-select: none; }
.learn-letter { font-size: clamp(6rem, 18vw, 12rem); font-weight: 800; line-height: 1; color: #ffe066; }
.learn-pic { font-size: clamp(4rem, 10vw, 7rem); }
.learn-word { font-size: clamp(1.75rem, 4vw, 3rem); font-weight: 700; }
.mission-card.locked .mission-icon { filter: grayscale(1); opacity: 0.5; }
.mission-meta {
    margin-top: 0.5rem;
    font-size: clamp(1.2rem, 2.2vw, 1.8rem);
    font-weight: 700;
}

.mission-card.locked {
    opacity: 0.62;
}

.back-home {
    margin-top: 1.5rem;
    min-height: 70px;
    min-width: 170px;
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.75);
    background: transparent;
    color: #fff;
    font-size: clamp(1.1rem, 2.2vw, 1.5rem);
    font-weight: 700;
    cursor: pointer;
}
.play-screen { min-height: 100vh; padding: clamp(12px, 2vw, 32px); }
.game-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.game-header .back-home { margin-top: 0; }
.game-header-title { font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 800; }
.game-header-progress { font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 800; min-width: 170px; text-align: right; }
.mouse-area { position: relative; width: 100%; height: clamp(360px, 70vh, 800px); border-radius: 24px; background: rgba(255,255,255,0.1); border: 3px dashed rgba(255,255,255,0.4); overflow: hidden; }
.mouse-target { position: absolute; border: none; border-radius: 50%; background: radial-gradient(circle, #ff4b4b, #b00020); cursor: pointer; box-shadow: 0 0 25px rgba(255,80,80,0.8); line-height: 1; padding: 0; }
.quiz-area { display: flex; flex-direction: column; align-items: center; gap: clamp(16px, 4vh, 40px); padding-top: 2vh; }
.counting-objects { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.5rem 1.2rem; min-height: clamp(80px, 14vw, 180px); font-size: clamp(3rem, 8vw, 6rem); }
.counting-object { display: inline-block; }
.plus { font-weight: 800; }
.equation { font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 800; }
.answer-row { display: flex; gap: clamp(16px, 3vw, 40px); justify-content: center; flex-wrap: wrap; }
.answer-button { width: clamp(100px, 12vw, 170px); height: clamp(100px, 12vw, 170px); font-size: clamp(36px, 5vw, 72px); font-weight: 800; border-radius: 28px; border: 4px solid #fff; background: linear-gradient(180deg, #ff4b4b, #b00020); color: #fff; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.answer-button:hover:not(:disabled) { transform: translateY(-6px) scale(1.05); }
.answer-button:active:not(:disabled) { transform: scale(0.95); }
.answer-button:disabled { cursor: default; }
.answer-button.correct { background: linear-gradient(180deg, #4cd964, #1b8a2f); box-shadow: 0 0 35px #4cd964; animation: pulse 0.6s ease-in-out infinite; }
.answer-button.wrong { background: linear-gradient(180deg, #8a8fb0, #565a78); }
.feedback { min-height: 4rem; font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; }
.feedback.good { color: #7dff8f; }
.feedback.retry { color: #ffd54a; }
.result-overlay { position: fixed; inset: 0; background: rgba(5,8,20,0.85); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.result-card { text-align: center; padding: clamp(24px, 4vw, 56px); border-radius: 28px; background: linear-gradient(145deg, #e31e24, #0f1b5e); border: 3px solid #fff; }
.result-card h2 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; }
.result-stars { font-size: clamp(3rem, 8vw, 6rem); margin: 1rem 0; }
.star-empty { opacity: 0.5; }
.result-buttons { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; }
.speak-button { font-size: 0.6em; min-width: 80px; min-height: 80px; border-radius: 50%; border: 3px solid #fff; background: #1d3fa8; cursor: pointer; vertical-align: middle; }
.drop-target { position: relative; width: clamp(140px, 16vw, 220px); height: clamp(140px, 16vw, 220px); border: 5px dashed #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: clamp(3rem, 7vw, 5rem); font-weight: 800; background: rgba(255,255,255,0.12); transition: transform 0.2s, background 0.2s; }
.drop-target.over { transform: scale(1.1); background: rgba(255,255,255,0.3); }
.drop-target.correct { border-color: #4cd964; box-shadow: 0 0 35px #4cd964; }
.drop-web { position: absolute; opacity: 0.35; font-size: 1.4em; }
.drop-value { position: relative; }
.drag-chip { display: flex; align-items: center; justify-content: center; cursor: grab; user-select: none; }
.drag-chip.disabled { cursor: default; opacity: 0.7; }
.boss-row { display: flex; align-items: center; justify-content: center; gap: clamp(12px, 4vw, 60px); width: 100%; }
.fighter { text-align: center; }
.fighter-icon { font-size: clamp(4rem, 10vw, 8rem); line-height: 1; }
.hearts { font-size: clamp(1.2rem, 2.5vw, 2rem); }
.web-line { flex: 1; max-width: 360px; height: 6px; background: #fff; border-radius: 3px; transform-origin: left; transform: scaleX(0); }
.web-line.web-fire { animation: web-shot 0.5s ease-out both; }
.boss-hit { animation: boss-hit 0.6s ease-in-out; }
.bounce-once { animation: bounce 0.6s ease-in-out; }
.reward-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.reward-card { text-align: center; border-radius: 18px; padding: 1.2rem; background: rgba(255,255,255,0.12); border: 2px solid rgba(255,255,255,0.25); }
.reward-card.unlocked { background: rgba(255,215,0,0.25); border-color: gold; }
.reward-card.locked { opacity: 0.65; }
.reward-icon { font-size: clamp(3rem, 6vw, 5rem); }
.reward-name { font-size: clamp(1.2rem, 2.2vw, 1.8rem); font-weight: 800; }
.reward-unlocked { font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 800; color: gold; margin-bottom: 1rem; }

.theme-spider { --t-primary: #e31e24; --t-secondary: #0f1b5e; --t-glow: #2f4fb3; --t-mid: #09112f; --t-dark: #050814; --t-btn-a: #ff4b4b; --t-btn-b: #b00020; }
.theme-hulk { --t-primary: #2e9e3a; --t-secondary: #4b2a7a; --t-glow: #5a2d91; --t-mid: #1a0d2e; --t-dark: #07120a; --t-btn-a: #8e4fd1; --t-btn-b: #5a2d91; }
.theme-captain { --t-primary: #1b4fbf; --t-secondary: #b3122b; --t-glow: #1b4fbf; --t-mid: #0a1230; --t-dark: #050a1a; --t-btn-a: #2f6de0; --t-btn-b: #123a8f; }
.theme-flash { --t-primary: #d7191c; --t-secondary: #c98a00; --t-glow: #a31214; --t-mid: #2a0707; --t-dark: #140404; --t-btn-a: #ff3b3b; --t-btn-b: #a30d10; }
.hero-panel, .result-card { background: linear-gradient(145deg, var(--t-primary), var(--t-secondary)); }
.answer-button { background: linear-gradient(180deg, var(--t-btn-a), var(--t-btn-b)); }
.answer-button.correct { background: linear-gradient(180deg, #4cd964, #1b8a2f); }
.answer-button.wrong { background: linear-gradient(180deg, #8a8fb0, #565a78); }
.mouse-target { background: radial-gradient(circle, var(--t-btn-a), var(--t-btn-b)); box-shadow: 0 0 25px var(--t-btn-a); }
.theme-img { width: 1em; height: 1em; object-fit: contain; }
.theme-picker { display: flex; justify-content: center; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }
.theme-option { width: clamp(100px, 8vw, 120px); height: clamp(100px, 8vw, 120px); font-size: clamp(2.5rem, 4vw, 3.5rem); border-radius: 50%; border: 4px solid rgba(255,255,255,0.5); background: rgba(0,0,0,0.3); cursor: pointer; transition: transform 0.2s; }
.theme-option:hover { transform: scale(1.1); }
.theme-option.selected { border-color: #ffe35b; box-shadow: 0 0 20px #ffe35b; }
.hero-avatar .theme-img { width: auto; height: clamp(180px, 30vh, 320px); max-width: 100%; border-radius: 24px; border: 4px solid rgba(255,255,255,0.6); box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.theme-option { overflow: hidden; padding: 0; }
.theme-option .theme-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* Typing game */
.typing-area { position: relative; z-index: 1; }
.falling-items { display: flex; align-items: center; justify-content: center; gap: 1.5rem; flex-wrap: wrap; min-height: 6rem; }
.falling-group { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: center; }
.falling-item { font-size: clamp(2rem, 6vw, 3.5rem); display: inline-block; opacity: 0; animation: fall-in 0.9s cubic-bezier(0.3, 0.9, 0.4, 1.2) forwards; }
@keyframes fall-in {
    0% { transform: translateY(-60vh) rotate(-30deg); opacity: 0; }
    20% { opacity: 1; }
    100% { transform: translateY(0) rotate(0); opacity: 1; }
}
.typing-row { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1rem 0; }
.typing-input { width: 7rem; height: 5.5rem; font-size: 3.5rem; font-weight: 800; text-align: center; border-radius: 1.2rem; border: 4px solid #fff; background: rgba(255, 255, 255, 0.95); color: #1b2a6b; outline: none; }
.typing-input:focus { box-shadow: 0 0 0 6px rgba(255, 215, 0, 0.6); }
.typing-input.correct { background: #b9f6ca; border-color: #00c853; }
.typing-input.wrong { background: #ffcdd2; border-color: #d50000; }
.typing-submit { width: 5.5rem; height: 5.5rem; font-size: 2.5rem; }
.star-rain { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.rain-star { position: absolute; top: -3rem; font-size: 1.8rem; opacity: 0.55; animation: rain-fall linear infinite; }
@keyframes rain-fall {
    0% { transform: translateY(-3rem) rotate(0); }
    100% { transform: translateY(110vh) rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
    .falling-item { animation: none; opacity: 1; }
    .rain-star { animation: none; display: none; }
}
