@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Quicksand:wght@500;700&display=swap');

:root {
    --primary: #4f46e5;
    --secondary: #ec4899;
    --accent: #fbbf24;
    --dark: #1e1b4b;
    --bg-color-1: #2e1065;
    --bg-color-2: #0f172a;
}

.audio-toggle {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 60;
    padding: 0.55rem 0.8rem;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: #fde68a;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, background 0.2s ease;
}
.audio-toggle:hover { background: rgba(30, 41, 59, 0.95); transform: translateY(-2px); }
.audio-toggle:focus-visible { outline: 3px solid #fbbf24; outline-offset: 3px; }
.audio-toggle-sprite { display: block; width: 1.55rem; height: 1.55rem; object-fit: contain; }
.map-back-toggle, .battle-exit-toggle { position: absolute; top: .75rem; right: 4.7rem; z-index: 60; display: inline-flex; align-items: center; justify-content: center; min-height: 2.65rem; padding: .45rem .7rem; border: 2px solid rgba(196,181,253,.9); border-radius: 999px; color: #fff; background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%); box-shadow: 0 4px 0 #312e81, 0 0 16px rgba(99,102,241,.5); font-size: .62rem; font-weight: 900; letter-spacing: .06em; transition: transform .2s ease, filter .2s ease, box-shadow .2s ease; }
.map-back-toggle { width: 2.65rem; padding: .45rem; }
.battle-exit-toggle.hidden { display: none; }
.map-back-toggle.hidden { display: none; }
.map-back-toggle > span, .battle-exit-toggle > span:first-child { font-size: 1.25rem; line-height: .8; }
.map-back-toggle:hover, .battle-exit-toggle:hover { filter: brightness(1.15); transform: translateY(-2px); box-shadow: 0 6px 0 #312e81, 0 0 22px rgba(99,102,241,.7); }
.map-back-toggle:active, .battle-exit-toggle:active { transform: translateY(2px); box-shadow: 0 2px 0 #312e81; }
.map-back-toggle:focus-visible, .battle-exit-toggle:focus-visible { outline: 3px solid #fbbf24; outline-offset: 3px; }

body {
    font-family: 'Quicksand', sans-serif;
    background-color: #0f172a;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    overflow-x: hidden;
    overflow-y: auto;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#screen-map,
#screen-battle {
    max-height: 100vh;
    overflow-y: auto;
    padding-top: 3.5rem;
    padding-bottom: 2rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.45) rgba(15, 23, 42, 0.35);
}

.battle-hud {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: .85rem;
    margin: 0 0 1rem;
    padding: .7rem;
    overflow: hidden;
    border: 1px solid rgba(147, 197, 253, .28);
    border-radius: 1.15rem;
    background: linear-gradient(135deg, rgba(15,23,42,.92), rgba(30,27,75,.82) 48%, rgba(49,46,129,.78));
    box-shadow: 0 10px 28px rgba(2,6,23,.34), inset 0 1px 0 rgba(255,255,255,.12);
    backdrop-filter: blur(10px);
}
.battle-hud::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(125,211,252,.12), transparent); transform: translateX(-100%); animation: hud-sheen 7s ease-in-out infinite; }
.hud-stat { position: relative; z-index: 1; min-width: 0; padding: .45rem .65rem; border: 1px solid rgba(255,255,255,.1); border-radius: .85rem; background: rgba(15,23,42,.42); }
.hud-score { text-align: right; }
.hud-biome {
    position: relative;
    z-index: 1;
    min-width: clamp(7.5rem, 24vw, 11rem);
    padding: .55rem .85rem;
    border: 1px solid rgba(251,191,36,.42);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(30,64,175,.55), rgba(124,58,237,.46));
    box-shadow: 0 0 18px rgba(96,165,250,.18), inset 0 1px 0 rgba(255,255,255,.14);
    text-align: center;
}
.hud-title { display: flex; align-items: center; gap: .4rem; color: #fde68a; font-size: .58rem; font-weight: 900; letter-spacing: .08em; }
.hud-title strong { margin-left: auto; color: #fff7ed; font-size: 1.05rem; text-shadow: 0 2px 0 #92400e; }
.hud-score .hud-title { justify-content: flex-end; color: #f9a8d4; }
.hud-badge { display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; border: 1px solid rgba(253,230,138,.7); border-radius: .4rem; color: #1e1b4b; background: linear-gradient(135deg, #fef08a, #f59e0b); font-size: .52rem; letter-spacing: 0; box-shadow: 0 0 10px rgba(251,191,36,.35); }
.hud-badge-score { border-color: rgba(249,168,212,.75); color: #4a044e; background: linear-gradient(135deg, #f9a8d4, #c084fc); }
.hud-value { margin-top: .05rem; color: #fff7ed; font-size: 1.35rem; font-weight: 900; line-height: 1; text-shadow: 0 2px 0 #312e81, 0 0 12px rgba(192,132,252,.45); }
.hud-biome-kicker { display: block; margin-bottom: .2rem; color: #bfdbfe; font-size: .48rem; font-weight: 900; letter-spacing: .16em; }
.hud-biome #biome-name { display: block; color: #fff; font-size: .62rem; letter-spacing: .1em; text-shadow: 0 2px 0 rgba(30,64,175,.8); }
.hud-caption { display: block; margin-top: .3rem; color: #93c5fd; font-size: .48rem; font-weight: 900; letter-spacing: .1em; }
@keyframes hud-sheen { 0%, 55%, 100% { transform: translateX(-100%); } 75% { transform: translateX(100%); } }
.hud-caption { display: block; margin-top: 0.2rem; color: #93c5fd; font-size: 0.55rem; font-weight: 800; letter-spacing: 0.08em; }
.xp-track {
    position: relative;
    display: flex;
    align-items: center;
    width: min(13rem, 30vw);
    height: 1.45rem;
    margin-top: 0.35rem;
    padding: 0.38rem 1.65rem;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent url('assets/ui/xp-progress-frame.png') center / 100% 100% no-repeat;
}
.xp-track::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: url('assets/ui/xp-progress-frame.png') center / 100% 100% no-repeat;
}
.xp-fill {
    position: relative;
    z-index: 1;
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #38bdf8, #818cf8 55%, #c4b5fd);
    box-shadow: 0 0 8px rgba(129, 140, 248, .85);
    transition: width 0.3s ease;
}
.battle-arena {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    gap: 1rem;
    min-height: 15rem;
    margin-bottom: 1rem;
    padding: 1rem 0.75rem 0.5rem;
    border-radius: 1.25rem;
    background: linear-gradient(180deg, rgba(15,23,42,0.18), rgba(15,23,42,0.42));
    border: 1px solid rgba(255,255,255,0.1);
}
.combatant { min-width: 0; position: relative; }
.combatant-hero { justify-self: start; }
.combatant-enemy { justify-self: end; }
.combatant::before { content: ''; position: absolute; inset: auto 10% 1.9rem; height: 0.45rem; border-radius: 50%; background: rgba(0,0,0,0.28); filter: blur(4px); }
.reading-heading { display: flex; align-items: center; justify-content: space-between; width: 100%; color: #fde68a; font-size: 0.65rem; letter-spacing: 0.08em; }
#battle-status { color: #86efac; font-size: 0.65rem; font-weight: 900; }
#battle-status.status-player { color: #86efac; }
#battle-status.status-success { color: #fde68a; animation: status-pop 0.35s ease-out; }
#battle-status.status-enemy { color: #fca5a5; animation: status-pop 0.35s ease-out; }
@keyframes status-pop { 0% { transform: scale(0.88); opacity: 0.5; } 100% { transform: scale(1); opacity: 1; } }
.screen-fade-in { animation: screen-fade-in .6s ease-out both; }
@keyframes screen-fade-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.global-loader { position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem; background: rgba(7,10,32,.76); backdrop-filter: blur(5px); color: #fde68a; font-size: .65rem; font-weight: 900; letter-spacing: .12em; }
.global-loader.hidden { display: none; }
.loading-orb { width: 4.2rem; height: 4.2rem; display: grid; place-items: center; border: 3px solid rgba(251,191,36,.45); border-top-color: #fbbf24; border-radius: 50%; box-shadow: 0 0 22px rgba(251,191,36,.5); animation: loading-orb-spin .9s linear infinite; }
.loading-orb span { color: #fff7ed; font-size: 1.65rem; animation: loading-orb-spark .9s ease-in-out infinite alternate; }
@keyframes loading-orb-spin { to { transform: rotate(360deg); } }
@keyframes loading-orb-spark { from { transform: scale(.75); opacity: .55; } to { transform: scale(1.2); opacity: 1; } }
.enemy-preparing { animation: enemy-preparing .28s ease-in-out infinite alternate !important; filter: brightness(1.2) drop-shadow(0 0 14px rgba(248,113,113,.65)); }
@keyframes enemy-preparing { from { transform: translateX(0) scale(1); } to { transform: translateX(-5px) scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .screen-fade-in, .loading-orb, .loading-orb span, .enemy-preparing { animation: none; } }
.reading-word-box { min-height: 8rem; padding: 1.25rem 1rem; border: 0 !important; border-radius: 0.9rem !important; background-color: transparent; background-image: url('assets/ui/math-operation-frame.png'); background-repeat: no-repeat; background-position: center; background-size: 100% 100%; box-shadow: none; }
.reading-word-box #current-word { color: #f8fafc; text-shadow: 0 3px 0 #172554, 0 0 14px rgba(96,165,250,.85); }
.reading-actions { margin-top: -1rem; }
.answer-button { min-height: 4.25rem; padding: 0.8rem 1rem; }
.answer-button {
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: filter 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.answer-button:hover { filter: brightness(1.12); }
.answer-correct {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.82), rgba(6, 95, 70, 0.62)) !important;
  box-shadow: 0 5px 0 rgba(22, 101, 52, 0.72), 0 0 18px rgba(34, 197, 94, 0.2) !important;
}
.answer-wrong {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.82), rgba(127, 29, 29, 0.62)) !important;
  box-shadow: 0 5px 0 rgba(127, 29, 29, 0.72), 0 0 18px rgba(239, 68, 68, 0.18) !important;
}

/* IntroducciÃ³n vertical tipo diapositivas */
.story-screen {
    width: min(100%, 30rem);
    height: min(94vh, 56rem);
    min-height: 32rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.18);
    border-radius: 2rem;
    background: radial-gradient(circle at 50% 15%, rgba(99,102,241,0.35), transparent 35%), linear-gradient(155deg, #090b24, #1e1b4b 55%, #3b0764);
    box-shadow: 0 20px 70px rgba(0,0,0,0.55);
}
.battle-card { padding-left: 0 !important; padding-right: 0 !important; }
.story-screen.hidden { display: none; }
.intro-progress { display: flex; justify-content: space-between; align-items: center; color: #c4b5fd; font-size: 0.65rem; font-weight: 900; letter-spacing: 0.08em; }
.intro-dots { display: flex; gap: 0.3rem; }
.intro-dot { width: 0.42rem; height: 0.42rem; border-radius: 50%; background: rgba(255,255,255,0.28); }
.intro-dot.active { width: 1.1rem; border-radius: 999px; background: #fbbf24; }
.intro-viewport { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.intro-slide { position: relative; isolation: isolate; width: 100%; height: 100%; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 1.1rem; padding: 1.2rem 0.8rem; overflow: hidden; text-align: center; animation: story-in 0.35s ease-out both; }
.intro-slide::before, .intro-slide::after { content: ''; position: absolute; inset: 0; pointer-events: none; }
.intro-slide::before { z-index: -2; background-position: center; background-size: cover; opacity: 0.82; filter: saturate(1.08); transform: scale(1.03); }
.intro-slide::after { z-index: -1; background: linear-gradient(180deg, rgba(7,10,32,0.28), rgba(7,10,32,0.78) 78%, rgba(7,10,32,0.9)); }
.intro-slide[data-scene="numbernia"]::before { background-image: url('assets/story/background-numbernia-palace.png'); }
.intro-slide[data-scene="thorns"]::before { background-image: url('assets/story/background-alda-vault.png'); }
.intro-slide[data-scene="roads"]::before { background-image: url('assets/story/background-numbernia-fracture.png'); }
.intro-slide[data-scene="amoler"]::before { background-image: url('assets/story/background-numbernia-king-call.png'); }
.intro-slide > * { position: relative; z-index: 1; }
.intro-slide.active { display: flex; }
.intro-slide h2 { max-width: 18rem; color: #fde68a; font-size: 1rem; line-height: 1.5; }
.intro-slide p { max-width: 23rem; color: #e2e8f0; font-size: 1.05rem; line-height: 1.5; }
.story-kicker { color: #f9a8d4; font-size: 0.63rem; font-weight: 900; letter-spacing: 0.17em; }
.story-title { color: #fde68a; font-size: clamp(2rem, 10vw, 3.5rem); line-height: 1.15; text-shadow: 0 5px 0 rgba(126,34,206,0.65); }
.story-stars { color: #fbbf24; font-size: 1.5rem; letter-spacing: 0.7rem; }
.story-dialogue { width: 100%; padding: 1rem; border-left: 4px solid #fbbf24; border-radius: 0.8rem; background: rgba(15,23,42,0.48); color: #fef3c7 !important; }
.story-emphasis { color: #fde68a !important; font-weight: 800; }
.story-villain { width: min(68%, 16rem); max-height: 52%; object-fit: contain; filter: drop-shadow(0 0 20px rgba(168,85,247,0.7)); }
.story-villain-small { width: min(38%, 9rem); max-height: 34%; object-fit: contain; filter: drop-shadow(0 0 16px rgba(168,85,247,0.7)); }
.story-hero, .story-hero-final { width: min(54%, 13rem); max-height: 48%; object-fit: contain; filter: drop-shadow(0 0 16px rgba(251,191,36,0.45)); }
.story-hero-final { max-height: 34%; }
.story-villain, .story-villain-small, .story-hero, .story-hero-final { animation: story-sprite-reveal 1.8s 0.12s cubic-bezier(.2,.8,.25,1) both; transform-origin: center bottom; }
@keyframes story-sprite-reveal {
    0% { opacity: 0; transform: scale(.78); }
    48% { opacity: .9; transform: scale(.78); }
    100% { opacity: 1; transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
    .story-villain, .story-villain-small, .story-hero, .story-hero-final { animation: none; }
}
.story-road-fade { width: min(78%, 16rem); max-height: 35%; object-fit: contain; filter: drop-shadow(0 0 14px rgba(167,139,250,.45)); animation: road-fade-pulse 2.8s ease-in-out infinite; }
@keyframes road-fade-pulse { 0%, 100% { opacity: .78; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .story-road-fade { animation: none; } }
.story-rule-icon { display: grid; place-items: center; width: 7rem; height: 7rem; border: 4px solid #fbbf24; border-radius: 50%; color: #fef3c7; font-family: 'Press Start 2P', cursive; font-size: 1.1rem; box-shadow: 0 0 35px rgba(251,191,36,0.32); }
.intro-actions { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 0.6rem; }
.story-nav { padding: 0.85rem; border-radius: 1rem; font-size: 0.75rem; font-weight: 900; text-transform: uppercase; transition: transform 0.2s ease; }
.story-nav:active { transform: translateY(3px); }
.story-nav.primary { background: #fbbf24; color: #1e1b4b; box-shadow: 0 4px 0 #b45309; }
.story-nav.secondary { background: rgba(255,255,255,0.12); color: #e2e8f0; }
.story-nav:disabled { opacity: 0.35; cursor: not-allowed; }
.story-skip { align-self: center; margin-top: 0.8rem; color: #c4b5fd; font-size: 0.65rem; font-weight: 800; text-decoration: underline; }
@keyframes story-in { from { opacity: 0; transform: translateX(1rem); } to { opacity: 1; transform: translateX(0); } }

/* Biomes Backgrounds */
body:not([class*="biome-"]) { background-image: linear-gradient(rgba(7,10,32,.22), rgba(7,10,32,.42)), url('assets/backgrounds/numbernia-cover.png'); } /* Portada / Menu */
body.biome-0 { background-image: url('assets/backgrounds/bosque-numbernia.png'); } /* Bosque */
body.biome-1 { background-image: url('assets/backgrounds/desierto-numbernia.png'); } /* Desierto */
body.biome-2 { background-image: url('assets/backgrounds/observatorio-numbernia.png'); } /* Hielo */
body.biome-3 { background-image: url('assets/backgrounds/humedal-numbernia.png'); } /* Pantano */
body.biome-4 { background-image: url('assets/backgrounds/calderas-numbernia.png'); } /* VolcÃ¡n */
body.biome-5 { background-image: url('assets/backgrounds/fortaleza-numbernia.png'); } /* Castillo */
.map-world-background { background-image: linear-gradient(180deg, rgba(15,23,42,.2), rgba(15,23,42,.34)), url('assets/backgrounds/map-numbernia.png'); background-position: center; background-repeat: no-repeat; background-size: 100% 100%; }
.map-world-background { width: calc(100% + 4rem); margin-left: -2rem; margin-right: -2rem; border-radius: 0.85rem; }
.map-overlay-layer { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
.map-hero-dock { position: absolute; left: .35rem; bottom: .35rem; z-index: 100; width: clamp(7rem, 19vw, 10rem); height: clamp(8rem, 25vw, 12rem); display: grid; place-items: end center; }
.map-hero-sprite { position: relative; left: auto; bottom: auto; z-index: 101; width: 100%; height: 100%; pointer-events: none; animation: map-hero-float 3.4s ease-in-out infinite; }
.map-hero-sprite img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 5px rgba(15,23,42,.65)) drop-shadow(0 0 12px rgba(251,191,36,.35)); }
@keyframes map-hero-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.map-node { overflow: visible; }
.map-node .map-hero-sprite { position: absolute; left: calc(-100% - .45rem); top: 50%; width: clamp(3.8rem, 12vw, 5.8rem); height: clamp(4.8rem, 16vw, 7rem); z-index: 3; animation: map-node-hero-float 3.4s ease-in-out infinite; }
@keyframes map-node-hero-float { 0%, 100% { transform: translateY(-50%); } 50% { transform: translateY(calc(-50% - 5px)); } }
@media (prefers-reduced-motion: reduce) { .map-hero-sprite { animation: none; } }
@media (prefers-reduced-motion: reduce) { .map-node .map-hero-sprite { animation: none; transform: translateY(-50%); } }

.pixel-font { font-family: 'Press+Start+2P', cursive; }

.game-card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(2px);
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.hero-selector-card {
    border-radius: 0 !important;
    border-top-right-radius: 12px !important;
    border-bottom-left-radius: 45px !important;
    border-bottom-right-radius: 45px !important;
    padding-top: .75rem !important;
    padding-bottom: .75rem !important;
}
.hero-selector-card > .w-full { margin-bottom: .5rem !important; }

.hero-sprite {
    width: clamp(7rem, 24vw, 14rem);
    height: clamp(9rem, 32vw, 18rem);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.enemy-sprite,
.boss-sprite {
    width: clamp(7rem, 24vw, 14rem);
    height: clamp(9rem, 32vw, 18rem);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.enemy-enter { animation: enemy-arrival 1.35s .08s cubic-bezier(.18,.78,.25,1) both; }
.enemy-attack-pose { animation: enemy-attack-pulse 1.8s ease-out both !important; }
@keyframes enemy-attack-pulse {
    0% { transform: translateX(0) scale(1); filter: brightness(1); }
    35% { transform: translateX(-.45rem) scale(1.06); filter: brightness(1.35) drop-shadow(0 0 16px rgba(251,191,36,.7)); }
    100% { transform: translateX(0) scale(1); filter: brightness(1); }
}
@keyframes enemy-arrival {
    0% { opacity: 0; transform: translateX(7rem) scale(.88); }
    58% { opacity: .92; transform: translateX(1rem) scale(.98); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .enemy-enter { animation: none; opacity: 1; transform: none; } }
.hero-sprite img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 12px 10px rgba(0, 0, 0, 0.35));
}
.hero-sprite.attack-pose { animation: attack-lunge 1.1s ease-out both; }
@keyframes attack-lunge {
    0% { transform: translateX(0) scale(1); }
    35% { transform: translateX(0.6rem) scale(1.04); }
    100% { transform: translateX(0) scale(1); }
}

.character-option {
    flex: 0 0 clamp(6.25rem, 27vw, 8.5rem);
    width: clamp(6.25rem, 27vw, 8.5rem);
    min-height: 16.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
}
.character-choice-image {
    width: 100%;
    height: 14.2rem;
    object-fit: contain;
    filter: drop-shadow(0 8px 6px rgba(0, 0, 0, 0.35));
    transition: transform 0.2s ease, filter 0.2s ease;
}
.character-option:hover .character-choice-image,
.char-btn.selected .character-choice-image {
    transform: translateY(-4px) scale(1.05);
    filter: drop-shadow(0 10px 8px rgba(251, 191, 36, 0.55));
}
.character-option-label {
    color: #fef3c7;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
#screen-menu.menu-screen-shell { width: 100%; max-width: 28rem; max-height: none; overflow: visible; padding: 0; }
.game-logo { position: relative; z-index: 5; display: block; width: 100%; height: auto; margin: 0 0 -1.1rem; filter: drop-shadow(0 8px 12px rgba(15,23,42,.45)); }
.hero-selector-card > .game-logo { margin: -.25rem 0 .25rem; }
.hero-name-input { min-height: 4.4rem; padding: 1rem 2rem !important; border: 0 !important; border-radius: 0 !important; background-color: transparent !important; background-image: url('assets/ui/name-input-frame.png'); background-repeat: no-repeat; background-position: center; background-size: 100% 100%; color: #4a1d06 !important; text-shadow: 0 1px 0 rgba(255,247,237,.7); }
.hero-name-input::placeholder { color: #7c2d12; opacity: .7; }
.hero-name-input:focus { outline: none; box-shadow: 0 0 0 3px rgba(251,191,36,.52), 0 0 18px rgba(251,191,36,.35); }
.hero-name-input:disabled { cursor: not-allowed; filter: saturate(.65); opacity: .58; }
#btn-start:disabled { cursor: not-allowed; filter: grayscale(.7); opacity: .48; transform: none; }
.profile-kicker { color: #f9a8d4; font-size: .65rem; font-weight: 900; letter-spacing: .18em; }
.hero-profile-screen { gap: .85rem; }
.profile-title { margin: .45rem 0 .2rem; color: #fde68a; font-size: 1.05rem; line-height: 1.5; }
.profile-hero-sprite { width: min(60%, 14rem); height: 13rem; display: grid; place-items: center; margin: .55rem 0 .25rem; animation: profile-hero-float 3.2s ease-in-out infinite; }
.profile-hero-sprite img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 14px 10px rgba(0,0,0,.35)) drop-shadow(0 0 16px rgba(251,191,36,.35)); }
.profile-hero-label { margin-bottom: .9rem; color: #fef3c7; font-size: .85rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.hero-profile-screen .hero-name-input { margin-top: .45rem; }
.hero-profile-screen #btn-start { margin-top: .5rem; }
.profile-back { margin-top: .9rem; color: #c4b5fd; font-size: .7rem; font-weight: 800; text-decoration: underline; }
@keyframes profile-hero-float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-7px) rotate(1deg); } }
@media (prefers-reduced-motion: reduce) { .profile-hero-sprite { animation: none; } }

.parent-guide-screen {
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(145deg, rgba(30, 41, 59, .78), rgba(49, 46, 129, .68));
}
.parent-guide-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.parent-guide-title { margin: .35rem 0 0; color: #fde68a; font-size: clamp(1rem, 4vw, 1.35rem); line-height: 1.45; }
.parent-guide-close { color: #c4b5fd; font-size: .7rem; font-weight: 900; text-decoration: underline; }
.parent-guide-progress { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: 1rem 0 .55rem; color: #bfdbfe; font-size: .65rem; font-weight: 900; letter-spacing: .08em; }
.parent-guide-dots { display: flex; gap: .35rem; }
.parent-guide-dot { width: .45rem; height: .45rem; border-radius: 999px; background: rgba(255,255,255,.3); }
.parent-guide-dot.active { width: 1.3rem; background: #fbbf24; }
.parent-guide-viewport { min-height: 31rem; }
.parent-guide-slide { display: none; text-align: center; animation: parent-guide-slide-in .35s ease-out both; }
.parent-guide-slide.active { display: block; }
.parent-guide-slide img { display: block; width: min(72%, 15rem); height: 13rem; object-fit: contain; margin: .25rem auto .55rem; filter: drop-shadow(0 12px 10px rgba(0,0,0,.35)); }
.guide-step { color: #fbbf24; font-size: .68rem; font-weight: 900; letter-spacing: .16em; }
.parent-guide-slide h3 { margin: .55rem 0 .7rem; color: #fef3c7; font-size: 1.15rem; font-weight: 900; line-height: 1.35; }
.parent-guide-slide p { margin: 0 auto .75rem; max-width: 34rem; color: #e0e7ff; font-size: .88rem; font-weight: 650; line-height: 1.65; }
.parent-guide-slide strong { color: #fde68a; }
.guide-note { padding: .7rem .8rem; border: 1px solid rgba(251,191,36,.35); border-radius: .85rem; background: rgba(15,23,42,.3); color: #bfdbfe !important; font-size: .76rem !important; }
.parent-guide-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin-top: .8rem; }
.guide-nav-button { padding: .75rem .6rem; border-radius: 1rem; background: rgba(99,102,241,.55); color: #eef2ff; font-size: .72rem; font-weight: 900; }
.guide-nav-button:disabled { opacity: .35; cursor: not-allowed; }
.guide-nav-primary { background: linear-gradient(135deg, #f59e0b, #d97706); color: #1e1b4b; }
@keyframes parent-guide-slide-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .parent-guide-slide { animation: none; } }
.parent-guide-slide.active .guide-step,
.parent-guide-slide.active h3,
.parent-guide-slide.active p { animation: guide-copy-fade-in .7s ease-out both; }
.parent-guide-slide.active h3 { animation-delay: .12s; }
.parent-guide-slide.active p { animation-delay: .24s; }
.parent-guide-slide.active .guide-note { animation-delay: .34s; }
@keyframes guide-copy-fade-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.story-intro-logo { display: block; width: min(78%, 22rem); max-height: 14rem; object-fit: contain; margin: .2rem auto .45rem; filter: drop-shadow(0 8px 12px rgba(15,23,42,.45)); animation: story-logo-fade-in 1.4s ease-out both; }
@keyframes story-logo-fade-in { from { opacity: 0; transform: scale(.92) translateY(12px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@media (prefers-reduced-motion: reduce) { .story-intro-logo, .parent-guide-slide.active .guide-step, .parent-guide-slide.active h3, .parent-guide-slide.active p { animation: none; } }
.social-share-area { width: 100%; margin-top: 1rem; padding-top: .8rem; border-top: 1px solid rgba(255,255,255,.12); }
.social-links { display: flex; justify-content: center; gap: .65rem; }
.social-circle { width: 2.55rem; height: 2.55rem; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.5); border-radius: 50%; color: white; font-size: 1.45rem; font-weight: 900; line-height: 1; box-shadow: 0 4px 0 rgba(15,23,42,.4); transition: transform .2s ease, filter .2s ease; }
.social-circle:hover { transform: translateY(-3px) scale(1.06); filter: brightness(1.15); }
.social-circle svg, .whatsapp-share svg { width: 1.35rem; height: 1.35rem; fill: currentColor; stroke: currentColor; stroke-width: 1.5; }
.social-facebook { background: #1877f2; font-family: Arial, sans-serif; padding-top: .25rem; }
.social-instagram { background: linear-gradient(135deg, #feda75, #d62976 55%, #4f5bd5); }
.social-instagram svg { fill: none; }
.social-tiktok { background: #111827; }
.whatsapp-share { min-height: 2.65rem; display: flex; align-items: center; justify-content: center; gap: .5rem; margin: .8rem auto 0; padding: .65rem 1rem; border-radius: 999px; background: #25d366; color: #052e16; font-size: .68rem; font-weight: 900; text-transform: uppercase; box-shadow: 0 5px 0 #15803d; transition: transform .2s ease, filter .2s ease; }
.whatsapp-share:hover { transform: translateY(-2px); filter: brightness(1.08); }
.whatsapp-share svg { fill: currentColor; stroke: none; }
.character-carousel-shell { width: 100%; }
.character-carousel { min-width: 0; overflow-x: auto; overflow-y: visible; scroll-behavior: smooth; scrollbar-width: none; padding: .25rem 0; }
.character-carousel::-webkit-scrollbar { display: none; }
.character-track { display: flex; align-items: center; justify-content: flex-start; gap: .75rem; width: max-content; padding: 0 calc((100% - clamp(6.25rem, 27vw, 8.5rem)) / 2); }
.character-option { opacity: .58; transform: scale(.88); filter: saturate(.72); transition: transform .28s ease, opacity .28s ease, filter .28s ease, background .28s ease, box-shadow .28s ease; }
.character-option.selected { opacity: 1; transform: scale(1.12); filter: saturate(1.12); z-index: 1; }
.character-selection-hint { margin-top: 0; color: #fde68a; font-size: .68rem; font-weight: 800; letter-spacing: .04em; }
.enemy-sprite { font-size: 8rem; }
.boss-sprite { font-size: 11rem; }
.enemy-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 12px 10px rgba(0, 0, 0, 0.35));
}
.map-enemy-image {
    width: 82%;
    height: 82%;
    object-fit: contain;
}

.hp-bar { transition: width 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.health-bar-track {
    position: relative;
    display: flex;
    align-items: center;
    width: min(10rem, 28vw);
    height: 1.45rem;
    margin-top: 1rem;
    padding: .38rem 1.65rem;
    overflow: visible;
    border-radius: 0;
    background: transparent center / 100% 100% no-repeat;
}
.health-bar-track::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: center / 100% 100% no-repeat;
}
.hero-health-track { background-image: url('assets/ui/hero-health-frame.png'); }
.hero-health-track::after { background-image: url('assets/ui/hero-health-frame.png'); }
.enemy-health-track { background-image: url('assets/ui/enemy-health-frame.png'); }
.enemy-health-track::after { background-image: url('assets/ui/enemy-health-frame.png'); }
.health-bar-fill {
    position: relative;
    z-index: 1;
    height: 100%;
    min-width: 0;
    border-radius: 999px;
    transition: width .5s cubic-bezier(.175,.885,.32,1.275);
}
.hero-health-fill { background: linear-gradient(90deg, #22c55e, #86efac 55%, #fef08a); box-shadow: 0 0 8px rgba(34,197,94,.8); }
.enemy-health-fill { background: linear-gradient(90deg, #7f1d1d, #ef4444 58%, #fda4af); box-shadow: 0 0 8px rgba(239,68,68,.8); }

.shake { animation: shake 0.4s ease-in-out; }
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px) rotate(-2deg); }
    50% { transform: translateX(10px) rotate(2deg); }
    75% { transform: translateX(-5px); }
}

.drop-impact { animation: drop-impact 0.65s cubic-bezier(.2,.8,.25,1) !important; }
@keyframes drop-impact {
    0%, 100% { transform: translate(0, 0) rotate(0) scale(1); }
    18% { transform: translate(-12px, 4px) rotate(-3deg) scale(1.03); }
    36% { transform: translate(14px, -3px) rotate(3deg) scale(1.06); }
    54% { transform: translate(-9px, 3px) rotate(-2deg) scale(1.03); }
    72% { transform: translate(6px, 0) rotate(1deg) scale(1.01); }
}

.ultimate-impact { animation: ultimate-impact 0.9s cubic-bezier(.2,.8,.25,1) !important; }
@keyframes ultimate-impact {
    0%, 100% { transform: translate(0, 0) rotate(0) scale(1); }
    14% { transform: translate(-18px, 5px) rotate(-5deg) scale(1.05); }
    28% { transform: translate(20px, -5px) rotate(5deg) scale(1.1); }
    42% { transform: translate(-15px, 4px) rotate(-4deg) scale(1.06); }
    56% { transform: translate(12px, -2px) rotate(3deg) scale(1.03); }
    72% { transform: translate(-6px, 1px) rotate(-1deg) scale(1.01); }
}

.projectile {
    position: absolute;
    width: 6.3rem;
    height: 6.3rem;
    pointer-events: none;
    z-index: 50;
    filter: drop-shadow(0 0 10px #fbbf24);
}

.power-drop-attack {
    width: 12.6rem;
    height: 12.6rem;
    filter: drop-shadow(0 0 18px rgba(192, 132, 252, 0.85)) drop-shadow(0 0 26px rgba(96, 165, 250, 0.55));
}

.power-drop-attack .effect-sprite {
    animation: drop-attack-build 0.55s cubic-bezier(.2,.8,.25,1) both;
}

.power-ultimate-attack {
    width: 18rem;
    height: 18rem;
    z-index: 60;
    animation: none;
    filter: drop-shadow(0 0 24px rgba(251, 191, 36, 0.95)) drop-shadow(0 0 48px rgba(168, 85, 247, 0.8));
}

.power-ultimate-attack .effect-sprite {
    animation: ultimate-ritual 4s ease-in-out both;
}

@keyframes ultimate-ritual {
    0% { opacity: 0; transform: scale(0.08) rotate(-180deg); }
    18% { opacity: 1; transform: scale(0.38) rotate(-105deg); }
    42% { opacity: 1; transform: scale(0.76) rotate(15deg); }
    66% { opacity: 1; transform: scale(1) rotate(150deg); }
    88% { opacity: 1; transform: scale(1.08) rotate(300deg); }
    100% { opacity: 0; transform: scale(0.12) rotate(450deg); }
}

@keyframes drop-attack-build {
    0% { opacity: 0; transform: scale(0.62) rotate(-12deg); }
    50% { opacity: 1; transform: scale(1.08) rotate(5deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}

.effect-sprite {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.enemy-projectile {
    width: 8.4rem;
    height: 8.4rem;
    z-index: 55;
    filter: drop-shadow(0 0 14px rgba(248, 113, 113, .85)) drop-shadow(0 0 22px rgba(124, 58, 237, .55));
}
.enemy-projectile .effect-sprite {
    animation: enemy-projectile-emerge 1.8s cubic-bezier(.18,.78,.25,1) both;
}
@keyframes enemy-projectile-emerge {
    0% { opacity: 0; transform: scale(.35) rotate(-12deg); }
    55% { opacity: 1; transform: scale(1.12) rotate(5deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}

.power-panel {
    width: 100%;
    margin: 0.75rem auto 1rem;
    padding: 0.45rem 0.75rem 0.6rem;
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.14);
}
.power-panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}
.power-selector {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    justify-items: center;
}
.power-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    min-width: 0;
}
.power-card {
    width: clamp(4.2rem, 15vw, 5.4rem);
    height: clamp(4.2rem, 15vw, 5.4rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.25rem;
    border: 3px solid rgba(148, 163, 184, 0.4);
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.82);
    color: #f8fafc;
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.power-card:not(:disabled):hover { transform: translateY(-3px); border-color: #fbbf24; }
.power-card.selected { border-color: #fbbf24; box-shadow: 0 0 16px rgba(251, 191, 36, 0.42); background: rgba(120, 53, 15, 0.48); }
.power-card.locked { opacity: 0.48; filter: grayscale(0.8); cursor: not-allowed; }
.power-icon { width: 70%; height: 70%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; line-height: 1; color: #fde68a; }
.power-icon img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.65)); }
.power-name { width: 6.5rem; min-height: 1.35rem; font-size: 0.56rem; font-weight: 900; text-align: center; line-height: 1.1; }
.power-level { font-size: 0.48rem; font-weight: 900; color: #93c5fd; letter-spacing: 0.06em; line-height: 1; }
.power-projectile { animation: power-flight 1s ease-in-out both; }
.power-meteor { filter: drop-shadow(0 0 15px #c084fc); }
.power-portal { filter: drop-shadow(0 0 18px #22d3ee); animation-duration: 0.7s; }
.power-moon { filter: drop-shadow(0 0 18px #bae6fd); animation-duration: 0.7s; }
.power-claw { filter: drop-shadow(0 0 14px #fb923c); }
.power-sonic { filter: drop-shadow(0 0 15px #fb7185); }
@keyframes power-flight {
    0% { transform: scale(0.65) rotate(-12deg); opacity: 0.2; }
    45% { transform: scale(1.2) rotate(8deg); opacity: 1; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}
@media (max-width: 520px) {
    body {
        align-items: flex-start;
        min-height: 100dvh;
    }

    #app {
        height: auto;
        min-height: 100dvh;
        align-items: flex-start;
        padding-top: max(0.75rem, env(safe-area-inset-top));
        padding-bottom: env(safe-area-inset-bottom);
    }

    #screen-menu.menu-screen-shell {
        margin-top: 0;
    }

    .hero-selector-card > .game-logo {
        max-height: 7rem;
        object-fit: contain;
    }

    .battle-hud { gap: 0.45rem; padding-inline: 0.55rem; }
    .hud-biome { padding-inline: 0.5rem; }
    .hud-biome .pixel-font { font-size: 0.48rem; }
    .xp-track { width: 7rem; height: 1.15rem; padding: .28rem 1rem; }
    .health-bar-track { width: 8rem; height: 1.2rem; padding: .28rem 1.15rem; }
    .battle-arena { min-height: 12rem; padding-inline: 0.25rem; }
    .hero-sprite { width: clamp(5.5rem, 29vw, 9rem); height: clamp(7rem, 38vw, 11rem); }
    .enemy-sprite, .boss-sprite { width: clamp(5.5rem, 29vw, 9rem); height: clamp(7rem, 38vw, 11rem); }
    .reading-word-box { min-height: 6.5rem; }
    #current-word { font-size: 3.5rem; }
    .power-panel-heading { align-items: flex-start; flex-direction: column; }
    .power-name { font-size: 0.58rem; }
}

.defeat-sprite {
    width: clamp(8rem, 23vw, 14rem);
    height: clamp(8rem, 23vw, 14rem);
    display: flex;
    align-items: center;
    justify-content: center;
}
.defeat-sprite img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: defeat-pop 1.5s ease-out both;
    filter: drop-shadow(0 0 16px rgba(251, 191, 36, 0.85));
}
.defeated-hero-sprite {
    width: clamp(8rem, 23vw, 14rem);
    height: clamp(8rem, 23vw, 14rem);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.defeated-hero-sprite img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: defeated-hero-rest 1.5s ease-out both;
    filter: drop-shadow(0 10px 10px rgba(15, 23, 42, .45));
}
@keyframes defeated-hero-rest {
    0% { opacity: 0; transform: translateY(-10px) scale(.88); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes defeat-pop {
    0% { opacity: 0; transform: scale(0.35) rotate(-12deg); }
    22% { opacity: 1; transform: scale(1.12) rotate(4deg); }
    48% { opacity: 1; transform: scale(0.96) rotate(-2deg); }
    100% { opacity: 0; transform: scale(1.25) rotate(8deg); }
}

.floating { animation: floating 3s ease-in-out infinite; }
@keyframes floating {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.level-up-toast { animation: slideUp 2s forwards; }
@keyframes slideUp {
    0% { transform: translateY(50px) scale(0.5); opacity: 0; }
    20% { transform: translateY(0) scale(1.1); opacity: 1; }
    30% { transform: translateY(0) scale(1); opacity: 1; }
    80% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-50px) scale(0.8); opacity: 0; }
}

.power-unlock-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 1rem; background: rgba(5, 8, 26, .78); backdrop-filter: blur(5px); animation: unlock-modal-in .3s ease-out both; }
.power-unlock-modal.hidden { display: none; }
.power-unlock-card { position: relative; width: min(100%, 25rem); padding: 1.5rem 1.25rem 1.35rem; overflow: hidden; text-align: center; border: 3px solid #fbbf24; border-radius: 1.75rem; background: radial-gradient(circle at 50% 18%, rgba(59,130,246,.42), transparent 36%), linear-gradient(155deg, #172554, #312e81 58%, #581c87); box-shadow: 0 0 0 5px rgba(30,64,175,.5), 0 20px 70px rgba(0,0,0,.65), 0 0 35px rgba(251,191,36,.4); }
.power-unlock-card::before { content: ''; position: absolute; inset: .55rem; border: 1px solid rgba(253,230,138,.62); border-radius: 1.25rem; pointer-events: none; }
.power-unlock-sparkles { position: relative; z-index: 1; color: #fde68a; font-size: .9rem; letter-spacing: .9rem; text-shadow: 0 0 12px #fbbf24; }
.power-unlock-sprite { position: relative; z-index: 1; display: block; width: min(65%, 10rem); aspect-ratio: 1; object-fit: contain; margin: -.2rem auto -.5rem; filter: drop-shadow(0 0 18px rgba(96,165,250,.8)); animation: unlock-sprite-pop .65s cubic-bezier(.18,.9,.3,1.25) both; }
.power-unlock-kicker { position: relative; z-index: 1; margin: .15rem 0 .35rem; color: #fde68a; font-size: .65rem; font-weight: 900; letter-spacing: .18em; }
.power-unlock-title { position: relative; z-index: 1; margin: 0; color: #fff7ed; font-size: 1.15rem; line-height: 1.5; text-shadow: 0 2px 0 #92400e, 0 0 14px rgba(251,191,36,.7); }
.power-unlock-name { position: relative; z-index: 1; margin: .65rem 0 .25rem; color: #f9a8d4; font-size: 1.05rem; font-weight: 900; text-transform: uppercase; }
.power-unlock-description { position: relative; z-index: 1; margin: 0 auto 1rem; max-width: 19rem; color: #dbeafe; font-size: .82rem; font-weight: 700; }
.power-unlock-button { position: relative; z-index: 1; width: min(100%, 16rem); padding: .8rem 1rem; color: #1e1b4b; background: #fbbf24; box-shadow: 0 5px 0 #b45309; }
@keyframes unlock-modal-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes unlock-sprite-pop { from { opacity: 0; transform: scale(.45) rotate(-10deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@media (prefers-reduced-motion: reduce) { .power-unlock-modal, .power-unlock-sprite { animation: none; } }

.btn-game {
    transition: all 0.2s;
    transform: translateY(0);
}
.btn-game:active { transform: translateY(4px); }

.syllable-display {
    text-shadow: 0 4px 0 rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.8);
    color: #1e1b4b;
}
.reading-word-box { background-color: transparent; background-image: url('assets/ui/math-operation-frame.png'); background-repeat: no-repeat; background-position: center; background-size: 100% 100%; }

/* Character selection */
.char-btn:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 3px;
}

/* Map Nodes */
.map-node {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 4px solid rgba(255,255,255,0.5);
    background: #1e293b;
    position: relative;
    transition: all 0.3s;
    cursor: pointer;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
    z-index: 2;
}
.map-node:hover:not(.locked) {
    transform: scale(1.1);
}
.map-node.locked {
    filter: grayscale(100%) brightness(40%);
    cursor: not-allowed;
}
.map-node.completed {
    border-color: #22c55e;
    background: #14532d;
}
.map-node.current {
    border-color: #fbbf24;
    box-shadow: 0 0 20px #fbbf24, inset 0 0 10px rgba(0,0,0,0.5);
    animation: pulse-node 2s infinite;
}
.map-node.boss {
    width: 80px;
    height: 80px;
    font-size: 36px;
    border-radius: 20%;
    border-color: #ef4444;
}
.map-node.boss.completed {
    border-color: #22c55e;
}
@keyframes pulse-node {
    0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.7), inset 0 0 10px rgba(0,0,0,0.5); }
    70% { box-shadow: 0 0 0 20px rgba(251, 191, 36, 0), inset 0 0 10px rgba(0,0,0,0.5); }
    100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0), inset 0 0 10px rgba(0,0,0,0.5); }
}

.map-path {
    width: 8px;
    height: 30px;
    background: rgba(255,255,255,0.2);
    margin: -5px 0;
    border-radius: 4px;
    z-index: 1;
}
.map-path.active {
    background: #fbbf24;
    box-shadow: 0 0 10px #fbbf24;
}

.custom-scrollbar::-webkit-scrollbar { width: 8px; }
.custom-scrollbar::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 10px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 10px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.5); }







