:root {
  --bg-1: hsl(198 54% 9%);
  --bg-2: hsl(184 70% 14%);
  --bg-3: hsl(146 45% 11%);
  --ink: hsl(188 100% 93%);
  --ink-muted: hsl(184 60% 73%);
  --accent-1: hsl(186 100% 60%);
  --accent-2: hsl(24 100% 61%);
  --accent-3: hsl(95 100% 64%);
  --glass: hsla(194 72% 7% / 0.46);
  --shadow: 0 28px 65px hsla(0 0% 0% / 0.42);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Space Mono", "Courier New", monospace;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, color-mix(in oklab, var(--accent-1) 28%, transparent), transparent 34%),
    radial-gradient(circle at 88% 12%, color-mix(in oklab, var(--accent-2) 28%, transparent), transparent 36%),
    radial-gradient(circle at 56% 86%, color-mix(in oklab, var(--accent-3) 22%, transparent), transparent 38%),
    linear-gradient(132deg, var(--bg-1), var(--bg-2) 54%, var(--bg-3));
  overflow-x: hidden;
}

.noise-layer,
.glow-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.noise-layer {
  opacity: 0.13;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='210' height='210' viewBox='0 0 210 210'%3E%3Ccircle cx='22' cy='31' r='1.2' fill='%23ffffff' fill-opacity='.35'/%3E%3Ccircle cx='184' cy='67' r='1.4' fill='%23ffffff' fill-opacity='.28'/%3E%3Ccircle cx='102' cy='176' r='1.3' fill='%23ffffff' fill-opacity='.32'/%3E%3C/svg%3E");
}

.glow-layer {
  background:
    conic-gradient(from 140deg at 26% 30%, color-mix(in oklab, var(--accent-1) 20%, transparent), transparent 64%),
    conic-gradient(from 40deg at 74% 34%, color-mix(in oklab, var(--accent-2) 21%, transparent), transparent 60%);
  animation: drift 16s linear infinite;
}

.cursor-orb {
  position: fixed;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 999px;
  background: radial-gradient(circle, hsla(0 0% 100% / 0.45), transparent 72%);
  pointer-events: none;
  z-index: 10;
  mix-blend-mode: screen;
  transition: transform 120ms ease-out;
}

.layout,
.topbar {
  position: relative;
  z-index: 1;
}

.topbar {
  width: min(1160px, calc(100% - 0.9rem));
  margin: 0.65rem auto 0;
  padding: 0.62rem 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 999px;
}

.brand {
  margin: 0;
  font-family: "Syncopate", sans-serif;
  letter-spacing: 0.08em;
  font-size: 0.88rem;
}

.timestamp {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.8rem;
}

.layout {
  width: min(1160px, calc(100% - 0.9rem));
  margin: 0.6rem auto 1rem;
  display: grid;
  gap: 0.72rem;
}

.glass {
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px) saturate(130%);
}

.hero {
  position: fixed;
  left: 50%;
  top: 0.7rem;
  transform: translateX(-50%);
  width: min(760px, calc(100vw - 1.2rem));
  padding: 0.6rem 0.78rem 0.66rem;
  background: hsla(196 72% 8% / 0.76);
  border-radius: 28px 44px 32px 30px / 36px 32px 40px 34px;
  z-index: 3;
}

.eyebrow {
  margin: 0;
  color: var(--accent-3);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.72rem;
}

h1 {
  margin: 0.38rem 0 0;
  font-family: "Syncopate", sans-serif;
  font-size: clamp(1.6rem, 4.4vw, 2.95rem);
  line-height: 1.02;
}

h1 span {
  color: var(--accent-2);
  text-shadow: 0 0 24px color-mix(in oklab, var(--accent-2) 52%, transparent);
}

.lede {
  margin: 0.68rem 0 0;
  max-width: 66ch;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.glyph-console {
  margin-top: 0;
}

.glyph-console label {
  display: block;
  margin-bottom: 0.24rem;
  font-size: 0.68rem;
  color: color-mix(in oklab, var(--accent-3) 78%, #fff);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.glyph-console input {
  width: min(680px, 100%);
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 0.52rem 0.82rem;
  background:
    linear-gradient(125deg, hsla(188 100% 72% / 0.18), hsla(27 100% 68% / 0.14)),
    hsla(199 58% 7% / 0.84);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  box-shadow: inset 0 0 0 1px hsla(186 90% 74% / 0.45), 0 10px 26px hsla(0 0% 0% / 0.33);
  position: relative;
  z-index: 1;
}

.glyph-console input::placeholder {
  color: color-mix(in oklab, var(--ink-muted) 80%, transparent);
}

.glyph-console input:focus {
  box-shadow:
    inset 0 0 0 1px hsla(186 100% 76% / 0.7),
    0 0 0 2px hsla(186 100% 76% / 0.22),
    0 10px 26px hsla(0 0% 0% / 0.33);
}

.glyph-status {
  margin: 0.34rem 0 0;
  color: var(--ink-muted);
  font-size: 0.72rem;
}

.canvas-panel {
  position: fixed;
  inset: 0;
  min-height: 100vh;
  width: 100vw;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
  z-index: 0;
}

#hyperCanvas {
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  display: block;
  border: 0;
  border-radius: 0;
}

.phrase-sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.sky-phrase {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate3d(0, 0, 0) scale(var(--scale, 1));
  color: color-mix(in oklab, var(--accent-3) 70%, #fff);
  font-size: clamp(0.5rem, 0.92vw, 0.72rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: var(--alpha, 0.24);
  text-shadow: 0 0 4px color-mix(in oklab, var(--accent-1) 26%, transparent);
  will-change: transform;
}

.canvas-hud {
  position: absolute;
  top: 0.88rem;
  right: 0.95rem;
  display: grid;
  gap: 0.18rem;
  padding: 0.5rem 0.62rem;
  background: hsla(193 69% 8% / 0.6);
  border-radius: 24px 38px 26px 34px;
  font-size: 0.74rem;
}

.canvas-hud p {
  margin: 0;
}

.canvas-hud strong {
  color: var(--accent-3);
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-2%, 2%, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

@media (max-width: 620px) {
  .topbar,
  .layout {
    width: calc(100% - 0.45rem);
  }

  .topbar {
    border-radius: 999px;
    padding-inline: 0.72rem;
  }

  .hero {
    left: 50%;
    top: 0.4rem;
    width: calc(100vw - 0.6rem);
    padding: 0.5rem 0.6rem 0.56rem;
    border-radius: 24px;
  }

  .canvas-panel {
    min-height: 100vh;
  }

  #hyperCanvas {
    min-height: 100vh;
  }

  .canvas-hud {
    position: static;
    margin-top: 0.5rem;
    grid-template-columns: repeat(4, 1fr);
    border-radius: 20px;
  }
}
