* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #000000;
}

#container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
}

/* 扫描引导遮罩层 */
.scanning-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(9, 13, 16, 0.5);
  backdrop-filter: blur(2px);
  color: #ffffff;
  transition: opacity 300ms ease, visibility 300ms ease;
  pointer-events: none;
}

/* 识别成功后隐藏引导层 */
.scanning-overlay.is-target-found {
  opacity: 0;
  visibility: hidden;
}

.scanner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
  padding: 20px;
}

/* 带有拐角的科技感扫描框 */
.scanner-box {
  position: relative;
  width: min(260px, 65vw);
  height: min(260px, 65vw);
  border: 1px dashed rgba(6, 182, 212, 0.35);
  border-radius: 16px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 4px solid #06b6d4;
}

.top-left {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
  border-top-left-radius: 12px;
}

.top-right {
  top: 0;
  right: 0;
  border-left: none;
  border-bottom: none;
  border-top-right-radius: 12px;
}

.bottom-left {
  bottom: 0;
  left: 0;
  border-right: none;
  border-top: none;
  border-bottom-left-radius: 12px;
}

.bottom-right {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
  border-bottom-right-radius: 12px;
}

/* 激光扫描动画条 */
.laser-line {
  position: absolute;
  left: 5%;
  width: 90%;
  height: 3px;
  background: linear-gradient(to right, transparent, #06b6d4, transparent);
  box-shadow: 0 0 12px #06b6d4;
  animation: scan 2.2s linear infinite;
}

@keyframes scan {
  0% {
    top: 5%;
  }
  50% {
    top: 95%;
  }
  100% {
    top: 5%;
  }
}

.scan-tip {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}

.scan-sub-tip {
  font-size: 12px;
  color: #94a3b8;
  margin-top: -16px;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85);
}

/* 启动覆盖层与系统诊断面板 */
.start-overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #0f172a, #020617);
  color: #ffffff;
  padding: 24px;
  transition: opacity 400ms cubic-bezier(0.4, 0, 0.2, 1), visibility 400ms;
}

.start-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.start-card {
  width: 100%;
  max-width: 380px;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.start-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.start-desc {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.6;
}

.start-btn {
  width: 100%;
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.35);
  transition: all 250ms ease;
}

.start-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 6px rgba(6, 182, 212, 0.2);
}

/* 诊断终端 */
#debug-log {
  width: 100%;
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px;
  font-family: monospace;
  font-size: 11px;
  text-align: left;
  color: #06b6d4;
  max-height: 160px;
  overflow-y: auto;
  word-break: break-all;
}

#debug-log div {
  margin-bottom: 4px;
  line-height: 1.4;
}

