/* ------------------------------------------------------------------
   Base: design tokens, reset and page background
   ------------------------------------------------------------------ */

:root {
  --bg-1: #140c2b;
  --bg-2: #24124a;
  --ink: #1b1330;
  --paper: #fff8ec;
  --text: #f4efff;
  --muted: #b7a9d9;

  --orange: #ff8a1f;
  --orange-d: #c4520a;
  --yellow: #ffd23f;
  --pink: #ff4d8d;
  --pink-d: #b81f5a;
  --blue: #3db8ff;
  --blue-d: #1a6fc0;
  --purple: #9a6bff;
  --purple-d: #5a33c4;
  --green: #4ade80;
  --red: #ff4d5e;

  --font-display: 'Lilita One', 'Arial Black', 'Trebuchet MS', sans-serif;
  --font-body: 'Nunito', 'Segoe UI', system-ui, sans-serif;

  --ui-scale: 1;
  --radius: 18px;
}

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

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

body {
  background: radial-gradient(ellipse at 50% 20%, var(--bg-2), var(--bg-1) 70%);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 800;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

body.ready {
  opacity: 1;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
}

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0.1em 0.45em;
  border-radius: 6px;
  background: #f4efff;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 0.85em;
  box-shadow: 0 3px 0 #8f82b8;
  text-align: center;
}

.hidden {
  display: none !important;
}

/* Animated backdrop pattern (subtle drifting bombs + sparkles) */
.bg-pattern {
  position: fixed;
  inset: -80px;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    radial-gradient(circle at 20px 20px, #7d5cff 5px, transparent 6px),
    radial-gradient(circle at 60px 60px, #ff4d8d 3px, transparent 4px);
  background-size: 80px 80px;
  animation: drift 16s linear infinite;
}

@keyframes drift {
  to {
    transform: translate(80px, 80px);
  }
}

.noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 24px;
}
