:root {
  --bg0: #061018;
  --bg1: #0c1c24;
  --ink: #e8f2f4;
  --muted: #8aa4ad;
  --accent: #2ec4b6;
  --accent-dim: rgba(46, 196, 182, 0.18);
  --line: rgba(232, 242, 244, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
}

body {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg0);
  overflow-x: hidden;
}

.scene {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  isolation: isolate;
}

.scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 15% 20%, rgba(46, 196, 182, 0.16), transparent 55%),
    radial-gradient(ellipse 55% 45% at 88% 75%, rgba(56, 120, 140, 0.22), transparent 50%),
    linear-gradient(165deg, var(--bg0) 0%, var(--bg1) 55%, #07141c 100%);
  z-index: -2;
}

.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, black 20%, transparent 75%);
  opacity: 0.45;
  z-index: -1;
  animation: gridDrift 28s linear infinite;
}

.orb {
  position: absolute;
  width: min(42vw, 420px);
  height: min(42vw, 420px);
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-dim), transparent 70%);
  filter: blur(8px);
  animation: orbFloat 9s ease-in-out infinite;
  z-index: -1;
  pointer-events: none;
}

.orb-a { top: 8%; right: 12%; animation-delay: -2s; }
.orb-b { bottom: 6%; left: 8%; width: min(30vw, 280px); height: min(30vw, 280px); animation-delay: -5s; }

.panel {
  width: min(640px, 100%);
  text-align: left;
  animation: riseIn 0.7s ease-out both;
}

.brand {
  font-family: "Sora", "IBM Plex Sans", sans-serif;
  font-weight: 700;
  font-size: clamp(3.4rem, 12vw, 5.5rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--ink);
}

.brand span {
  color: var(--accent);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.35rem;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(46, 196, 182, 0.55);
  animation: pulse 2.2s ease-out infinite;
}

.dot.warn {
  background: #e2a34b;
  box-shadow: 0 0 0 0 rgba(226, 163, 75, 0.45);
}

.lead {
  margin-top: 0.85rem;
  max-width: 28rem;
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  line-height: 1.55;
  color: var(--muted);
}

.db-error {
  margin-top: 0.75rem;
  max-width: 34rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(226, 163, 75, 0.35);
  background: rgba(226, 163, 75, 0.08);
  color: #f0c987;
  font-size: 0.78rem;
  line-height: 1.45;
  word-break: break-word;
}

.db-error code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: inherit;
  color: inherit;
}

.meta {
  margin-top: 2rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.meta strong {
  color: var(--ink);
  font-weight: 500;
}

.foot {
  margin-top: 1.75rem;
  font-size: 0.78rem;
  color: rgba(138, 164, 173, 0.85);
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 196, 182, 0.5); }
  70% { box-shadow: 0 0 0 12px rgba(46, 196, 182, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 196, 182, 0); }
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-12px, 18px) scale(1.06); }
}

@keyframes gridDrift {
  from { transform: translateY(0); }
  to { transform: translateY(56px); }
}

@media (prefers-reduced-motion: reduce) {
  .grid, .orb, .dot, .panel { animation: none; }
}
