:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1f2430;
  --text: #f5f7fb;
  --muted: #a8b0c0;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #7dd3fc;
  --accent-2: #c084fc;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at top left, rgba(125, 211, 252, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(192, 132, 252, 0.12), transparent 24%),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100%;
}

body {
  min-height: 100vh;
}

.app {
  width: min(1100px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.badge {
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.18), rgba(192, 132, 252, 0.18));
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.9rem;
  white-space: nowrap;
}

.stage-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 16px;
}

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 78vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
}

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

/* 镜像，让摄像头更自然 */
.stage video {
  transform: scaleX(-1);
}

/* canvas 跟 video 保持同样镜像，骨架和特效才对得上 */
.stage canvas {
  transform: scaleX(-1);
  pointer-events: none;
}

.overlay-top,
.overlay-bottom {
  position: absolute;
  left: 14px;
  right: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  z-index: 3;
}

.overlay-top {
  top: 14px;
}

.overlay-bottom {
  bottom: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  background: rgba(12, 16, 24, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1;
}

.pill.large {
  font-weight: 600;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}

.info-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 18px 16px;
}

.info-card h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.info-card p,
.info-card li {
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.info-card ul {
  margin: 0;
  padding-left: 18px;
}

@media (max-width: 820px) {
  .app {
    width: min(100vw - 20px, 1100px);
    padding-top: 18px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .stage-card {
    padding: 10px;
  }

  .overlay-top,
  .overlay-bottom {
    left: 10px;
    right: 10px;
  }

  .pill {
    font-size: 0.86rem;
    padding: 9px 12px;
  }
}