:root {
  color-scheme: dark;
  --bg: #03070b;
  --bg-soft: rgba(5, 20, 24, 0.78);
  --panel: rgba(6, 18, 24, 0.6);
  --line: rgba(110, 255, 246, 0.16);
  --glow: #3ee0d4;
  --glow-strong: #8cfffa;
  --text: #e9ffff;
  --muted: #87aeb0;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 50% 45%, rgba(21, 96, 103, 0.22), transparent 28%),
    radial-gradient(circle at 50% 50%, rgba(7, 34, 39, 0.72), transparent 52%),
    linear-gradient(180deg, #020507 0%, #04090d 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at center, rgba(72, 255, 246, 0.08), transparent 36%),
    radial-gradient(circle at center, rgba(96, 255, 252, 0.04), transparent 58%);
  filter: blur(22px);
}

.app-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(300px, 430px) 1fr;
  gap: 2rem;
  align-items: center;
  padding: 3rem;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(7, 18, 23, 0.7), rgba(5, 14, 20, 0.45));
  box-shadow: 0 0 0 1px rgba(160, 255, 248, 0.03) inset, 0 18px 80px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
}

.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--glow-strong);
}

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 4vw, 4.6rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
}

.lede {
  margin: 1.25rem 0 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 1rem;
}

.lede span {
  color: var(--glow-strong);
}

.status-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.6rem;
}

.status-bar.secondary {
  margin-top: 0.85rem;
}

.status-bar > div {
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(110, 255, 246, 0.12);
  background: rgba(7, 19, 26, 0.56);
}

.label {
  display: block;
  margin-bottom: 0.32rem;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(181, 241, 236, 0.62);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.mode-controls {
  margin-top: 1.15rem;
}

.state-btn {
  appearance: none;
  border: 1px solid rgba(110, 255, 246, 0.18);
  background: rgba(6, 17, 22, 0.72);
  color: var(--text);
  padding: 0.78rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease, opacity 180ms ease;
}

.state-btn:hover,
.state-btn.active {
  transform: translateY(-1px);
  border-color: rgba(131, 255, 247, 0.48);
  background: rgba(19, 57, 61, 0.78);
  box-shadow: 0 0 26px rgba(64, 227, 219, 0.15);
}

.state-btn.accent {
  background: linear-gradient(180deg, rgba(31, 99, 102, 0.85), rgba(11, 47, 55, 0.85));
  border-color: rgba(148, 255, 249, 0.36);
}

.state-btn.ghost {
  background: rgba(8, 20, 26, 0.42);
}

.state-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.hint {
  margin-top: 1rem;
  color: rgba(180, 221, 224, 0.64);
  line-height: 1.55;
}

kbd {
  padding: 0.1rem 0.35rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(135, 255, 247, 0.18);
  background: rgba(9, 20, 24, 0.75);
}

.visual-panel {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 72vh;
  border-radius: 36px;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(11, 35, 42, 0.72), rgba(2, 5, 8, 0.1) 42%, rgba(2, 5, 8, 0.95) 72%);
  border: 1px solid rgba(106, 255, 247, 0.08);
}

#orb-canvas {
  position: relative;
  width: 100%;
  height: 72vh;
  min-height: 620px;
}

#orb-canvas canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.panel-overlay,
.hud-ring {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.panel-overlay {
  background:
    radial-gradient(circle at center, transparent 0%, transparent 32%, rgba(7, 20, 24, 0.22) 58%, rgba(2, 6, 9, 0.72) 100%),
    linear-gradient(180deg, rgba(4, 10, 13, 0.12), rgba(4, 10, 13, 0.32));
}

.hud-ring::before,
.hud-ring::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.hud-ring::before {
  width: min(62vw, 620px);
  height: min(62vw, 620px);
  border: 1px solid rgba(120, 255, 248, 0.05);
}

.hud-ring::after {
  width: min(50vw, 480px);
  height: min(50vw, 480px);
  border: 1px dashed rgba(126, 255, 249, 0.05);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 1.25rem;
  }

  #orb-canvas {
    min-height: 480px;
    height: 58vh;
  }
}
