* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #04010c; font-family: 'Fredoka', system-ui, sans-serif; }
#game-root { position: relative; width: 100%; height: 100%; }
canvas { display: block; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
#vignette {
    position: absolute; inset: 0; pointer-events: none; z-index: 2;
    background: radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,0.55) 100%);
}
#flash {
    position: absolute; inset: 0; pointer-events: none; z-index: 3;
    opacity: 0; transition: opacity 0.05s;
    background: radial-gradient(circle at 50% 50%, rgba(255,120,220,0.35), transparent 60%);
}
#hud {
    position: absolute; inset: 0; z-index: 5; pointer-events: none;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 12px 16px 18px;
}
.hud-top {
    display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 8px; align-items: start;
}
.stat-block .lbl {
    font-family: 'Orbitron', sans-serif; font-size: 10px; letter-spacing: 0.18em;
    color: rgba(255,255,255,0.5);
}
.stat-block .val {
    font-family: 'Orbitron', sans-serif; font-weight: 900;
    font-size: clamp(26px, 5vw, 40px); color: #fff;
    text-shadow: 0 0 20px rgba(168,85,247,0.7), 2px 2px 0 #000;
    line-height: 1;
}
.stat-block .val.sm { font-size: 18px; }
.stat-block .mt { margin-top: 6px; }
.stat-block.right { text-align: right; }
.stat-block.center { text-align: center; }
#biome-name {
    font-family: 'Orbitron', sans-serif; font-weight: 800; font-size: 13px;
    letter-spacing: 0.14em; color: #e9d5ff;
    text-shadow: 0 0 12px #a855f7;
}
#mission {
    font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.85); margin: 4px 0 6px;
}
.bar-track {
    height: 12px; border-radius: 999px; background: rgba(0,0,0,0.45);
    border: 2px solid rgba(255,255,255,0.2); overflow: hidden;
}
.bar-track.hp, .bar-track.fire { flex: 1; height: 14px; }
#mission-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #22d3ee, #a855f7 50%, #f472b6);
    box-shadow: 0 0 12px #a855f7; transition: width 0.15s;
}
#hp-fill {
    height: 100%; width: 100%;
    background: linear-gradient(90deg, #ef4444, #f97316 40%, #4ade80);
    transition: width 0.1s;
}
#fire-fill {
    height: 100%; width: 100%;
    background: linear-gradient(90deg, #7c2d12, #f97316, #fde047);
    transition: width 0.08s;
}
.hud-mid { display: flex; justify-content: center; min-height: 48px; }
#banner {
    font-family: 'Orbitron', sans-serif; font-weight: 900;
    font-size: clamp(20px, 4.5vw, 34px); color: #fff; letter-spacing: 0.08em;
    text-shadow: 0 0 24px #f472b6, 0 0 40px #a855f7, 2px 3px 0 #000;
    animation: popIn 0.4s cubic-bezier(0.2, 1.4, 0.3, 1);
}
@keyframes popIn {
    from { opacity: 0; transform: scale(0.4) translateY(16px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.hud-bottom {
    display: flex; align-items: center; gap: 14px; max-width: 520px; width: 100%;
}
.meter { display: flex; align-items: center; gap: 8px; flex: 1; }
#stars-run {
    font-family: 'Orbitron', sans-serif; font-weight: 700; color: #fde047;
    text-shadow: 0 0 10px rgba(253,224,71,0.6);
}
#touch-ui {
    position: absolute; z-index: 6; left: 0; right: 0; bottom: 70px;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    pointer-events: none;
}
#btn-breath {
    pointer-events: auto;
    font-family: 'Orbitron', sans-serif; font-weight: 800; font-size: 16px;
    letter-spacing: 0.08em; color: #1a0500;
    background: linear-gradient(180deg, #fde047, #f97316 55%, #ea580c);
    border: none; border-radius: 999px; padding: 14px 28px;
    box-shadow: 0 6px 0 #9a3412, 0 12px 28px rgba(249,115,22,0.4);
    cursor: pointer;
}
#btn-breath:active, #btn-breath.held {
    transform: translateY(5px);
    box-shadow: 0 1px 0 #9a3412, 0 4px 12px rgba(249,115,22,0.3);
}
#hint-drag {
    font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.45);
    background: rgba(0,0,0,0.35); padding: 6px 14px; border-radius: 999px;
}
.screen {
    position: absolute; inset: 0; z-index: 20;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(ellipse at 50% 20%, rgba(88,28,135,0.55), rgba(4,1,12,0.94) 70%);
    backdrop-filter: blur(8px); padding: 20px;
}
.screen.hidden { display: none !important; }
.card {
    position: relative; max-width: 480px; width: 100%;
    background: rgba(12, 6, 28, 0.82); border: 2px solid rgba(168,85,247,0.4);
    border-radius: 28px; padding: 32px 26px 28px; text-align: center; color: #fff;
    box-shadow: 0 30px 80px rgba(0,0,0,0.55), 0 0 60px rgba(168,85,247,0.15);
    overflow: hidden;
}
.glow-orb {
    position: absolute; top: -30%; left: 50%; width: 260px; height: 260px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(244,114,182,0.4), transparent 70%);
    pointer-events: none;
}
.kicker {
    font-family: 'Orbitron', sans-serif; font-size: 11px; letter-spacing: 0.22em;
    color: #c4b5fd; margin-bottom: 8px;
}
h1 {
    font-family: 'Orbitron', sans-serif; font-weight: 900;
    font-size: clamp(40px, 11vw, 58px); line-height: 0.95; letter-spacing: 0.04em;
    text-shadow: 0 0 30px rgba(168,85,247,0.7), 3px 4px 0 #1e0a3a;
    margin-bottom: 10px; position: relative;
}
h1 .pink { color: #f472b6; text-shadow: 0 0 28px rgba(244,114,182,0.7), 3px 4px 0 #3b0a2a; }
h2 {
    font-family: 'Orbitron', sans-serif; font-weight: 900; font-size: clamp(28px, 7vw, 40px);
    margin-bottom: 10px;
}
h2.go { color: #f472b6; text-shadow: 0 0 24px rgba(244,114,182,0.6); }
.tag { color: rgba(255,255,255,0.7); font-weight: 600; margin-bottom: 18px; line-height: 1.4; }
.howto {
    list-style: none; text-align: left; margin: 0 auto 18px; max-width: 360px;
    display: flex; flex-direction: column; gap: 8px;
}
.howto li {
    background: rgba(168,85,247,0.12); border: 1px solid rgba(168,85,247,0.3);
    border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 600;
}
.howto b { color: #fde047; }
.best-line { color: rgba(255,255,255,0.5); font-weight: 700; margin-bottom: 18px; }
.best-line strong { color: #fde047; font-family: 'Orbitron', sans-serif; font-size: 18px; }
.cta {
    font-family: 'Orbitron', sans-serif; font-weight: 800; font-size: 20px;
    letter-spacing: 0.12em; color: #0c061c;
    background: linear-gradient(180deg, #e9d5ff, #a855f7 50%, #7c3aed);
    border: none; border-radius: 999px; padding: 16px 48px; cursor: pointer;
    box-shadow: 0 7px 0 #4c1d95, 0 14px 30px rgba(168,85,247,0.4);
    transition: transform 0.1s, box-shadow 0.1s;
}
.cta:hover { filter: brightness(1.08); }
.cta:active { transform: translateY(6px); box-shadow: 0 1px 0 #4c1d95; }
.back {
    display: inline-block; margin-top: 16px; color: rgba(255,255,255,0.5);
    font-weight: 700; text-decoration: none; font-size: 14px;
}
.back:hover { color: #e9d5ff; }
.big-stars {
    font-size: clamp(36px, 9vw, 52px); color: #fde047; letter-spacing: 0.15em;
    text-shadow: 0 0 20px rgba(253,224,71,0.6); margin: 8px 0 12px;
    animation: popIn 0.45s cubic-bezier(0.2, 1.4, 0.3, 1);
}
#clear-bonus {
    font-family: 'Orbitron', sans-serif; font-size: 24px; font-weight: 800; color: #4ade80;
    margin-bottom: 8px;
}
.next-hint { color: rgba(255,255,255,0.45); font-weight: 700; }
.go-score {
    font-family: 'Orbitron', sans-serif; font-weight: 900;
    font-size: clamp(48px, 12vw, 72px); line-height: 1; margin: 8px 0 12px;
    text-shadow: 0 0 30px rgba(168,85,247,0.6);
}
.new-best {
    color: #fde047; font-family: 'Orbitron', sans-serif; font-weight: 700;
    letter-spacing: 0.12em; margin-bottom: 10px; animation: popIn 0.5s infinite alternate;
}
.go-meta { color: rgba(255,255,255,0.55); font-weight: 700; margin-bottom: 22px; }
.hidden { display: none !important; }

@media (max-width: 600px) {
    .hud-top { grid-template-columns: 1fr 1fr; }
    .stat-block.center { grid-column: 1 / -1; order: -1; }
    #btn-breath { font-size: 14px; padding: 12px 22px; }
}
