/* Pumpkin Panic — base shell styles. HUD/menu styling lives in js/fx/hud.js. */

:root {
  --night: #1a1030;
  --night-2: #241640;
  --night-3: #120a24;
  --pumpkin: #ff8c2e;
  --slime: #7ef29d;
  --bone: #f4ead5;
  --blood: #e2453c;
  --candy: #ff7bac;
  --ink: #160d29;

  --font-display: "Trebuchet MS", "Lucida Grande", Verdana, sans-serif;
  --font-ui: "Trebuchet MS", "Lucida Grande", Verdana, sans-serif;

  --outline: 3px;
  --shadow-hard: 4px 4px 0 rgba(10, 4, 22, 0.85);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

html {
  background: var(--night-3);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 8%, rgba(80, 44, 120, 0.35) 0%, rgba(26, 16, 48, 0) 62%),
    var(--night);
  color: var(--bone);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  touch-action: none;
}

#app {
  position: fixed;
  inset: 0;
  isolation: isolate;
  overflow: hidden;
}

#game {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: var(--night);
  touch-action: none;
  cursor: crosshair;
  -webkit-user-select: none;
  user-select: none;
}

#game:focus-visible {
  outline: var(--outline) solid var(--pumpkin);
  outline-offset: calc(var(--outline) * -1);
}

/* Soft screen vignette. Purely decorative, never eats input. */
#app::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  box-shadow:
    inset 0 0 90px rgba(7, 2, 16, 0.55),
    inset 0 0 220px rgba(7, 2, 16, 0.28);
}

/* Optional helpers available to the HUD / menus. */
.panel {
  background: var(--night-2);
  border: var(--outline) solid var(--bone);
  border-radius: 14px;
  box-shadow: var(--shadow-hard);
  color: var(--bone);
}

.btn {
  appearance: none;
  min-height: 44px;
  padding: 10px 22px;
  border: var(--outline) solid var(--ink);
  border-radius: 999px;
  background: var(--pumpkin);
  color: var(--ink);
  font: 700 18px/1.1 var(--font-display);
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-hard);
  cursor: pointer;
  touch-action: manipulation;
}

.btn:hover,
.btn:focus-visible {
  background: #ffb15e;
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 rgba(10, 4, 22, 0.85);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

::selection {
  background: var(--pumpkin);
  color: var(--ink);
}

.noscript {
  position: fixed;
  inset: auto 16px 24px;
  z-index: 9;
  margin: 0;
  padding: 14px 18px;
  border: var(--outline) solid var(--bone);
  border-radius: 12px;
  background: var(--night-2);
  color: var(--bone);
  font: 700 16px/1.35 var(--font-ui);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
