/* Geometry Dash–inspired neon arcade UI (product spec §8) */

:root {
  --bg-deep: #0a0e1a;
  --bg-panel: #12182a;
  --text: #f2f5ff;
  --text-muted: #a8b4d6;
  --accent-blue: #00d4ff;
  --accent-green: #39ff14;
  --accent-magenta: #ff2ea6;
  --accent-yellow: #ffe600;
  --border-glow: rgba(0, 212, 255, 0.45);
  --shadow-magenta: rgba(255, 46, 166, 0.35);
  --font-display: "Orbitron", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
  --radius-card: 14px;
  --radius-btn: 999px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(0, 212, 255, 0.12), transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(255, 46, 166, 0.08), transparent 50%),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(57, 255, 20, 0.06), transparent 45%),
    var(--bg-deep);
}

.page {
  max-width: 52rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.site-header {
  text-align: center;
  margin-bottom: 2rem;
}

.site-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.35rem, 4vw, 2rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
  background: linear-gradient(
    105deg,
    var(--accent-blue),
    var(--accent-green) 40%,
    var(--accent-magenta) 75%,
    var(--accent-yellow)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px var(--shadow-magenta);
}

.site-subtitle {
  margin: 0 auto;
  max-width: 36rem;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 400;
}

.site-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.roll-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bg-deep);
  background: linear-gradient(
    135deg,
    var(--accent-yellow) 0%,
    var(--accent-green) 45%,
    var(--accent-blue) 100%
  );
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.25),
    0 0 24px rgba(0, 212, 255, 0.5),
    0 6px 20px rgba(0, 0, 0, 0.45);
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease;
}

.roll-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.35),
    0 0 32px rgba(255, 46, 166, 0.55),
    0 10px 28px rgba(0, 0, 0, 0.5);
}

.roll-button:active {
  transform: translateY(0) scale(0.99);
}

.roll-button:focus {
  outline: none;
}

.roll-button:focus-visible {
  outline: 3px solid var(--accent-yellow);
  outline-offset: 4px;
}

.roll-button-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.roll-hint {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 28rem;
}

.results {
  min-height: 8rem;
}

.results[data-state="empty"] .results-placeholder {
  display: block;
}

.results-inner {
  position: relative;
}

.results-placeholder {
  margin: 0;
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed rgba(168, 180, 214, 0.35);
  border-radius: var(--radius-card);
  background: rgba(18, 24, 42, 0.5);
}

.results-placeholder.hidden,
.mission-panel.hidden {
  display: none;
}

.mission-panel {
  padding: 1.5rem 1.25rem 1.75rem;
  border-radius: var(--radius-card);
  background: linear-gradient(160deg, var(--bg-panel) 0%, #0d1220 100%);
  border: 1px solid var(--border-glow);
  box-shadow:
    0 0 0 1px rgba(255, 46, 166, 0.15),
    0 12px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}

.mission-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 60px rgba(0, 212, 255, 0.06);
}

.mission-label {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-blue);
}

.level-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  letter-spacing: 0.03em;
  margin: 0 0 1.5rem;
  color: var(--text);
  text-shadow:
    0 0 20px rgba(0, 212, 255, 0.35),
    0 0 40px rgba(255, 46, 166, 0.2);
}

.level-name--pulse {
  animation: namePulse 0.65s ease-out 1;
}

@keyframes namePulse {
  0% {
    transform: scale(0.92);
    opacity: 0.5;
    filter: blur(2px);
  }
  40% {
    transform: scale(1.04);
    opacity: 1;
    filter: blur(0);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.param-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .param-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.param-card {
  --stagger: 0;
  margin: 0;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: rgba(10, 14, 26, 0.65);
  border: 1px solid rgba(168, 180, 214, 0.2);
  animation: cardIn 0.45s ease backwards;
  animation-delay: calc(var(--stagger) * 70ms);
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.param-card__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.param-card__value {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

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

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

  .roll-button:hover {
    transform: none;
  }
}
