/* Turds — litter-box artillery. Dark-themed to match the site. */
:root {
  --bg: #17120f;
  --ink: #f4e6c2;
  --amber: #ecc06a;
  --brown: #6b4423;
  --panel: rgba(30, 22, 16, 0.92);
  --panel-edge: rgba(236, 192, 106, 0.4);
  --font: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; width: 100%; height: 100%; height: 100dvh; overflow: hidden;
  background: radial-gradient(ellipse 90% 60% at 50% -10%, rgba(236, 192, 106, 0.14), transparent), var(--bg);
  color: var(--ink); font-family: var(--font);
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
}
#app { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
#game-root { position: relative; width: 100%; height: 100%; }
#viewport { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: crosshair; }
#viewport canvas { display: block; width: 100%; height: 100%; }

.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 20; padding: 1rem; }
.overlay.hidden, .hidden { display: none !important; }
.panel { background: var(--panel); border: 2px solid var(--panel-edge); border-radius: 14px; padding: 1.6rem 2rem; text-align: center; max-width: 90%; box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5); }
.banner { background: var(--panel); border: 2px solid var(--panel-edge); border-radius: 10px; padding: 0.6rem 1.4rem; font-weight: 800; letter-spacing: 0.08em; }
.logo { margin: 0 0 0.3rem; font-size: clamp(2.4rem, 10vw, 4rem); font-weight: 900; letter-spacing: 0.08em; color: var(--brown); -webkit-text-stroke: 2px var(--amber); text-shadow: 3px 3px 0 #000; }
.tagline { margin: 0.2rem auto 1rem; color: #d8c6a0; font-size: clamp(0.85rem, 3vw, 1.05rem); max-width: 30ch; }
.arcade-btn { font-family: inherit; font-weight: 800; letter-spacing: 0.06em; font-size: 1.1rem; color: #1a1208; background: var(--amber); border: 0; border-radius: 8px; padding: 0.7rem 1.6rem; cursor: pointer; box-shadow: 0 4px 0 #a9843a; }
.arcade-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #a9843a; }
.controls { list-style: none; margin: 1rem 0 0.4rem; padding: 0; font-size: 0.82rem; color: #b9a680; line-height: 1.7; }
.hs { margin: 0.8rem 0 0; color: var(--amber); font-weight: 700; }
#go-score { font-size: 1.6rem; font-weight: 900; color: var(--amber); margin: 0.2rem 0; }
#gameover-title { margin: 0 0 0.2rem; color: var(--brown); -webkit-text-stroke: 1px var(--amber); font-size: 1.6rem; }

#hud { position: absolute; top: 0; left: 0; right: 0; z-index: 15; display: flex; align-items: center; gap: 1rem; padding: 0.5rem 0.9rem; font-weight: 800; text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.6); background: linear-gradient(180deg, rgba(10, 6, 4, 0.5), transparent); pointer-events: none; flex-wrap: wrap; }
.hud-item { display: flex; align-items: baseline; gap: 0.35rem; font-size: 1.05rem; }
.hud-label { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); }
.hud-item.power { align-items: center; }
.power-bar { display: inline-block; width: 90px; height: 10px; border: 1px solid var(--panel-edge); border-radius: 5px; overflow: hidden; background: rgba(0,0,0,0.4); }
#power-fill { display: block; width: 0%; height: 100%; background: linear-gradient(90deg, #e0c060, #e0562a); }

.hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 15; background: rgba(30,22,16,0.7); border: 1px solid var(--panel-edge); border-radius: 8px; padding: 0.4rem 0.9rem; font-size: 0.85rem; color: var(--ink); pointer-events: none; }
#vignette { position: absolute; inset: 0; pointer-events: none; z-index: 12; box-shadow: inset 0 0 120px rgba(10, 6, 4, 0.5); }
.frame-btn { position: absolute; right: 10px; bottom: 10px; z-index: 16; font-size: 1.1rem; color: var(--ink); background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 6px; padding: 0.2rem 0.5rem; cursor: pointer; }
html.touch .frame-btn { display: none; }

@media (max-width: 560px) { #hud { gap: 0.6rem; } .hud-item { font-size: 0.9rem; } .power-bar { width: 64px; } }

/* Force landscape on phones: cover the screen with a rotate prompt in portrait. */
#rotate { display: none; }
html.touch #rotate {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center; text-align: center;
  background: var(--bg); color: var(--ink);
}
.rotate-inner { font-weight: 800; font-size: 1.3rem; line-height: 1.5; }
.rotate-icon { font-size: 3rem; color: var(--amber); animation: rot 1.6s ease-in-out infinite; }
@keyframes rot { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(90deg); } }
@media (orientation: portrait) {
  html.touch #rotate { display: flex; }
  html.touch #app { visibility: hidden; }
}
