:root {
  --cy: #6ff0ff;
  --am: #ffd27a;
  --bg: rgba(6, 14, 20, 0.55);
  --ok: #8effa6;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #02040a; }
#app { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
#hud {
  position: fixed; inset: 0; pointer-events: none; z-index: 10;
  font-family: "Rajdhani", "Segoe UI", system-ui, sans-serif;
  color: #eaffff; text-transform: uppercase; letter-spacing: 0.12em;
  font-weight: 600; user-select: none;
}
.panel {
  position: absolute; background: var(--bg); border: 1px solid rgba(111,240,255,0.3);
  padding: 10px 14px; backdrop-filter: blur(3px);
  box-shadow: 0 0 18px rgba(0,0,0,0.4), inset 0 0 18px rgba(111,240,255,0.05);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
#mode { top: 22px; left: 24px; font-size: 14px; }
#mode .tag { color: var(--cy); font-size: 22px; letter-spacing: 0.18em; }
#mode .sub { color: #9fe9ff; font-size: 12px; opacity: 0.8; }

#res { top: 22px; right: 24px; text-align: right; min-width: 180px; }
#res .row { display: flex; justify-content: space-between; gap: 18px; font-size: 15px; margin: 3px 0; }
#res .k { color: #9fe9ff; opacity: 0.85; }
#res .v { color: var(--cy); font-variant-numeric: tabular-nums; }
#res .v.am { color: var(--am); }

#goal { bottom: 26px; left: 24px; font-size: 14px; min-width: 250px; }
#goal h4 { color: var(--cy); font-size: 13px; margin-bottom: 7px; letter-spacing: 0.2em; }
#goal .task { display: flex; align-items: center; gap: 9px; margin: 5px 0; color: #cfeefc; }
#goal .task .box { width: 13px; height: 13px; border: 1px solid var(--cy); transform: rotate(45deg); flex: 0 0 auto; }
#goal .task.done { color: var(--ok); }
#goal .task.done .box { background: var(--ok); border-color: var(--ok); }
#goal .prog { color: var(--am); font-variant-numeric: tabular-nums; }

#hint {
  bottom: 40px; left: 50%; transform: translateX(-50%);
  font-size: 16px; color: #eaffff; text-align: center;
  background: var(--bg); padding: 9px 22px; border: 1px solid rgba(111,240,255,0.35);
  opacity: 0; transition: opacity 0.3s; clip-path: polygon(10px 0,100% 0,calc(100% - 10px) 100%,0 100%);
}
#hint.show { opacity: 1; }
#hint b { color: var(--am); font-size: 19px; }

#cross { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); opacity: 0; transition: opacity .3s; }
#cross.show { opacity: 0.8; }

#banner {
  position: absolute; left: 50%; top: 28%; transform: translate(-50%,-50%) translateX(-60vw);
  text-align: center; opacity: 0; transition: transform 0.9s cubic-bezier(.2,.9,.2,1), opacity 0.6s;
}
#banner.show { transform: translate(-50%,-50%) translateX(0); opacity: 1; }
#banner .welcome { font-size: 15px; color: #9fe9ff; letter-spacing: 0.4em; }
#banner .pname { font-size: 52px; color: #fff; letter-spacing: 0.06em; text-shadow: 0 0 26px var(--cy); margin: 6px 0; }
#banner .biome { font-size: 18px; color: var(--am); letter-spacing: 0.3em; }
#banner .rule { width: 320px; height: 2px; margin: 12px auto 0; background: linear-gradient(90deg, transparent, var(--cy), transparent); }

#cockpit { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .5s; }
#cockpit.show { opacity: 1; }

#win {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(4,10,18,0.55), rgba(2,4,10,0.92));
  opacity: 0; pointer-events: none; transition: opacity 1s;
}
#win.show { opacity: 1; }
#win .big { font-size: 64px; color: #fff; letter-spacing: 0.14em; text-shadow: 0 0 40px var(--cy); }
#win .sub { color: var(--cy); letter-spacing: 0.4em; margin-top: 8px; font-size: 16px; }
#win .stats { margin-top: 30px; display: grid; grid-template-columns: auto auto; gap: 8px 40px; font-size: 20px; }
#win .stats .k { color: #9fe9ff; text-align: right; }
#win .stats .v { color: var(--am); text-align: left; font-variant-numeric: tabular-nums; }

#flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }

@font-face {
  font-family: "Rajdhani";
  src: local("Rajdhani"), local("Segoe UI");
}
