* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;

  background: #020208;

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}

body {
  touch-action: none;
}

#app {
  position: relative;

  width: 100vw;
  height: 100vh;

  overflow: hidden;

  background:
    radial-gradient(
      circle at center,
      #16102d 0%,
      #060610 55%,
      #010103 100%
    );
}


/* =========================
   摄像头
========================= */

#camera {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;

  /* 自拍镜像 */
  transform: scaleX(-1);

  filter:
    brightness(0.42)
    contrast(1.15)
    saturate(0.7)
    hue-rotate(8deg);
}


/* =========================
   摄像头氛围
========================= */

.camera-overlay {
  position: absolute;
  inset: 0;

  pointer-events: none;

  background:
    radial-gradient(
      circle at 50% 35%,
      rgba(80, 30, 180, 0.12),
      transparent 45%
    ),

    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.12),
      rgba(0, 0, 0, 0.45)
    );

  mix-blend-mode: screen;
}


/* =========================
   Canvas
========================= */

#garden {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  pointer-events: none;
}


/* =========================
   手势状态
========================= */

#gestureStatus {
  position: absolute;

  top: 18px;
  left: 18px;

  z-index: 5;

  display: flex;
  align-items: center;
  gap: 8px;

  padding: 8px 14px;

  border-radius: 999px;

  background:
    rgba(5, 8, 25, 0.45);

  backdrop-filter:
    blur(10px);

  border:
    1px solid rgba(100, 180, 255, 0.15);

  color:
    rgba(220, 240, 255, 0.7);

  font-size: 13px;

  pointer-events: none;
}

.status-dot {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: #666;

  box-shadow:
    0 0 8px rgba(255, 255, 255, 0.2);
}

.status-dot.active {
  background: #61f6ff;

  box-shadow:
    0 0 12px #00eaff,
    0 0 25px #5080ff;
}


/* =========================
   启动页面
========================= */

#startScreen {
  position: absolute;
  inset: 0;

  z-index: 20;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    radial-gradient(
      circle at center,
      rgba(35, 20, 80, 0.82),
      rgba(0, 0, 0, 0.95)
    );

  transition:
    opacity 1s ease,
    visibility 1s ease;
}

#startScreen.hide {
  opacity: 0;
  visibility: hidden;
}

.intro {
  text-align: center;

  color: white;

  padding: 30px;
}

.intro-flower {
  font-size: 70px;

  color: #79f7ff;

  margin-bottom: 18px;

  text-shadow:
    0 0 10px #00ffff,
    0 0 30px #507cff,
    0 0 70px #a64dff;

  animation:
    pulse 2s infinite ease-in-out;
}

.intro h1 {
  font-size:
    clamp(32px, 7vw, 70px);

  font-weight: 300;

  letter-spacing: 0.08em;

  margin-bottom: 15px;

  text-shadow:
    0 0 20px
    rgba(105, 180, 255, 0.8);
}

.intro p {
  color:
    rgba(220, 230, 255, 0.7);

  margin-bottom: 30px;

  line-height: 1.7;
}

#startButton {
  border:
    1px solid
    rgba(100, 220, 255, 0.6);

  background:
    linear-gradient(
      135deg,
      rgba(40, 140, 255, 0.35),
      rgba(160, 70, 255, 0.35)
    );

  color: white;

  padding:
    14px 34px;

  border-radius: 999px;

  font-size: 16px;

  cursor: pointer;

  box-shadow:
    0 0 25px
    rgba(50, 180, 255, 0.25);

  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

#startButton:hover {
  transform:
    scale(1.06);

  box-shadow:
    0 0 40px
    rgba(50, 180, 255, 0.55);
}


/* =========================
   错误信息
========================= */

.hidden {
  display: none;
}

#errorMessage {
  position: absolute;

  left: 50%;
  top: 50%;

  z-index: 30;

  transform:
    translate(-50%, -50%);

  width:
    min(90%, 500px);

  color: white;

  text-align: center;

  padding: 30px;

  background:
    rgba(20, 10, 40, 0.94);

  border:
    1px solid
    rgba(255, 100, 150, 0.4);

  border-radius: 20px;
}


@keyframes pulse {

  0%,
  100% {
    transform: scale(0.9);
    opacity: 0.7;
  }

  50% {
    transform: scale(1.15);
    opacity: 1;
  }

}