:root {
  --bg-deep: #02080d;
  --bg-mid: #071923;
  --bg-soft: #0f2d3b;
  --hud: #54d9ff;
  --hud-soft: rgba(84, 217, 255, 0.18);
  --hud-mid: rgba(84, 217, 255, 0.48);
  --warn: #ffb562;
  --danger: #ff7272;
  --text: #ddf8ff;
  --text-soft: rgba(221, 248, 255, 0.68);
}

* {
  box-sizing: border-box;
}

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

body {
  background:
    radial-gradient(circle at top center, rgba(57, 156, 190, 0.28), transparent 28%),
    radial-gradient(circle at 20% 20%, rgba(84, 217, 255, 0.12), transparent 18%),
    linear-gradient(180deg, #08131a 0%, #031016 38%, #010609 100%);
  color: var(--text);
  font-family: "Manrope", Arial, sans-serif;
}

code {
  color: #fff;
  font-size: 12px;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  padding: 40px 28px 32px;
  overflow: hidden;
}

.background-aura {
  position: absolute;
  inset: auto auto 8% 50%;
  width: 44rem;
  height: 44rem;
  border-radius: 50%;
  transform: translateX(-50%);
  background:
    radial-gradient(circle, rgba(84, 217, 255, 0.2) 0%, rgba(84, 217, 255, 0.08) 28%, transparent 64%);
  filter: blur(22px);
  pointer-events: none;
}

.background-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(84, 217, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(84, 217, 255, 0.03) 1px, transparent 1px);
  background-size: 82px 82px;
  mask-image: radial-gradient(circle at center, black 44%, transparent 86%);
  pointer-events: none;
}

.hero {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto 28px;
  text-align: center;
}

.eyebrow,
.title,
.info-title {
  font-family: "Orbitron", Arial, sans-serif;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--hud);
}

.hero h1 {
  margin: 0;
  font-family: "Orbitron", Arial, sans-serif;
  font-size: clamp(2rem, 4vw, 4.5rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 0 24px rgba(84, 217, 255, 0.12);
}

.lead {
  max-width: 720px;
  margin: 14px auto 0;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.6;
}

.hero-strip {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
}

.hero-strip span {
  border: 1px solid rgba(84, 217, 255, 0.22);
  background: rgba(5, 19, 27, 0.55);
  color: rgba(221, 248, 255, 0.78);
  backdrop-filter: blur(8px);
}

.hero-strip span {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.layout {
  position: relative;
  z-index: 1;
  max-width: 1520px;
  margin: 0 auto;
}

.viewer-card {
  min-width: 0;
}

.stage-frame {
  border: 1px solid rgba(84, 217, 255, 0.18);
  background: linear-gradient(180deg, rgba(4, 18, 25, 0.88), rgba(4, 18, 25, 0.56));
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.34),
    inset 0 0 40px rgba(84, 217, 255, 0.05);
  backdrop-filter: blur(10px);
}

.stage-frame {
  position: relative;
  padding: 18px;
  border-radius: 28px;
}

.frame-glow {
  position: absolute;
  inset: 12px;
  border-radius: 24px;
  border: 1px solid rgba(84, 217, 255, 0.08);
  box-shadow:
    0 0 80px rgba(84, 217, 255, 0.08),
    inset 0 0 40px rgba(84, 217, 255, 0.04);
  pointer-events: none;
}

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: min(72vh, 720px);
  background: #000;
  border: 1px solid rgba(84, 217, 255, 0.16);
  overflow: hidden;
  border-radius: 22px;
}

.vignette,
.target-arcs {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.vignette {
  background:
    radial-gradient(circle at center, transparent 34%, rgba(3, 8, 12, 0.16) 60%, rgba(1, 4, 7, 0.46) 100%);
}

.target-arcs {
  background:
    radial-gradient(circle at center, transparent 0 24%, rgba(84, 217, 255, 0.04) 24.5%, transparent 25%),
    conic-gradient(from 180deg at 50% 50%, transparent 0 16%, rgba(84, 217, 255, 0.13) 16% 18%, transparent 18% 32%, rgba(255, 181, 98, 0.1) 32% 34%, transparent 34% 66%, rgba(84, 217, 255, 0.13) 66% 68%, transparent 68% 100%);
  mix-blend-mode: screen;
  opacity: 0.8;
}

video,
canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

video {
  transform: scaleX(-1);
  filter: saturate(0.84) contrast(1.08) brightness(0.84);
}

#hudCanvas,
.gridline,
.scanline {
  pointer-events: none;
}

.panel {
  position: absolute;
  z-index: 3;
  border: 1px solid var(--hud-mid);
  background: linear-gradient(180deg, rgba(7, 19, 26, 0.88), rgba(7, 19, 26, 0.52));
  box-shadow: 0 0 20px rgba(84, 217, 255, 0.1), inset 0 0 20px rgba(84, 217, 255, 0.04);
  backdrop-filter: blur(8px);
}

.top-left {
  left: 18px;
  top: 18px;
  width: 260px;
  padding: 12px 14px;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}

.top-right {
  right: 18px;
  top: 18px;
  width: 290px;
  padding: 12px 14px;
  clip-path: polygon(18px 0, 100% 0, 100% 100%, 0 100%, 0 18px);
}

.bottom-left {
  left: 18px;
  bottom: 18px;
  width: 300px;
  padding: 12px 14px;
}

.bottom-right {
  right: 18px;
  bottom: 18px;
  width: 340px;
  padding: 12px 14px;
}

.title {
  margin-bottom: 10px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--hud);
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0;
  font-size: 12px;
}

.label {
  color: rgba(221, 248, 255, 0.62);
}

.value {
  color: #effcff;
  text-align: right;
}

.gridline {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image:
    linear-gradient(rgba(84, 217, 255, 0.034) 1px, transparent 1px),
    linear-gradient(90deg, rgba(84, 217, 255, 0.034) 1px, transparent 1px);
  background-size: 48px 48px;
}

.scanline {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  z-index: 2;
  background: linear-gradient(90deg, transparent, rgba(84, 217, 255, 0.82), transparent);
  box-shadow: 0 0 18px rgba(84, 217, 255, 0.6);
  animation: scan 4s linear infinite;
}

.hint {
  position: absolute;
  left: 50%;
  top: 16px;
  z-index: 4;
  transform: translateX(-50%);
  padding: 8px 14px;
  border: 1px solid rgba(84, 217, 255, 0.34);
  background: rgba(7, 19, 26, 0.72);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-align: center;
  border-radius: 999px;
  max-width: calc(100% - 32px);
}

@keyframes scan {
  0% { transform: translateY(0); }
  50% { transform: translateY(100%); }
  100% { transform: translateY(0); }
}

@media (max-width: 860px) {
  .app-shell {
    padding: 20px 14px 18px;
  }

  .stage-frame {
    padding: 10px;
    border-radius: 18px;
  }

  .stage {
    min-height: 78vh;
    aspect-ratio: auto;
  }

  .panel {
    transform: scale(0.92);
    transform-origin: top left;
  }

  .top-right {
    transform-origin: top right;
  }

  .bottom-right {
    transform-origin: bottom right;
  }

  .bottom-left {
    transform-origin: bottom left;
  }
}

@media (max-width: 640px) {
  .hero-strip {
    gap: 8px;
  }

  .hero-strip span {
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  .hint {
    top: 12px;
    font-size: 11px;
    border-radius: 16px;
  }

  .panel {
    position: static;
    width: auto;
    clip-path: none;
    transform: none;
    margin: 10px;
  }

  .stage {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }
}
