/* 画眉 AI 面试官 · HTML 原型共用样式 · 复刻美团风 */

:root {
  --primary: #FFCB05;          /* 美团黄 */
  --primary-hover: #F5BC00;
  --primary-light: #FFF4D1;
  --bg: #F5F5F5;               /* 主体浅灰白 */
  --card-bg: #FFFFFF;
  --border: #E5E5E5;
  --text: #1F1F1F;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --green: #2DBA61;            /* 完成状态绿 */
  --red: #FF4D4F;              /* 结束按钮红 */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 6px;
  --radius-lg: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

/* ============= 通用按钮 ============= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  text-decoration: none;
  color: var(--text);
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--primary);
  color: var(--text);
}
.btn-primary:hover { background: var(--primary-hover); }

.btn-secondary {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-secondary:hover { background: var(--bg); }

.btn-danger {
  background: var(--red);
  color: white;
}
.btn-danger:hover { opacity: 0.9; }

.btn-lg { padding: 12px 32px; font-size: 16px; }

/* ============= 设备调试共用 - Stepper ============= */
.setup-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg);
}

.setup-topbar {
  width: 100%;
  background: var(--card-bg);
  padding: 12px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.setup-topbar .badge-rec {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FFEDED;
  color: var(--red);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  margin-right: 8px;
}
.setup-topbar .badge-rec::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

.stepper {
  display: flex;
  gap: 0;
  align-items: center;
  margin: 32px 0 48px;
}
.stepper-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 999px;
  background: var(--card-bg);
  font-size: 13px;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.stepper-item.active {
  background: var(--primary);
  color: var(--text);
  border-color: var(--primary);
  font-weight: 500;
}
.stepper-item.done {
  background: var(--card-bg);
  color: var(--green);
  border-color: var(--border);
}
.stepper-item.done::before {
  content: '✓';
  color: var(--green);
  font-weight: bold;
}
.stepper-divider {
  width: 80px;
  height: 1px;
  background: var(--border);
}

/* ============= 设备调试卡片 ============= */
.setup-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 64px 80px;
  width: min(720px, 90%);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.setup-card h2 {
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 8px;
}

.setup-card .hint {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 40px;
}

/* ============= Vinyl 圆盘（扬声器/麦克风用） ============= */
.vinyl {
  width: 160px;
  height: 160px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: radial-gradient(circle at center, #2A2A2A 0%, #1A1A1A 30%, #0F0F0F 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}
.vinyl::before {
  content: '';
  position: absolute;
  width: 50%;
  height: 50%;
  border-radius: 50%;
  border: 1px solid #333;
}
.vinyl.spinning { animation: spin 4s linear infinite; }
.vinyl-play {
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 18px;
  position: relative;
  z-index: 2;
}

/* ============= 音量条 ============= */
.volume-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  margin: 24px 0;
}
.volume-bar .seg {
  width: 4px;
  height: 18px;
  background: var(--border);
  border-radius: 2px;
}
.volume-bar .seg.on { background: var(--green); }

.volume-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 24px;
}

/* ============= 链接型按钮（如"没听到声音，重新录制"） ============= */
.link-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  margin-bottom: 16px;
}
.link-btn:hover { color: var(--text); }

/* ============= 朗读字数 ============= */
.read-text {
  font-size: 56px;
  font-weight: 600;
  letter-spacing: 8px;
  color: var(--text);
  margin: 16px 0 24px;
  font-family: 'SF Mono', Consolas, monospace;
}

.device-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--card-bg);
  cursor: pointer;
  margin-bottom: 24px;
}

/* ============= 摄像头预览 ============= */
.camera-preview {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 4/3;
  background: #1A1A1A;
  border-radius: var(--radius);
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  position: relative;
  overflow: hidden;
}
.camera-preview .device-tag {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0,0,0,0.6);
  color: white;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
}

/* ============= Pulse 动画 ============= */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============= 响应式 · 平板 768-1023px ============= */
@media (max-width: 1023px) {
  .setup-card {
    padding: 48px 40px;
  }
}

/* ============= 响应式 · 手机 < 768px ============= */
@media (max-width: 767px) {
  /* Setup 流程页 */
  .setup-shell { padding-bottom: 24px; }

  .stepper {
    margin: 20px 0 24px;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }
  .stepper-item {
    padding: 6px 12px;
    font-size: 12px;
  }
  .stepper-divider { width: 20px; }

  .setup-card {
    padding: 32px 20px;
    width: 100%;
    max-width: 100%;
    margin: 0 16px;
    border-radius: var(--radius);
  }
  .setup-card h2 { font-size: 16px; }
  .setup-card .hint { font-size: 12px; margin-bottom: 24px; }

  .vinyl { width: 120px; height: 120px; }
  .vinyl-play { width: 36px; height: 36px; font-size: 14px; }

  .read-text {
    font-size: 36px;
    letter-spacing: 4px;
  }

  .volume-bar { gap: 3px; }
  .volume-bar .seg { width: 3px; height: 14px; }

  .camera-preview { max-width: 100%; }

  .btn-lg { padding: 10px 24px; font-size: 14px; }

  /* setup-topbar 缩小 */
  .setup-topbar {
    padding: 10px 16px;
    font-size: 11px;
  }
}
