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

body {
  width: 1080px;
  height: 1920px;
  font-family: -apple-system, "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #1a237e 0%, #283593 30%, #e8eaf6 30%);
  overflow: hidden;
}

#app {
  width: 1080px;
  height: 1920px;
  display: flex;
  flex-direction: column;
}

.header {
  text-align: center;
  padding: 60px 0 40px;
  color: #fff;
}
.header h1 {
  font-size: 56px;
  letter-spacing: 8px;
}
.header .time {
  font-size: 32px;
  margin-top: 16px;
  opacity: 0.9;
}

.main {
  flex: 1;
  padding: 40px 60px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* 人脸识别 */
.face-area {
  text-align: center;
}
.camera-box {
  width: 400px;
  height: 400px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 6px solid #1a237e;
  overflow: hidden;
  background: #000;
  position: relative;
}
.camera-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
.camera-box canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  transform: scaleX(-1);
}
.status-bar {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 20px;
  padding: 8px;
  text-align: center;
}

.btn-face {
  width: 400px;
  height: 80px;
  font-size: 32px;
  background: #1a237e;
  color: #fff;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  letter-spacing: 4px;
}
.btn-face:active { background: #283593; }
.btn-face:disabled { background: #999; cursor: not-allowed; }

/* 分隔线 */
.divider {
  text-align: center;
  position: relative;
  margin: 10px 0;
}
.divider::before, .divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 2px;
  background: #ccc;
}
.divider::before { left: 0; }
.divider::after { right: 0; }
.divider span {
  background: #e8eaf6;
  padding: 0 24px;
  font-size: 28px;
  color: #999;
  position: relative;
}

/* 手动签到 */
.manual-area {
  text-align: center;
}
.manual-area h2 {
  font-size: 36px;
  color: #333;
  margin-bottom: 24px;
}
.phone-input {
  width: 700px;
  height: 80px;
  font-size: 40px;
  text-align: center;
  border: 3px solid #ccc;
  border-radius: 16px;
  outline: none;
  letter-spacing: 6px;
  margin-bottom: 24px;
}
.phone-input:focus { border-color: #1a237e; }

.numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 700px;
  margin: 0 auto 24px;
}
.numpad button {
  height: 80px;
  font-size: 36px;
  border: 2px solid #ddd;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-weight: bold;
}
.numpad button:active { background: #e0e0e0; }
.numpad .btn-clear { background: #ffcdd2; color: #c62828; border-color: #ef9a9a; }
.numpad .btn-delete { background: #fff3e0; color: #e65100; border-color: #ffcc80; }

.btn-submit {
  width: 700px;
  height: 80px;
  font-size: 36px;
  background: #4caf50;
  color: #fff;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  letter-spacing: 4px;
}
.btn-submit:active { background: #388e3c; }

/* 弹窗 */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-content {
  background: #fff;
  border-radius: 24px;
  padding: 60px 80px;
  text-align: center;
  min-width: 500px;
  animation: popIn 0.3s ease;
}
@keyframes popIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal-content.error { border: 4px solid #f44336; }
.face-snapshot {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid #4caf50;
  margin: 0 auto 20px;
  display: block;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
}
.success-icon { font-size: 100px; margin-bottom: 20px; }
.modal-content h2 { font-size: 40px; margin-bottom: 16px; }
.points-text { font-size: 36px; color: #4caf50; font-weight: bold; }
.total-text { font-size: 28px; color: #666; margin-top: 12px; }

/* 返回按钮 */
.btn-back {
  position: fixed;
  top: 40px; left: 40px;
  background: rgba(255,255,255,0.9);
  border: none; border-radius: 40px;
  padding: 14px 32px;
  font-size: 26px; color: #333;
  cursor: pointer; z-index: 50;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-back:active { background: #e0e0e0; }

/* 扫描线动画 */
.scan-line {
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #4caf50, transparent);
  animation: scanMove 2s ease-in-out infinite;
  z-index: 2;
}
@keyframes scanMove {
  0% { top: 10%; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { top: 90%; opacity: 0; }
}
