:root {
  --bg-0: #05070f;
  --bg-1: #0a1022;
  --cyan: #57f2ff;
  --blue: #5f7bff;
  --violet: #9b6dff;
  --text: #e8f3ff;
  --muted: #9fb5d1;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(150, 220, 255, 0.25);
  --shadow: 0 10px 40px rgba(67, 148, 255, 0.22);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 20%, rgba(76, 124, 255, 0.2), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(116, 90, 255, 0.16), transparent 35%),
    linear-gradient(125deg, var(--bg-0), var(--bg-1));
  overflow-x: hidden;
}

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
}

.noise,
.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.noise {
  z-index: -2;
  opacity: 0.08;
  background-image: radial-gradient(rgba(255, 255, 255, 0.5) 0.4px, transparent 0.6px);
  background-size: 2px 2px;
  animation: noiseShift 0.25s steps(3) infinite;
}

.scanline {
  z-index: -1;
  opacity: 0.15;
  background: repeating-linear-gradient(
    to bottom,
    rgba(140, 196, 255, 0.1) 0px,
    rgba(140, 196, 255, 0.1) 1px,
    transparent 3px,
    transparent 5px
  );
  animation: scanMove 8s linear infinite;
}

.app-shell {
  width: min(1120px, 92vw);
  margin: 32px auto;
  display: grid;
  gap: 22px;
}

.glass {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.topbar {
  border-radius: 18px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 20px var(--cyan);
  animation: pulse 2.2s ease-in-out infinite;
}

.brand-text {
  letter-spacing: 0.12em;
  font-family: Orbitron, sans-serif;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.2s ease, text-shadow 0.25s ease;
}

.nav-links a:hover {
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(87, 242, 255, 0.7);
}

.pulse-btn {
  border: 1px solid rgba(87, 242, 255, 0.6);
  background: linear-gradient(90deg, rgba(70, 92, 255, 0.25), rgba(87, 242, 255, 0.18));
  color: var(--text);
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.06em;
  font-family: Orbitron, sans-serif;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pulse-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(87, 242, 255, 0.6);
}

.hero {
  border-radius: 24px;
  padding: clamp(24px, 4vw, 40px);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: conic-gradient(
    from 180deg,
    rgba(87, 242, 255, 0),
    rgba(87, 242, 255, 0.4),
    rgba(155, 109, 255, 0.35),
    rgba(87, 242, 255, 0)
  );
  filter: blur(20px);
  z-index: -1;
  animation: orbit 9s linear infinite;
}

.eyebrow {
  margin: 0;
  font-family: Orbitron, sans-serif;
  color: var(--cyan);
  letter-spacing: 0.14em;
  font-size: 0.78rem;
}

.hero h1 {
  margin: 10px 0 8px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.08;
  font-family: Orbitron, sans-serif;
  font-weight: 900;
}

.hero h1 span {
  display: block;
  background: linear-gradient(90deg, var(--cyan), #d4e0ff 45%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 24px rgba(87, 242, 255, 0.18);
}

.desc {
  margin: 0;
  color: var(--muted);
  max-width: 62ch;
}

.cta-row {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.cta {
  border: 1px solid rgba(159, 181, 209, 0.45);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.cta:hover {
  transform: translateY(-2px);
}

.cta.primary {
  border-color: rgba(87, 242, 255, 0.65);
  box-shadow: 0 0 16px rgba(87, 242, 255, 0.4);
}

.cta.ghost:hover,
.cta.primary:hover {
  box-shadow: 0 0 20px rgba(155, 109, 255, 0.35);
}

.grid-panel {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  border-radius: 18px;
  padding: 18px;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.18s ease, box-shadow 0.25s ease;
}

.card h3 {
  margin: 0 0 12px;
  font-family: Orbitron, sans-serif;
  font-size: 1rem;
}

.card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.meter {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.meter span {
  display: block;
  width: var(--value);
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 0 16px rgba(87, 242, 255, 0.6);
  animation: flow 2.4s ease-in-out infinite;
}

body.sync-mode {
  --bg-0: #05050b;
  --bg-1: #17082d;
  --cyan: #8dfffe;
  --blue: #7e62ff;
  --violet: #ca7bff;
  --shadow: 0 14px 50px rgba(177, 100, 255, 0.25);
}

@media (max-width: 920px) {
  .topbar {
    flex-wrap: wrap;
  }

  .grid-panel {
    grid-template-columns: 1fr;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.35);
    filter: brightness(1.35);
  }
}

@keyframes orbit {
  from {
    transform: rotate(0deg) scale(1);
  }
  to {
    transform: rotate(360deg) scale(1.05);
  }
}

@keyframes flow {
  0%,
  100% {
    filter: saturate(1);
  }
  50% {
    filter: saturate(1.5);
  }
}

@keyframes noiseShift {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(1px, -1px);
  }
}

@keyframes scanMove {
  from {
    background-position-y: 0;
  }
  to {
    background-position-y: 120px;
  }
}
