* {
  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;
}

.kiosk-home-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  width: 1080px;
  height: 1920px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  overflow: hidden;
}
.kiosk-home-container {
  width: 1080px;
  height: 1920px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 200px;
  position: relative;
}
.kiosk-home-container::before,
.kiosk-home-container::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  filter: blur(2px);
}
.kiosk-home-container::before {
  width: 400px;
  height: 400px;
  top: -80px;
  left: -100px;
}
.kiosk-home-container::after {
  width: 300px;
  height: 300px;
  right: -80px;
  bottom: 100px;
}
.kiosk-home-header {
  text-align: center;
  margin-bottom: 80px;
  position: relative;
  z-index: 1;
}
.kiosk-home-logo {
  margin: 0 auto 24px;
  font-size: 80px;
  line-height: 1;
}
.kiosk-home-header h1 {
  font-size: 56px;
  color: #fff;
  letter-spacing: 8px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.kiosk-home-time {
  font-size: 32px;
  color: rgba(255,255,255,0.9);
  margin-top: 16px;
}
.kiosk-home-cards {
  display: flex;
  gap: 48px;
  position: relative;
  z-index: 1;
}
.kiosk-home-card {
  width: 420px;
  height: 500px;
  border: 0;
  background: rgba(255,255,255,0.95);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}
.kiosk-home-card:active {
  transform: translateY(-4px);
}
.kiosk-home-icon {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  margin-bottom: 24px;
  color: #fff;
}
.kiosk-home-card.daily .kiosk-home-icon {
  background: linear-gradient(135deg, #409EFF, #1a73e8);
}
.kiosk-home-card.activity .kiosk-home-icon {
  background: linear-gradient(135deg, #52c41a, #389e0d);
}
.kiosk-home-title {
  font-size: 40px;
  font-weight: 700;
  color: #333;
  margin-bottom: 12px;
}
.kiosk-home-desc {
  font-size: 22px;
  color: #777;
  text-align: center;
  padding: 0 24px;
  line-height: 1.6;
}
.kiosk-home-footer {
  position: absolute;
  bottom: 60px;
  color: rgba(255,255,255,0.72);
  font-size: 22px;
  text-align: center;
}

.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);
}
.recognition-guide {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58%;
  height: 58%;
  transform: translate(-50%, -50%);
  border: 4px solid rgba(76, 175, 80, 0.95);
  border-radius: 50%;
  box-shadow:
    0 0 0 999px rgba(0, 0, 0, 0.22),
    0 0 18px rgba(76, 175, 80, 0.65);
  pointer-events: none;
  z-index: 2;
}
.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;
  z-index: 3;
}

.debug-panel {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 9999;
  width: 680px;
  max-height: 520px;
  overflow: auto;
  padding: 16px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.78);
  color: #00ff99;
  font: 18px/1.45 Consolas, Menlo, monospace;
  white-space: pre-wrap;
  text-align: left;
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
}

.debug-controls {
  position: fixed;
  left: 20px;
  top: 20px;
  z-index: 9999;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 760px;
}
.debug-controls button {
  border: 0;
  border-radius: 6px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}
.debug-controls button.active {
  background: #1677ff;
}

.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; }

.error-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto 28px;
  border-radius: 50%;
  background: #f44336;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  line-height: 1;
  font-weight: 700;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  box-shadow: 0 8px 22px rgba(244, 67, 54, 0.28);
}
.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: 21%; right: 21%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #4caf50, transparent);
  animation: scanMove 2s ease-in-out infinite;
  z-index: 2;
}
@keyframes scanMove {
  0% { top: 21%; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { top: 79%; opacity: 0; }
}
