:root {
  --bg: #04070d;
  --bg-deep: #010205;
  --ink: #f4efe6;
  --muted: #b6aea0;
  --ember: #ff8d62;
  --acid: #7ce8d0;
  --line: rgba(244, 239, 230, 0.2);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  overflow: hidden;
  color: var(--ink);
  font-family: 'Bricolage Grotesque', sans-serif;
  background:
    radial-gradient(circle at 14% 14%, rgba(255, 141, 98, 0.16), transparent 0 32%),
    radial-gradient(circle at 84% 10%, rgba(124, 232, 208, 0.14), transparent 0 30%),
    linear-gradient(180deg, #0d121a 0%, var(--bg) 44%, var(--bg-deep) 100%);
}

button {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#renderCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.03), transparent 0 30%),
    linear-gradient(180deg, #05080d 0%, #010205 100%);
}

.grid-overlay,
.grain,
.aura {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.grid-overlay {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, rgba(255, 255, 255, 0.7) 24%, transparent 88%);
  opacity: 0.42;
}

.grain {
  opacity: 0.12;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.26) 0 0.7px, transparent 0.8px),
    radial-gradient(circle at 72% 64%, rgba(255, 255, 255, 0.2) 0 0.7px, transparent 0.8px),
    radial-gradient(circle at 85% 16%, rgba(255, 255, 255, 0.15) 0 0.8px, transparent 0.9px);
  background-size: 160px 160px;
}

.aura {
  filter: blur(30px);
  mix-blend-mode: screen;
}

.aura-a {
  background: radial-gradient(circle at 12% 12%, rgba(255, 141, 98, 0.22), transparent 34%);
}

.aura-b {
  background: radial-gradient(circle at 82% 14%, rgba(124, 232, 208, 0.18), transparent 32%);
}

.quick-action,
.start-button {
  appearance: none;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.quick-action:hover,
.start-button:hover {
  transform: translateY(-1px);
}

.quick-action {
  position: fixed;
  right: 14px;
  top: 14px;
  z-index: 11;
  min-height: 38px;
  padding: 0 14px;
  background: rgba(8, 12, 18, 0.66);
}

.quick-action:hover {
  border-color: rgba(124, 232, 208, 0.46);
  background: rgba(124, 232, 208, 0.16);
  color: #041915;
}

.status-pill {
  position: fixed;
  left: 14px;
  top: 14px;
  z-index: 11;
  max-width: min(76vw, 560px);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 12, 18, 0.72);
  padding: 10px 14px;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.9);
}

.toast {
  position: fixed;
  left: 50%;
  top: 20px;
  transform: translate(-50%, -18px);
  z-index: 14;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(6, 9, 13, 0.9);
  padding: 11px 14px;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.gate {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 20px;
  background: rgba(3, 5, 8, 0.5);
  backdrop-filter: blur(6px);
  z-index: 13;
}

.gate[hidden] {
  display: none;
}

.start-button {
  min-height: 52px;
  padding: 0 24px;
  border-color: rgba(255, 141, 98, 0.5);
  background: linear-gradient(135deg, var(--ember), #ffac86);
  color: #1c110c;
}

.gate-note {
  margin: 0;
  max-width: min(88vw, 720px);
  text-align: center;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .status-pill {
    top: 10px;
    left: 10px;
    max-width: calc(100vw - 20px);
    border-radius: 14px;
    letter-spacing: 0.08em;
  }

  .quick-action {
    top: auto;
    right: 10px;
    bottom: 10px;
  }

  .gate-note {
    font-size: 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
