PokéAzure Game - Study for Azure Exams

This commit is contained in:
Justin Oros
2026-05-20 09:16:02 -07:00
committed by GitHub
commit 61c9bae44f
7 changed files with 3712 additions and 0 deletions
+206
View File
@@ -0,0 +1,206 @@
# 🎮 PokéAzure — Azure you ready?
A Pokémon-style Game Boy Advance browser game for **studying Microsoft Azure certification exams**!
Journey through towns, each covering a different Azure exam. Play on your phone, tablet, or PC — progress saves automatically.
> *"Gotta cert 'em all!"*
**Current towns:**
| Town | Exam | Status |
|---|---|---|
| 🏘️ Fundamentals Town | AZ-900: Azure Fundamentals | ✅ Available |
| 🏙️ Administrator City | AZ-104: Azure Administrator | 🔜 Coming soon |
| 🏗️ Developer District | AZ-204: Azure Developer | 🔜 Coming soon |
| 🔒 Security Stronghold | AZ-500: Azure Security | 🔜 Coming soon |
---
## 🚀 Play It Live
👉 [Launch PokéAzure](https://justinoros.github.io/pokeazure)
---
## 🗂️ Files
```
pokeazure/
├── index.html ← Game screens & structure
├── style.css ← GBA Pokémon aesthetic, fully responsive
├── game.js ← Game engine, controller, walking, save system
├── questions.json ← Questions & answers (organised by town/exam)
└── README.md
```
---
## 🕹️ Host on GitHub Pages (free)
1. Create a GitHub repo named **`pokeazure`**
2. Upload all **4 files**: `index.html`, `style.css`, `game.js`, `questions.json`
3. Go to **Settings → Pages → Source: `main` branch, `/ (root)` folder**
4. Hit **Save** — live in ~60 seconds at `https://justinoros.github.io/pokeazure`
No server, no database, no cost.
---
## 🎮 GBA Controller Overlay
On mobile, a semi-transparent Game Boy Advance-style controller overlays the bottom of the screen:
| Control | Action |
|---|---|
| **D-pad** | Walk the player around the map |
| **A button** (red) | Talk to NPC on map · Confirm answer in battle · Advance dialog |
| **B button** (blue) | Talk to NPC on map · Advance dialog |
| **SELECT / START** | Decorative — reserved for future use |
The controller is hidden on desktop (≥900px wide) — use the keyboard instead.
---
## ⌨️ PC Keyboard Controls
| Key | Action |
|---|---|
| **WASD / Arrow keys** | Walk player on map |
| **E / Enter** | Talk to NPC · Confirm answer · Advance dialog |
| **X** | Talk to NPC · Advance dialog |
| **1 / 2 / 3 / 4** | Quick-pick answer directly |
| **Space** | Advance dialog |
---
## 🗺️ Map & Walking
- The player sprite walks freely around the overworld map using the D-pad or WASD
- Walking animations change based on direction (left, right, up, down)
- Press **A**, **B**, **E**, or **Enter** at any time to talk to the NPC and start the question
- Tapping the NPC sprite directly also triggers the conversation
---
## 💾 Save System
Progress is stored in the player's browser (`localStorage`) automatically:
- **Auto-saves** after every answered question and on map return — a 💾 icon flashes to confirm
- **Continue screen** appears on next visit showing trainer name, progress %, and score
- **New Game** option always available — prompts confirmation before erasing save
- Save clears automatically on completion so the next run starts fresh
---
## 🎯 Features
| Feature | Detail |
|---|---|
| GBA controller overlay | D-pad + A/B buttons, semi-transparent, mobile only |
| Walking player | Moves freely on map, directional walk animations |
| Mobile-first design | Full-screen on phones with safe-area support, framed on desktop |
| localStorage save | Auto-save with continue screen on return visits |
| Multi-exam structure | Each town covers a different Azure certification exam |
| Single & multi-select | "Choose two" questions require selecting both correct answers before confirming |
| Randomised answer positions | Correct answer shuffled to a random slot — no pattern to exploit |
| Numbered answers | Options labelled 1/2/3/4 (not A/B/C/D) |
| Name entry | On-screen pixel keyboard, just like the real game |
| Typewriter text | Authentic dialog effect, tap/press to skip |
| 22 NPC characters | Professor Oak, Misty, Brock, Giovanni, Lance… |
| Streak bonuses | 3× correct = +150 pts 🔥, 5×+ = +200 pts 🔥 |
| Milestone badges | Earned at Q25, Q50, Q75, Q100 per town |
| Correct answer reveal | Wrong answers show the right answer + full explanation |
| Scanline overlay | Authentic CRT/GBA screen effect |
---
## 📚 AZ-900 Topics Covered (Fundamentals Town)
| Domain | Topics |
|---|---|
| Cloud Concepts | IaaS / PaaS / SaaS, public / private / hybrid cloud, CapEx vs OpEx, elasticity, scalability, high availability, disaster recovery |
| Core Azure Services | Regions, availability zones, resource groups, subscriptions, management groups, VMs, App Service, Azure Functions, Blob/File storage tiers, VNet, VPN Gateway, ExpressRoute, Load Balancer, Cosmos DB, Azure SQL |
| Security & Identity | Microsoft Entra ID, RBAC, MFA, Conditional Access, SSO, Key Vault, NSGs, Azure Firewall, DDoS Protection, Microsoft Defender for Cloud, defence in depth, shared responsibility model |
| Management & Governance | Azure Policy, Blueprints, Resource locks, Tags, ARM templates, Azure CLI, Azure PowerShell, Cloud Shell, Azure Portal, Azure Arc, Azure Migrate, Microsoft Purview |
| Monitoring & Health | Azure Monitor, Azure Advisor, Azure Service Health, Application Insights, health advisories, RCA reports |
| Pricing & Cost Management | Pricing Calculator, TCO Calculator, Azure Reservations, Spot VMs, Cost Management + Billing, budgets, pay-as-you-go |
---
## ➕ Adding a New Town (Exam)
To add a new exam, add a new level object to the `levels` array in `questions.json`:
```json
{
"levels": [
{
"id": 1,
"name": "Fundamentals Town",
"exam": "AZ-900",
"questions": [ ... ]
},
{
"id": 2,
"name": "Administrator City",
"exam": "AZ-104",
"questions": [ ... ]
}
]
}
```
---
## ➕ Adding Questions
**Single-answer question:**
```json
{
"id": 101,
"npc": "Professor Oak",
"text": "Your question here?",
"options": ["Option A", "Option B", "Option C", "Option D"],
"answer": 0,
"explanation": "Why Option A is correct."
}
```
**Multi-select question (choose two):**
```json
{
"id": 102,
"npc": "Misty",
"text": "Which two options are correct? (Choose two)",
"options": ["Option A", "Option B", "Option C", "Option D"],
"answers": [0, 2],
"explanation": "Options A and C are correct because..."
}
```
- `answer` (single integer) = 0-based index of the one correct option
- `answers` (array of two integers) = 0-based indices of both correct options
- The game detects which mode to use automatically and shows a CONFIRM button for multi-select
---
## 🧑 Adding NPCs
In `game.js`, add to the `NPC` object at the top:
```js
const NPC = {
'Your NPC Name': '🧑',
...
};
```
Then reference `"npc": "Your NPC Name"` in `questions.json`.
---
## 📱 Mobile Tips
- Add to Home Screen on iOS/Android for a full-screen app-like experience
- The game uses `100dvh` and `env(safe-area-inset-bottom)` for notched phones (iPhone X+)
- Tap anywhere on the dialog box during the intro to skip the typewriter and advance
- Tap the NPC sprite directly on the map as an alternative to pressing A/B
+1288
View File
File diff suppressed because it is too large Load Diff
+230
View File
@@ -0,0 +1,230 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="theme-color" content="#0a0520">
<title>PokéAzure — Study for Azure Certifications</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="app">
<!-- BOOT SPLASH -->
<div id="screen-boot" class="screen active">
<div class="boot-logo">
<div class="boot-gameboy">GAME BOY ADVANCE</div>
<div class="boot-ding">♪</div>
<div class="boot-copy">© 2026 PokéAzure</div>
</div>
</div>
<!-- TITLE -->
<div id="screen-title" class="screen">
<div class="title-bg">
<div class="title-stars"></div>
<div class="title-main">
<div class="title-logo">
<span class="title-poke">POKÉ</span><span class="title-sql">AZURE</span>
</div>
<div class="title-edition">★ AZURE CERT TRAINER ★</div>
<div class="title-tap blink">TAP / CLICK TO START</div>
</div>
<div class="title-footer">PokéAzure v1.0 · AZ-900 · More exams coming</div>
</div>
</div>
<!-- CONTINUE OR NEW GAME -->
<div id="screen-continue" class="screen">
<div class="continue-bg">
<div class="continue-logo">POKÉ<span>AZURE</span></div>
<div class="continue-card" id="continue-card">
<div class="continue-card-header">📂 CONTINUE</div>
<div class="save-row"><span class="save-lbl">TRAINER</span><span class="save-val" id="save-name-disp">—</span></div>
<div class="save-row"><span class="save-lbl">PROGRESS</span><span class="save-val" id="save-prog-disp">—</span></div>
<div class="save-row"><span class="save-lbl">SCORE</span><span class="save-val" id="save-score-disp">—</span></div>
<button class="btn-pixel btn-green" id="btn-continue-save">▶ CONTINUE</button>
</div>
<div class="continue-or">— OR —</div>
<button class="btn-pixel btn-red" id="btn-new-game">✦ NEW GAME</button>
<p class="continue-warn" id="continue-warn"></p>
</div>
</div>
<!-- NAME ENTRY -->
<div id="screen-name" class="screen">
<div class="dialog-box name-dialog">
<div class="dialog-speaker">PROFESSOR OAK</div>
<div class="dialog-text" id="name-prompt-text"></div>
</div>
<div class="name-entry-area">
<div class="name-display-box"><span id="name-display">_</span></div>
<div class="keyboard-grid" id="keyboard-grid"></div>
<div class="name-controls">
<button class="btn-pixel btn-del" id="btn-backspace">← DEL</button>
<button class="btn-pixel btn-ok" id="btn-confirm-name">OK ▶</button>
</div>
</div>
</div>
<!-- INTRO CUTSCENE -->
<div id="screen-intro" class="screen">
<div class="overworld-bg">
<div class="intro-npc" id="intro-npc">👴</div>
<div class="intro-player"></div>
</div>
<div class="dialog-box intro-dialog">
<div class="dialog-speaker" id="intro-speaker">PROFESSOR OAK</div>
<div class="dialog-text" id="intro-text"></div>
<div class="dialog-arrow blink" id="intro-arrow" style="display:none">▼</div>
</div>
<div class="tap-hint blink"><span class="hint-pc">PRESS E TO CONTINUE</span><span class="hint-touch">TAP / PRESS A TO CONTINUE</span></div>
</div>
<!-- OVERWORLD MAP -->
<div id="screen-map" class="screen">
<div class="map-header">
<div class="map-left">
<span class="map-pin">📍</span>
<span class="map-town-name">FUNDAMENTALS TOWN</span>
</div>
<div class="map-right">
<div class="prog-bar-outer"><div class="prog-bar-inner" id="map-prog-bar"></div></div>
<span class="prog-text" id="map-prog-text">0/100</span>
<span class="save-dot" id="save-dot" title="Auto-saved">💾</span>
<span class="music-toggle" id="music-toggle" title="Mute/Unmute Music">🎵</span>
</div>
</div>
<div class="overworld-bg map-world" id="map-world">
<div class="map-inner" id="map-inner">
<div class="map-trees" id="map-trees"></div>
</div>
<!-- Path stays fixed to the viewport — does not scroll -->
<div class="map-ground"></div>
<!-- NPC in viewport layer — JS positions it using screen-space X -->
<div class="map-npc-wrap" id="map-npc-wrap">
<div class="npc-bubble" id="npc-bubble">!</div>
<div class="map-npc" id="map-npc"></div>
</div>
<!-- Player stays fixed to viewport, only Y moves -->
<div class="map-player" id="map-player"></div>
<!-- Hints overlay the viewport, not the world -->
<div class="map-talk-hint" id="map-talk-hint" style="display:none"><span class="hint-pc">Press E</span><span class="hint-touch">Press A</span></div>
<div class="map-dir-arrow" id="map-dir-arrow" style="display:none">▶</div>
</div>
<div class="map-hud">
<div class="hud-cell"><div class="hud-lbl">TRAINER</div><div class="hud-val" id="hud-name">ASH</div></div>
<div class="hud-cell"><div class="hud-lbl">SCORE</div><div class="hud-val" id="hud-score">0</div></div>
<div class="hud-cell"><div class="hud-lbl">STREAK</div><div class="hud-val" id="hud-streak">0</div></div>
<div class="hud-cell"><div class="hud-lbl">CORRECT</div><div class="hud-val" id="hud-correct">0/0</div></div>
</div>
</div>
<!-- BATTLE / QUESTION -->
<div id="screen-battle" class="screen">
<div class="battle-scene">
<div class="battle-npc-side">
<div class="battle-sprite" id="battle-npc-sprite">👴</div>
<div class="battle-name-tag" id="battle-npc-name">OAK</div>
</div>
<div class="battle-player-side">
<div class="battle-player-sprite"></div>
<div class="battle-name-tag" id="battle-player-name">ASH</div>
</div>
</div>
<div class="dialog-box battle-dialog">
<div class="dialog-speaker" id="battle-speaker">PROFESSOR OAK</div>
<div class="dialog-text" id="battle-text"></div>
<div class="dialog-arrow blink" id="battle-arrow" style="display:none">▼</div>
</div>
<div class="battle-choices" id="battle-choices"></div>
<div class="battle-footer">
<span>Q <span id="battle-q-num">1</span>/100</span>
<span class="kbd-hint">Click or tap an answer · 1–4 keys</span>
<span>PTS: <span id="battle-pts">0</span></span>
</div>
</div>
<!-- RESULT -->
<div id="screen-result" class="screen">
<div class="result-box">
<div class="result-icon" id="result-icon">✓</div>
<div class="result-label" id="result-label">CORRECT!</div>
<div class="result-correct-ans" id="result-correct-ans"></div>
<div class="result-explanation" id="result-explanation"></div>
<div class="result-pts" id="result-pts">+100 PTS</div>
<button class="btn-pixel btn-blue btn-full" id="btn-result-cont">CONTINUE ▶</button>
</div>
</div>
<!-- LEVEL-UP / MILESTONE -->
<div id="screen-levelup" class="screen">
<div class="levelup-box">
<div class="lu-stars blink" id="lu-stars">★ BADGE EARNED! ★</div>
<div class="lu-sprite">🧢</div>
<div class="lu-text"><span id="lu-name">ASH</span> gained Azure EXP!</div>
<div class="lu-badge" id="lu-badge">🏅 CLOUD TRAINEE</div>
<div class="lu-prog-wrap">
<div class="lu-prog-outer"><div class="lu-prog-inner" id="lu-prog-inner"></div></div>
<div class="lu-prog-label" id="lu-prog-label">25 / 100</div>
</div>
<button class="btn-pixel btn-green btn-full" id="btn-lu-cont">CONTINUE ▶</button>
</div>
</div>
<!-- COMPLETION -->
<div id="screen-complete" class="screen">
<div class="complete-scroll">
<div class="complete-area">
<div class="complete-trophy">🏆</div>
<div class="complete-title">CHAMPION!</div>
<div class="complete-name" id="complete-name">ASH</div>
<p class="complete-msg">You've conquered Fundamentals Town and mastered AZ-900! Your Azure journey is just beginning — more towns and exams await!</p>
<div class="complete-stats" id="complete-stats"></div>
<div class="complete-badges">
<div class="badge-row">🥉 CLOUD EXPLORER — Q25</div>
<div class="badge-row">🥈 AZURE APPRENTICE — Q50</div>
<div class="badge-row">🥇 CLOUD PRACTITIONER — Q75</div>
<div class="badge-row">🏆 AZ-900 CHAMPION — Q100</div>
<div class="badge-row">🗺️ More towns & exams coming soon...</div>
</div>
<button class="btn-pixel btn-red btn-full" id="btn-play-again">▶ PLAY AGAIN</button>
</div>
</div>
</div>
</div><!-- /#app -->
<!-- ═══ GBA CONTROLLER OVERLAY ═══════════════════════════════
Shown over map + battle screens. Hidden on all others. -->
<div id="gba-controller" class="gba-controller hidden">
<!-- D-PAD (left) -->
<div class="dpad" id="dpad">
<button class="dpad-btn dpad-up" id="dp-up" aria-label="Up">▲</button>
<button class="dpad-btn dpad-left" id="dp-left" aria-label="Left">◀</button>
<button class="dpad-btn dpad-center" aria-label="Center"></button>
<button class="dpad-btn dpad-right" id="dp-right" aria-label="Right">▶</button>
<button class="dpad-btn dpad-down" id="dp-down" aria-label="Down">▼</button>
</div>
<!-- SELECT / START (center) -->
<div class="gba-mid-btns">
<button class="gba-mid-btn" id="btn-select">SELECT</button>
<button class="gba-mid-btn" id="btn-start">START</button>
</div>
<!-- A / B BUTTONS (right) -->
<div class="ab-cluster">
<button class="ab-btn ab-b" id="btn-b">B</button>
<button class="ab-btn ab-a" id="btn-a">A</button>
</div>
</div>
<div id="toast" class="toast hidden"></div>
<script src="game.js"></script>
</body>
</html>
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

+1346
View File
File diff suppressed because it is too large Load Diff
+642
View File
@@ -0,0 +1,642 @@
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
/* ─── TOKENS ─────────────────────────────────────────────── */
:root {
--black: #0f0f0f;
--darkgray: #2d2d2d;
--gray: #4a4a4a;
--lightgray: #8a8a8a;
--white: #e8e8e8;
--cream: #f0e8c8;
--dark-bg: #1a1a2e;
--red: #c8003a;
--red-hover: #e0004a;
--blue: #0050a0;
--blue-hover: #0068c8;
--green: #008a1e;
--green-hover:#00b026;
--yellow: #f8c030;
--dialog-bg: #f0e8c8;
--dialog-bd: #202040;
--hp-green: #50c020;
--hp-yellow: #c8b000;
--font: 'Press Start 2P', monospace;
--app-w: 420px;
--app-h: 680px;
--safe-bottom: env(safe-area-inset-bottom, 0px);
/* GBA controller palette */
--gba-body: #6a5acd;
--gba-dark: #3d2f99;
--gba-ab-a: #e83030;
--gba-ab-b: #2060d0;
--gba-dpad: #1a1a2e;
}
/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Prevent text selection and touch callouts everywhere in the game */
html, body, #app {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
-webkit-touch-callout: none;
-webkit-tap-highlight-color: transparent;
}
/* ─── BODY ───────────────────────────────────────────────── */
html, body {
height: 100%;
overflow: hidden;
background: #12082a;
background-image:
radial-gradient(ellipse at 20% 50%, rgba(80,0,120,.35) 0%, transparent 55%),
radial-gradient(ellipse at 80% 50%, rgba(0,40,120,.35) 0%, transparent 55%);
display: flex;
align-items: center;
justify-content: center;
font-family: var(--font);
}
/* ─── APP SHELL ──────────────────────────────────────────── */
#app {
position: relative;
width: min(var(--app-w), 100vw);
height: min(var(--app-h), 100dvh);
background: var(--dark-bg);
overflow: hidden;
border: 5px solid #111;
border-radius: 6px;
box-shadow: 0 0 0 2px #333, 0 0 40px rgba(100,80,200,.55), 0 0 90px rgba(80,60,180,.25);
}
#app::after {
content: '';
position: absolute;
inset: 0;
background: repeating-linear-gradient(0deg, transparent 0px, transparent 2px, rgba(0,0,0,.045) 2px, rgba(0,0,0,.045) 4px);
pointer-events: none;
z-index: 900;
}
/* ─── MOBILE FULL-SCREEN ─────────────────────────────────── */
@media (max-width: 480px), (max-height: 720px) {
html, body { align-items: flex-start; }
#app { width: 100vw; height: 100dvh; border: none; border-radius: 0; box-shadow: none; }
}
/* ─── SCREENS ────────────────────────────────────────────── */
.screen { position: absolute; inset: 0; display: none; flex-direction: column; }
.screen.active { display: flex; }
/* ─── ANIMATIONS ─────────────────────────────────────────── */
@keyframes blink { 0%,100%{opacity:1}50%{opacity:0} }
@keyframes fadeIn { from{opacity:0}to{opacity:1} }
@keyframes slideUp { from{transform:translateY(16px);opacity:0}to{transform:translateY(0);opacity:1} }
@keyframes bounce { 0%,100%{transform:translateY(0)}50%{transform:translateY(-7px)} }
@keyframes pop { 0%{transform:scale(.5);opacity:0}65%{transform:scale(1.08)}100%{transform:scale(1);opacity:1} }
@keyframes goldShimmer { 0%,100%{color:#f8c030;text-shadow:0 0 8px #f8c030}50%{color:#ffe878;text-shadow:0 0 18px #ffe878,0 0 36px #f8c030} }
@keyframes blueShimmer { 0%,100%{color:#60c8ff;text-shadow:4px 4px 0 #003d70,0 0 12px #60c8ff}50%{color:#a0e0ff;text-shadow:4px 4px 0 #003d70,0 0 24px #a0e0ff,0 0 48px #60c8ff} }
@keyframes correctPulse { 0%,100%{background:#c8ffc8;border-color:var(--green)}50%{background:#e0ffe0} }
@keyframes wrongShake { 0%,100%{transform:translateX(0)}25%{transform:translateX(-5px)}75%{transform:translateX(5px)} }
@keyframes npcFloat { 0%,100%{transform:translateY(0)}50%{transform:translateY(-8px)} }
@keyframes treeSway { 0%,100%{transform:rotate(-2deg)}50%{transform:rotate(2deg)} }
/* Sprite walk — player.png 384x32px, 24 frames at 16x32px each
Layout: 0-2=down 3-5=up 6-8=left 9-11=right */
@keyframes walkDown { from{background-position-x: 0px} to{background-position-x: -96px} }
@keyframes walkLeft { from{background-position-x: -96px} to{background-position-x: -192px} }
@keyframes walkUp { from{background-position-x:-192px} to{background-position-x: -288px} }
@keyframes walkRight { from{background-position-x:-288px} to{background-position-x: -384px} }
@keyframes dpadPress { 0%{transform:scale(1)}50%{transform:scale(.88)}100%{transform:scale(1)} }
@keyframes abPress { 0%{transform:scale(1)}40%{transform:scale(.82)}100%{transform:scale(1)} }
@keyframes choiceCursor { 0%,100%{box-shadow:0 0 0 3px var(--yellow), 2px 2px 0 var(--darkgray)}50%{box-shadow:0 0 0 3px #ffe878, 2px 2px 0 var(--darkgray)} }
@keyframes talkBubble { 0%{transform:translateY(0)}50%{transform:translateY(-3px)} }
@keyframes arrowPulse { 0%,100%{transform:scale(1) translateX(0);opacity:1} 50%{transform:scale(1.25) translateX(4px);opacity:.7} }
.blink { animation: blink 1s step-end infinite; }
/* ─── DIALOG BOX ─────────────────────────────────────────── */
.dialog-box {
background: var(--dialog-bg);
border: 4px solid var(--dialog-bd);
position: relative;
padding: 16px 14px 12px;
flex-shrink: 0;
}
.dialog-box::before {
content: '';
position: absolute;
inset: 3px;
border: 1px solid rgba(255,255,255,.45);
pointer-events: none;
}
.dialog-speaker {
font-size: 7px;
color: var(--black);
background: var(--dialog-bg);
border: 3px solid var(--dialog-bd);
padding: 3px 8px;
position: absolute;
top: -16px;
left: 10px;
white-space: nowrap;
letter-spacing: .5px;
}
.dialog-text {
font-size: clamp(6.5px, 1.8vw, 8px);
line-height: 2;
color: var(--black);
padding-top: 2px;
min-height: 52px;
}
.dialog-arrow { font-size: 10px; color: var(--black); text-align: right; margin-top: 4px; }
/* ─── PIXEL BUTTONS ──────────────────────────────────────── */
.btn-pixel {
display: inline-block;
font-family: var(--font);
font-size: clamp(7px, 2vw, 9px);
padding: 10px 16px;
border: 3px solid var(--black);
cursor: pointer;
box-shadow: 3px 3px 0 var(--black);
transition: transform .05s, box-shadow .05s;
letter-spacing: .5px;
color: var(--white);
user-select: none;
-webkit-tap-highlight-color: transparent;
}
.btn-pixel:active { transform: translate(3px,3px); box-shadow: none; }
.btn-blue { background: var(--blue); } .btn-blue:hover { background: var(--blue-hover); }
.btn-green { background: var(--green); } .btn-green:hover { background: var(--green-hover); }
.btn-red { background: var(--red); } .btn-red:hover { background: var(--red-hover); }
.btn-full { width: 100%; text-align: center; }
/* ─── OVERWORLD BG ───────────────────────────────────────── */
.overworld-bg {
flex: 1;
position: relative;
overflow: hidden;
background:
repeating-linear-gradient(0deg, transparent 0,transparent 31px, rgba(0,80,0,.12) 31px, rgba(0,80,0,.12) 32px),
repeating-linear-gradient(90deg, transparent 0,transparent 31px, rgba(0,80,0,.12) 31px, rgba(0,80,0,.12) 32px),
linear-gradient(180deg, #6cb84e 0%, #58a83e 100%);
}
/* ═══════════════════════════════════════════════════════════
GBA CONTROLLER OVERLAY
Sits outside #app, fixed to viewport bottom.
Shown only when screen === 'map' or 'battle'.
═══════════════════════════════════════════════════════════ */
.gba-controller {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: clamp(110px, 22vw, 148px);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 clamp(8px,3vw,20px) max(8px, var(--safe-bottom));
background: linear-gradient(180deg, rgba(26,10,62,.82) 0%, rgba(14,6,36,.95) 100%);
backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(6px);
border-top: 2px solid rgba(120,80,255,.35);
z-index: 800;
user-select: none;
touch-action: none;
pointer-events: auto;
}
.gba-controller.hidden { display: none; }
/* Only show controller on touch / small screens by default.
On desktop we rely on keyboard — but controller still shows
if screen is narrow enough. JS toggles it per screen anyway. */
@media (min-width: 900px) {
.gba-controller { display: none !important; }
}
/* ── D-PAD ───────────────────────────────────────────────── */
.dpad {
position: relative;
width: clamp(90px, 21vw, 120px);
height: clamp(90px, 21vw, 120px);
flex-shrink: 0;
}
.dpad-btn {
position: absolute;
background: var(--gba-dpad);
border: 2px solid rgba(255,255,255,.18);
color: rgba(255,255,255,.75);
font-size: clamp(8px, 2.2vw, 11px);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
-webkit-user-select: none;
user-select: none;
touch-action: none;
transition: background .08s;
}
.dpad-btn:active, .dpad-btn.pressed {
background: #3a3a6e;
animation: dpadPress .15s ease;
}
/* Cross layout: 3×3 grid conceptually */
.dpad-up { top:0; left:33.3%; width:33.4%; height:33.4%; border-radius:4px 4px 0 0; }
.dpad-down { bottom:0; left:33.3%; width:33.4%; height:33.4%; border-radius:0 0 4px 4px; }
.dpad-left { top:33.3%; left:0; width:33.4%; height:33.4%; border-radius:4px 0 0 4px; }
.dpad-right { top:33.3%; right:0; width:33.4%; height:33.4%; border-radius:0 4px 4px 0; }
.dpad-center{ top:33.3%; left:33.3%; width:33.4%; height:33.4%; background:#111; border:none; cursor:default; }
/* ── SELECT / START (center strip) ───────────────────────── */
.gba-mid-btns {
display: flex;
flex-direction: row;
gap: 8px;
align-items: center;
justify-content: center;
}
.gba-mid-btn {
background: #2a1a5e;
border: 2px solid rgba(255,255,255,.2);
border-radius: 30px;
color: rgba(255,255,255,.6);
font-family: var(--font);
font-size: clamp(4.5px, 1.2vw, 6px);
padding: clamp(8px, 2vw, 11px) clamp(10px, 2.5vw, 14px);
cursor: pointer;
letter-spacing: .5px;
-webkit-tap-highlight-color: transparent;
transition: background .08s;
min-width: 52px;
text-align: center;
}
.gba-mid-btn:active { background: #3d2f99; }
/* ── A / B BUTTONS ───────────────────────────────────────── */
.ab-cluster {
position: relative;
width: clamp(90px, 21vw, 120px);
height: clamp(90px, 21vw, 120px);
flex-shrink: 0;
}
.ab-btn {
position: absolute;
width: clamp(36px, 9vw, 48px);
height: clamp(36px, 9vw, 48px);
border-radius: 50%;
border: 3px solid rgba(0,0,0,.5);
font-family: var(--font);
font-size: clamp(9px, 2.5vw, 13px);
font-weight: bold;
color: var(--white);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 0 rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.3);
-webkit-tap-highlight-color: transparent;
-webkit-user-select: none;
user-select: none;
touch-action: none;
transition: transform .06s, box-shadow .06s;
}
.ab-btn:active, .ab-btn.pressed {
transform: translateY(3px);
box-shadow: 0 1px 0 rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.2);
animation: abPress .18s ease;
}
/* B = left, A = right (classic GBA layout) */
.ab-b { background: radial-gradient(circle at 35% 35%, #4080ff, var(--gba-ab-b)); bottom: 14%; left: 5%; }
.ab-a { background: radial-gradient(circle at 35% 35%, #ff5555, var(--gba-ab-a)); top: 14%; right: 5%; }
/* label under each button */
.ab-btn::after {
content: attr(id) == 'btn-a' ? 'A' : 'B';
position: absolute;
bottom: -14px;
font-size: 5px;
color: rgba(255,255,255,.4);
letter-spacing: 1px;
}
/* ─── BOOT ───────────────────────────────────────────────── */
#screen-boot { background: var(--white); align-items: center; justify-content: center; animation: fadeIn .4s ease; }
.boot-logo { text-align: center; }
.boot-gameboy { font-size: clamp(8px,2.5vw,11px); color: var(--black); letter-spacing: 4px; margin-bottom: 10px; }
.boot-ding { font-size: 28px; margin-bottom: 8px; animation: goldShimmer 1.5s ease-in-out infinite; }
.boot-copy { font-size: 6px; color: var(--gray); }
/* ─── TITLE ──────────────────────────────────────────────── */
#screen-title { background: linear-gradient(180deg,#08031a 0%,#180a44 45%,#240e6a 75%,#120538 100%); overflow: hidden; }
.title-bg { position:relative; width:100%; height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.title-stars {
position: absolute; inset: 0;
background-image:
radial-gradient(1px 1px at 8% 12%, #fff 100%,transparent),
radial-gradient(1px 1px at 22% 38%, #fff 100%,transparent),
radial-gradient(1px 1px at 43% 8%, #fff 100%,transparent),
radial-gradient(1px 1px at 58% 28%, #fff 100%,transparent),
radial-gradient(1px 1px at 73% 14%, #fff 100%,transparent),
radial-gradient(1px 1px at 87% 42%, #fff 100%,transparent),
radial-gradient(1px 1px at 33% 62%, rgba(255,255,255,.5) 100%,transparent),
radial-gradient(1px 1px at 52% 72%, rgba(255,255,255,.5) 100%,transparent),
radial-gradient(2px 2px at 18% 82%, rgba(255,220,100,.8) 100%,transparent),
radial-gradient(2px 2px at 78% 78%, rgba(255,220,100,.8) 100%,transparent);
}
.title-main { text-align:center; z-index:1; padding:24px 16px; }
.title-logo { margin-bottom:16px; line-height:1; }
.title-poke { font-size:clamp(30px,11vw,50px); color:var(--yellow); text-shadow:4px 4px 0 #7a5800,0 0 24px rgba(248,192,48,.5); animation:goldShimmer 3s ease-in-out infinite; display:inline-block; }
.title-sql { font-size:clamp(30px,11vw,50px); color:#60c8ff; text-shadow:4px 4px 0 #003d70,0 0 24px rgba(96,200,255,.5); display:inline-block; animation:blueShimmer 3s ease-in-out infinite; animation-delay:.4s; }
.title-sub { font-size:clamp(6px,1.8vw,8px); color:rgba(255,255,255,.75); letter-spacing:1px; margin:10px 0 6px; }
.title-edition { font-size:clamp(5.5px,1.6vw,7px); color:var(--yellow); margin-bottom:24px; animation:goldShimmer 3s ease-in-out infinite; }
.title-deco { font-size:clamp(22px,6vw,32px); margin-bottom:28px; display:flex; gap:16px; justify-content:center; }
.title-deco span:nth-child(1){animation:npcFloat 2.0s ease-in-out infinite;}
.title-deco span:nth-child(2){animation:npcFloat 2.4s ease-in-out infinite;}
.title-deco span:nth-child(3){animation:npcFloat 2.8s ease-in-out infinite;}
.title-tap { font-size:clamp(7px,2vw,9px); color:var(--white); letter-spacing:1px; }
.title-footer { position:absolute; bottom:max(12px,var(--safe-bottom)); font-size:6px; color:rgba(255,255,255,.3); letter-spacing:.5px; }
/* ─── CONTINUE ───────────────────────────────────────────── */
#screen-continue { background:linear-gradient(180deg,#08031a 0%,#180a44 100%); align-items:center; justify-content:center; }
.continue-bg { width:90%; max-width:340px; display:flex; flex-direction:column; align-items:center; gap:16px; animation:fadeIn .5s ease; }
.continue-logo { font-size:clamp(16px,5vw,22px); color:var(--yellow); text-shadow:3px 3px 0 #7a5800; animation:goldShimmer 3s ease-in-out infinite; }
.continue-logo span { color:#60c8ff; text-shadow:3px 3px 0 #003d70; }
.continue-card { width:100%; background:var(--dialog-bg); border:4px solid var(--dialog-bd); padding:16px; display:flex; flex-direction:column; gap:10px; box-shadow:4px 4px 0 rgba(0,0,0,.5); }
.continue-card-header { font-size:8px; color:var(--black); margin-bottom:4px; letter-spacing:1px; }
.save-row { display:flex; justify-content:space-between; align-items:center; font-size:clamp(6.5px,1.8vw,8px); }
.save-lbl { color:var(--gray); } .save-val { color:var(--black); }
.continue-or { font-size:7px; color:rgba(255,255,255,.4); letter-spacing:1px; }
.continue-warn{ font-size:6px; color:rgba(255,80,80,.7); text-align:center; line-height:1.8; min-height:14px; }
/* ─── NAME ENTRY ─────────────────────────────────────────── */
#screen-name { background:#c8b88a; padding:14px 10px 10px; gap:10px; }
.name-dialog { flex-shrink:0; }
.name-entry-area { display:flex; flex-direction:column; align-items:center; gap:8px; flex:1; }
.name-display-box { background:var(--white); border:3px solid var(--black); padding:8px 20px; font-size:clamp(14px,4.5vw,20px); color:var(--black); min-width:180px; text-align:center; letter-spacing:4px; box-shadow:inset 2px 2px 0 rgba(0,0,0,.2); }
.keyboard-grid { display:grid; grid-template-columns:repeat(10,1fr); gap:3px; width:100%; }
.key-btn { background:var(--white); border:2px solid var(--black); color:var(--black); font-family:var(--font); font-size:clamp(6px,1.8vw,8px); padding:clamp(5px,1.5vw,8px) 2px; cursor:pointer; text-align:center; box-shadow:2px 2px 0 var(--darkgray); user-select:none; -webkit-tap-highlight-color:transparent; transition:transform .05s,box-shadow .05s; }
.key-btn:active { transform:translate(2px,2px); box-shadow:none; }
.name-controls { display:flex; gap:12px; margin-top:4px; }
.btn-del { background:var(--red); } .btn-del:hover { background:var(--red-hover); }
.btn-ok { background:var(--green); } .btn-ok:hover { background:var(--green-hover); }
/* ─── INTRO ──────────────────────────────────────────────── */
#screen-intro { flex-direction:column-reverse; }
.intro-dialog { margin:10px; min-height:90px; }
.intro-npc { position:absolute; right:22%; bottom:30%; font-size:clamp(44px,13vw,64px); animation:npcFloat 2s ease-in-out infinite; filter:drop-shadow(2px 3px 0 rgba(0,0,0,.4)); }
.intro-player {
position: absolute;
left: 22%;
bottom: 28%;
width: 32px;
height: 64px;
background-image: url('./player.png');
background-repeat: no-repeat;
background-size: 768px 64px;
background-position-x: -32px; /* idle down frame */
background-position-y: 0;
image-rendering: pixelated;
animation: bounce 1s ease-in-out infinite;
filter: drop-shadow(2px 3px 0 rgba(0,0,0,.4));
}
.tap-hint { font-size:6px; color:var(--black); background:rgba(255,255,255,.6); text-align:center; padding:4px; letter-spacing:1px; flex-shrink:0; }
/* ─── MAP ────────────────────────────────────────────────── */
.map-header { background:var(--dark-bg); padding:8px 12px; display:flex; align-items:center; justify-content:space-between; gap:8px; border-bottom:3px solid var(--black); flex-shrink:0; }
.map-left { display:flex; align-items:center; gap:6px; }
.map-pin { font-size:12px; }
.map-town-name { font-size:clamp(5.5px,1.6vw,7px); color:var(--yellow); letter-spacing:.5px; }
.map-right { display:flex; align-items:center; gap:6px; }
.prog-bar-outer { width:80px; height:9px; background:var(--black); border:2px solid var(--lightgray); overflow:hidden; }
.prog-bar-inner { height:100%; width:0%; background:var(--hp-green); transition:width .5s ease; }
.prog-text { font-size:6px; color:var(--white); }
.save-dot { font-size:12px; animation:blink 3s ease-in-out infinite; }
.music-toggle {
font-size: 14px;
cursor: pointer;
opacity: 1;
transition: opacity .2s;
-webkit-tap-highlight-color: transparent;
user-select: none;
padding: 2px 4px;
}
.music-toggle.muted { opacity: .35; }
.map-world {
position: relative;
overflow: hidden;
}
/* Wide scrolling inner world — JS translates this to pan the camera */
.map-inner {
position: absolute;
top: 0; bottom: 0; left: 0;
width: 400%;
will-change: transform;
z-index: 5;
}
.map-trees {
position: absolute;
inset: 0;
pointer-events: none;
}
.tree {
position: absolute;
display: inline-block;
animation: treeSway 3s ease-in-out infinite;
filter: drop-shadow(1px 2px 0 rgba(0,0,0,.3));
line-height: 1;
}
.tree:nth-child(even) { animation-direction: reverse; }
.map-ground {
position: absolute;
bottom: 0; left: 0; right: 0;
height: 48%;
background:
linear-gradient(180deg,
transparent 0%, transparent 54%,
#3d8a28 54%, #4a9e30 58%, #3d8a28 62%, #4aaa32 66%, #3d8a28 100%
),
linear-gradient(180deg,
#4a9e30 0%, #3d8a28 8%, #2d6e1a 10%,
#c8aa6a 10%, #b89858 30%, #c0a060 50%, #b89858 70%, #a88848 88%,
#2d6e1a 90%, #3d8a28 92%, #4a9e30 100%
);
border-top: 3px solid #2d6e1a;
}
/* Directional nudge arrow */
.map-dir-arrow {
position: absolute;
font-size: clamp(24px, 7vw, 34px);
color: var(--yellow);
text-shadow: 0 0 6px rgba(248,192,48,.8), 2px 2px 0 rgba(0,0,0,.5);
pointer-events: none;
z-index: 50;
animation: arrowPulse .7s ease-in-out infinite;
filter: drop-shadow(0 0 4px rgba(248,192,48,.6));
right: 12px; /* pinned to right edge of map viewport */
}
/* NPC lives inside .map-inner, positioned in world-px via JS */
.map-npc-wrap { position:absolute; text-align:center; z-index: 30; }
.npc-bubble { font-size:14px; font-family:var(--font); color:var(--black); background:var(--yellow); border:2px solid var(--black); width:20px; height:20px; display:flex; align-items:center; justify-content:center; margin:0 auto 2px; animation:bounce .7s ease-in-out infinite; }
.map-npc { font-size:clamp(36px,10vw,52px); filter:drop-shadow(2px 3px 0 rgba(0,0,0,.35)); cursor:pointer; }
/* Player is fixed to the viewport centre horizontally; only Y moves */
.map-player {
position: absolute;
width: 32px;
height: 64px;
background-image: url('./player.png');
background-repeat: no-repeat;
background-size: 768px 64px;
background-position: 0 0;
image-rendering: pixelated;
filter: drop-shadow(2px 3px 0 rgba(0,0,0,.4));
z-index: 99;
font-size: 0;
color: transparent;
}
.map-player.walk-down { animation: walkDown .32s steps(3) infinite; }
.map-player.walk-up { animation: walkUp .32s steps(3) infinite; }
.map-player.walk-left { animation: walkLeft .32s steps(3) infinite; }
.map-player.walk-right { animation: walkRight .32s steps(3) infinite; }
.map-player.idle { animation: none; background-position-x: 0px; }
/* Talk hint that floats above player when near NPC */
.map-talk-hint {
position: absolute;
font-family: var(--font);
font-size: 6px;
background: var(--yellow);
color: var(--black);
border: 2px solid var(--black);
padding: 3px 6px;
white-space: nowrap;
z-index: 11;
animation: talkBubble .6s ease-in-out infinite;
pointer-events: none;
}
/* Desktop: show "Press E", hide "Press A" */
.hint-touch { display: none; }
.hint-pc { display: inline; }
/* Touch/mobile: show "Press A", hide "Press E" */
@media (pointer: coarse) {
.hint-touch { display: inline; }
.hint-pc { display: none; }
}
/* HUD below map */
.map-hud { background:var(--dialog-bg); border-top:4px solid var(--dialog-bd); padding:8px 10px; display:flex; gap:0; flex-shrink:0; }
.hud-cell { flex:1; text-align:center; border-right:2px solid rgba(0,0,0,.15); padding:0 4px; }
.hud-cell:last-child { border-right:none; }
.hud-lbl { font-size:5.5px; color:var(--gray); margin-bottom:3px; }
.hud-val { font-size:clamp(7px,2vw,9px); color:var(--black); }
/* ─── BATTLE ─────────────────────────────────────────────── */
#screen-battle { flex-direction:column; }
.battle-scene {
display:flex; justify-content:space-between; align-items:flex-end;
padding:10px 16px 6px;
background:linear-gradient(180deg,#90c8f0 0%,#70b0e0 55%,#c8b880 55%,#b09860 100%);
flex-shrink:0; min-height:clamp(100px,22vh,150px); position:relative;
}
.battle-scene::after { content:''; position:absolute; top:55%; left:0; right:0; height:2px; background:rgba(0,0,0,.18); }
.battle-npc-side, .battle-player-side { display:flex; flex-direction:column; align-items:center; gap:4px; }
.battle-sprite { font-size:clamp(38px,11vw,56px); filter:drop-shadow(2px 3px 0 rgba(0,0,0,.3)); animation:npcFloat 2s ease-in-out infinite; }
.battle-player-side .battle-sprite { animation:bounce 1s ease-in-out infinite; }
/* Player sprite on battle screen — use sprite sheet facing down-idle */
.battle-player-sprite {
width: 48px;
height: 96px;
background-image: url('./player.png');
background-repeat: no-repeat;
background-size: 1152px 96px; /* 3× scale */
background-position-x: -48px; /* idle down frame */
background-position-y: 0;
image-rendering: pixelated;
filter: drop-shadow(2px 3px 0 rgba(0,0,0,.3));
animation: bounce 1s ease-in-out infinite;
}
.battle-name-tag { font-size:clamp(5.5px,1.6vw,7px); background:rgba(255,255,255,.8); border:2px solid var(--black); padding:2px 6px; color:var(--black); }
.battle-dialog { margin:8px; min-height:72px; }
.battle-choices { display:grid; grid-template-columns:1fr 1fr; gap:5px; padding:5px 8px; flex-shrink:0; }
/* choice button */
.choice-btn {
background:var(--dialog-bg);
border:3px solid var(--dialog-bd);
color:var(--black);
font-family:var(--font);
font-size:clamp(6px,1.7vw,7.5px);
padding:clamp(7px,2vw,10px) clamp(6px,2vw,10px);
cursor:pointer;
text-align:left;
line-height:1.8;
box-shadow:2px 2px 0 var(--darkgray);
word-break:break-word;
hyphens:auto;
transition:transform .06s, box-shadow .06s, border-color .08s;
-webkit-tap-highlight-color:transparent;
position:relative;
}
.choice-btn::before { content:attr(data-letter) ' '; color:var(--blue); }
.choice-btn:hover { background:#fffae0; border-color:var(--blue); transform:translate(-1px,-1px); box-shadow:3px 3px 0 var(--darkgray); }
.choice-btn:active { transform:translate(2px,2px); box-shadow:none; }
/* D-pad / keyboard cursor highlight */
.choice-btn.cursor { animation:choiceCursor .7s ease-in-out infinite; border-color:var(--yellow) !important; background:#fffae0 !important; }
.choice-btn.correct { background:#c8ffc8; border-color:var(--green); animation:correctPulse .5s ease 3; pointer-events:none; }
.choice-btn.wrong { background:#ffc8c8; border-color:var(--red); animation:wrongShake .35s ease; pointer-events:none; }
.choice-btn.disabled{ opacity:.5; pointer-events:none; }
.choice-btn.selected{ background:#e0f0ff; border-color:var(--blue); box-shadow:3px 3px 0 var(--blue); }
.choice-btn.selected::after { content:' ✔'; color:var(--blue); font-size:0.9em; }
.choice-btn.confirm-btn { background:var(--blue); color:#fff; border-color:#003080; text-align:center; margin-top:4px; }
.choice-btn.confirm-btn:hover:not(:disabled) { background:#0050d0; }
.choice-btn.confirm-btn:disabled { opacity:.4; pointer-events:none; }
.choice-btn.confirm-btn::before { content:''; }
.multi-hint { font-family:var(--font); font-size:clamp(5px,1.4vw,6.5px); color:var(--blue); margin-bottom:4px; text-align:center; letter-spacing:.05em; }
.battle-footer { background:var(--dark-bg); border-top:3px solid var(--black); padding:clamp(4px,1.2vw,6px) 12px max(4px,var(--safe-bottom)); display:flex; justify-content:space-between; align-items:center; font-size:clamp(5.5px,1.5vw,7px); color:var(--yellow); flex-shrink:0; }
.kbd-hint { font-size:5px; color:rgba(255,255,255,.3); }
@media (max-width:480px) { .kbd-hint { display:none; } }
/* ─── RESULT ─────────────────────────────────────────────── */
#screen-result { background:rgba(0,0,0,.86); align-items:center; justify-content:center; }
.result-box { background:var(--dialog-bg); border:4px solid var(--dialog-bd); padding:clamp(16px,4.5vw,26px) clamp(12px,3.5vw,20px); width:clamp(270px,88vw,390px); text-align:center; box-shadow:6px 6px 0 rgba(0,0,0,.5); animation:pop .4s cubic-bezier(.175,.885,.32,1.275); display:flex; flex-direction:column; gap:9px; }
.result-icon { font-size:clamp(26px,8vw,40px); }
.result-label { font-size:clamp(11px,3.5vw,15px); }
.result-label.correct { color:var(--green); text-shadow:2px 2px 0 #003010; }
.result-label.wrong { color:var(--red); text-shadow:2px 2px 0 #400010; }
.result-correct-ans { font-size:clamp(6px,1.8vw,7.5px); color:var(--green); background:rgba(0,160,30,.1); border:2px solid rgba(0,160,30,.3); padding:6px; text-align:left; line-height:1.8; display:none; }
.result-correct-ans.visible { display:block; }
.result-explanation { font-size:clamp(6px,1.8vw,7.5px); color:var(--black); line-height:2; text-align:left; padding:8px; background:rgba(255,255,255,.5); border:2px solid rgba(0,0,0,.15); }
.result-pts { font-size:clamp(9px,2.8vw,12px); color:var(--yellow); text-shadow:2px 2px 0 #604000; animation:goldShimmer 2s ease-in-out infinite; }
/* ─── LEVEL UP ───────────────────────────────────────────── */
#screen-levelup { background:linear-gradient(135deg,#0f0630,#220e5e,#0a0a34); align-items:center; justify-content:center; }
.levelup-box { text-align:center; padding:clamp(16px,4vw,28px) clamp(14px,3.5vw,22px); width:90%; max-width:360px; display:flex; flex-direction:column; gap:12px; animation:fadeIn .5s ease; }
.lu-stars { font-size:clamp(7px,2vw,9px); color:var(--yellow); text-shadow:0 0 8px var(--yellow); letter-spacing:1px; }
.lu-sprite { font-size:clamp(52px,15vw,74px); animation:bounce 1s ease-in-out infinite; }
.lu-text { font-size:clamp(7.5px,2.2vw,9px); color:var(--white); line-height:2; }
.lu-badge { font-size:clamp(7px,2vw,9px); color:var(--yellow); background:rgba(255,255,255,.08); border:2px solid var(--yellow); padding:clamp(8px,2.5vw,12px); }
.lu-prog-wrap{ display:flex; flex-direction:column; gap:5px; align-items:center; }
.lu-prog-outer{ width:80%; height:12px; background:var(--black); border:2px solid var(--lightgray); overflow:hidden; }
.lu-prog-inner{ height:100%; background:var(--hp-green); transition:width .8s ease; }
.lu-prog-label{ font-size:7px; color:var(--white); }
/* ─── COMPLETE ───────────────────────────────────────────── */
#screen-complete { background:linear-gradient(180deg,#08031a 0%,#180a44 100%); overflow:hidden; }
.complete-scroll { overflow-y:auto; height:100%; -webkit-overflow-scrolling:touch; }
.complete-area { text-align:center; padding:clamp(18px,4.5vw,28px) clamp(12px,3.5vw,18px) max(22px,var(--safe-bottom)); display:flex; flex-direction:column; gap:12px; align-items:center; animation:fadeIn .7s ease; }
.complete-trophy { font-size:clamp(44px,13vw,64px); animation:goldShimmer 2s ease-in-out infinite; }
.complete-title { font-size:clamp(16px,5.5vw,24px); color:var(--yellow); text-shadow:3px 3px 0 #604000; animation:goldShimmer 2s ease-in-out infinite; }
.complete-name { font-size:clamp(9px,2.8vw,13px); color:var(--white); }
.complete-msg { font-size:clamp(6px,1.7vw,7.5px); color:rgba(255,255,255,.8); line-height:2.2; max-width:360px; text-align:left; }
.complete-stats { font-size:clamp(7px,2vw,8.5px); color:var(--yellow); background:rgba(255,255,255,.08); border:2px solid rgba(255,255,255,.15); padding:clamp(10px,3vw,16px); line-height:2.6; width:100%; max-width:340px; text-align:left; white-space:pre-line; }
.complete-badges { width:100%; max-width:340px; display:flex; flex-direction:column; gap:6px; }
.badge-row { font-size:clamp(6.5px,1.8vw,8px); color:var(--white); padding:8px 10px; border:2px solid rgba(248,192,48,.35); background:rgba(255,255,255,.04); text-align:left; }
/* ─── TOAST ──────────────────────────────────────────────── */
.toast { position:absolute; bottom:max(20px,var(--safe-bottom)); left:50%; transform:translateX(-50%); background:var(--dark-bg); border:3px solid var(--yellow); color:var(--yellow); font-family:var(--font); font-size:clamp(6.5px,1.8vw,8px); padding:10px 18px; z-index:950; animation:slideUp .3s ease; white-space:nowrap; max-width:90%; overflow:hidden; text-overflow:ellipsis; }
.hidden { display:none !important; }