:root {
  --bg-1: #020712;
  --bg-2: #08172a;
  --bg-3: #112641;
  --panel: rgba(6, 14, 28, 0.78);
  --panel-border: rgba(154, 199, 255, 0.18);
  --text: #eff7ff;
  --muted: #b8c8d8;
  --accent: #8ff6ca;
  --danger: #ffadad;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(143, 246, 202, 0.14), transparent 32%),
    radial-gradient(circle at bottom right, rgba(255, 243, 174, 0.12), transparent 24%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2) 52%, var(--bg-3));
}

.page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 24px;
}

.page::before,
.page::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.page::before {
  background-image:
    radial-gradient(circle at 15% 18%, rgba(255, 255, 255, 0.7) 0 1px, transparent 1.5px),
    radial-gradient(circle at 78% 28%, rgba(255, 255, 255, 0.6) 0 1px, transparent 1.5px),
    radial-gradient(circle at 62% 78%, rgba(255, 255, 255, 0.5) 0 1px, transparent 1.5px),
    radial-gradient(circle at 24% 82%, rgba(255, 255, 255, 0.35) 0 1px, transparent 1.5px),
    radial-gradient(circle at 88% 72%, rgba(255, 255, 255, 0.4) 0 1px, transparent 1.5px);
  opacity: 0.85;
}

.page::after {
  background: radial-gradient(circle at center, transparent 40%, rgba(0, 0, 0, 0.28));
}

.space {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.launch-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.panel {
  position: relative;
  z-index: 1;
  width: min(100%, 580px);
  padding: 32px;
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  background: var(--panel);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  line-height: 0.95;
}

.intro,
.hint,
.status {
  max-width: 48ch;
  line-height: 1.6;
}

.intro {
  margin: 16px 0 0;
  color: var(--muted);
}

.word-form {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.word-form input,
.word-form button {
  border: 0;
  border-radius: 999px;
  font: inherit;
}

.word-form input {
  flex: 1;
  min-width: 0;
  padding: 16px 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  outline: 1px solid rgba(255, 255, 255, 0.06);
}

.word-form input::placeholder {
  color: rgba(239, 247, 255, 0.52);
}

.word-form input:focus {
  outline: 2px solid rgba(143, 246, 202, 0.55);
}

.word-form button {
  padding: 16px 22px;
  font-weight: 700;
  color: #041117;
  background: linear-gradient(135deg, #8ff6ca, #fff19a);
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease;
}

.word-form button:hover {
  transform: translateY(-1px);
}

.word-form button:disabled,
.word-form input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.status {
  min-height: 1.8em;
  margin: 14px 0 0;
  color: var(--text);
}

.status[data-state="success"] {
  color: var(--accent);
}

.status[data-state="error"] {
  color: var(--danger);
}

.hint {
  margin: 8px 0 0;
  color: rgba(239, 247, 255, 0.68);
  font-size: 0.92rem;
}

.word {
  --scale: 1;
  --hue: 190;
  --opacity: 0.92;

  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid hsla(var(--hue), 88%, 84%, 0.34);
  background: linear-gradient(135deg, hsla(var(--hue), 85%, 72%, 0.2), rgba(9, 21, 38, 0.88));
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.25),
    0 0 22px hsla(var(--hue), 85%, 70%, 0.16);
  color: #ffffff;
  font-size: clamp(0.95rem, 0.76rem + 0.8vw, 1.3rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  opacity: var(--opacity);
  transform: translate3d(0, 0, 0) scale(var(--scale));
  text-shadow: 0 0 16px hsla(var(--hue), 100%, 92%, 0.32);
  backdrop-filter: blur(10px);
  will-change: transform;
  animation: shimmer 4.8s ease-in-out infinite;
}

@keyframes shimmer {
  from {
    box-shadow:
      0 12px 30px rgba(0, 0, 0, 0.25),
      0 0 18px hsla(var(--hue), 85%, 70%, 0.14);
  }

  to {
    box-shadow:
      0 16px 36px rgba(0, 0, 0, 0.3),
      0 0 34px hsla(var(--hue), 85%, 70%, 0.26);
  }
}

.word::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: inherit;
  background: radial-gradient(circle, hsla(var(--hue), 92%, 76%, 0.22), transparent 68%);
  z-index: -1;
}

.word--launching {
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.32),
    0 0 42px hsla(var(--hue), 90%, 72%, 0.34);
}

.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;
}

@media (max-width: 720px) {
  .page {
    place-items: start center;
    padding-top: 28px;
    padding-bottom: 32px;
  }

  .panel {
    padding: 24px;
  }

  .word-form {
    flex-direction: column;
  }

  .word-form button {
    width: 100%;
  }

  .word {
    max-width: min(62vw, 220px);
    font-size: 0.96rem;
    text-overflow: ellipsis;
    overflow: hidden;
  }
}

@media (max-width: 430px) {
  .page {
    padding-left: 14px;
    padding-right: 14px;
  }

  .word {
    max-width: min(44vw, 150px);
    padding: 7px 10px;
    font-size: 0.82rem;
  }
}