/* ===== 设计令牌 ===== */
:root {
  --primary: #0066cc;
  --primary-hover: #0052a3;
  --primary-light: #e6f0ff;
  --success: #00b578;
  --warning: #ff8800;
  --danger: #e53935;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --border: #e4e7ed;
  --text: #1f2937;
  --text-sub: #6b7280;
  --text-light: #9ca3af;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ===== 移动端壳 ===== */
.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* 顶部导航 */
.topbar {
  position: sticky; top:0; z-index:100;
  background: linear-gradient(135deg, #0066cc, #0052a3);
  color:#fff;
  padding: 14px 16px;
  display:flex; align-items:center; gap:10px;
  box-shadow: var(--shadow);
}
.topbar .back {
  background: none; border:none; color:#fff;
  font-size:22px; cursor:pointer; padding:4px;
}
.topbar h1 {
  font-size:17px; font-weight:600; flex:1; text-align:center;
  margin-right: 30px;
}

/* 主内容 */
.content {
  flex:1; padding:16px;
  padding-bottom: 80px;
}

/* ===== 卡片 ===== */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding:16px;
  margin-bottom:14px;
  box-shadow: var(--shadow);
}
.card-title {
  font-size:16px; font-weight:600;
  margin-bottom:12px;
  display:flex; align-items:center; gap:8px;
}
.card-title::before {
  content:""; display:inline-block;
  width:3px; height:16px;
  background: var(--primary);
  border-radius:2px;
}

/* ===== 按钮 ===== */
.btn {
  display:block; width:100%;
  padding:14px; border:none; border-radius: var(--radius);
  font-size:16px; font-weight:600;
  cursor:pointer; transition: all 0.2s;
  text-align:center;
}
.btn-primary {
  background: var(--primary); color:#fff;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled {
  background: #b0bec5; cursor:not-allowed;
}
.btn-outline {
  background:#fff; color: var(--primary);
  border:1px solid var(--primary);
}
.btn-lg { padding:18px; font-size:18px; }

/* ===== 表单 ===== */
.form-group { margin-bottom:18px; }
.form-group label {
  display:block; font-size:14px; color: var(--text-sub);
  margin-bottom:6px; font-weight:500;
}
.form-group label .req { color: var(--danger); }
.form-control {
  width:100%; padding:12px 14px;
  border:1px solid var(--border);
  border-radius: var(--radius);
  font-size:15px;
  background:#fff;
  transition: border-color 0.2s;
}
.form-control:focus {
  outline:none; border-color: var(--primary);
}
.form-control:disabled { background:#f5f5f5; color: var(--text-sub); }

/* ===== 标签 ===== */
.tag {
  display:inline-block; padding:3px 10px;
  border-radius:12px; font-size:12px;
  font-weight:500;
}
.tag-success { background:#e6f7ef; color: var(--success); }
.tag-warning { background:#fff3e0; color: var(--warning); }
.tag-danger { background:#fbe9e7; color: var(--danger); }
.tag-info { background: var(--primary-light); color: var(--primary); }

/* ===== 步骤条 ===== */
.steps {
  display:flex; align-items:center;
  background: var(--surface);
  padding:16px; border-radius: var(--radius-lg);
  margin-bottom:16px; box-shadow: var(--shadow);
}
.step {
  flex:1; text-align:center; position:relative;
}
.step-num {
  width:28px; height:28px; border-radius:50%;
  background: var(--border); color: var(--text-light);
  display:flex; align-items:center; justify-content:center;
  margin:0 auto 6px; font-size:13px; font-weight:600;
  position:relative; z-index:1;
}
.step.active .step-num { background: var(--primary); color:#fff; }
.step.done .step-num { background: var(--success); color:#fff; }
.step-label { font-size:12px; color: var(--text-sub); }
.step.active .step-label { color: var(--primary); font-weight:600; }
.step-line {
  position:absolute; top:14px; left:50%;
  width:100%; height:2px; background: var(--border);
  z-index:0;
}
.step.active .step-line { background: var(--primary); }
.step.done ~ .step .step-line { background: var(--success); }
.step:last-child .step-line { display:none; }

/* ===== Toast ===== */
.toast {
  position:fixed; top:50%; left:50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.8); color:#fff;
  padding:12px 20px; border-radius: var(--radius);
  font-size:14px; z-index:9999;
  opacity:0; transition: opacity 0.3s;
  pointer-events:none;
}
.toast.show { opacity:1; }

/* ===== 倒计时 ===== */
.countdown-box {
  text-align:center; padding:30px 16px;
  background: linear-gradient(135deg, #0066cc22, #0052a311);
  border-radius: var(--radius-lg);
  margin-bottom:16px;
}
.countdown-label {
  font-size:14px; color: var(--text-sub);
  margin-bottom:12px;
}
.countdown {
  display:flex; justify-content:center; gap:10px;
  margin-bottom:8px;
}
.countdown-item {
  background: var(--primary); color:#fff;
  padding:10px 14px; border-radius: var(--radius);
  min-width:60px;
}
.countdown-item .num {
  font-size:26px; font-weight:700;
  font-family: "SF Mono", Menlo, monospace;
  display:block;
}
.countdown-item .unit {
  font-size:11px; opacity:0.9;
}
.countdown-desc {
  font-size:13px; color: var(--text-sub);
}

/* 争抢按钮态 */
.rush-btn {
  background: linear-gradient(135deg, #ff6b35, #ff4500);
  color:#fff; font-size:20px; font-weight:700;
  padding:20px; border:none; border-radius: var(--radius);
  width:100%; cursor:pointer;
  box-shadow: 0 4px 16px rgba(255,70,0,0.4);
  transition: all 0.15s;
  position:relative;
  overflow:hidden;
}
.rush-btn:active { transform: scale(0.98); }
.rush-btn:disabled {
  background: #b0bec5; box-shadow:none; cursor:not-allowed;
}
.rush-btn.loading::after {
  content:""; position:absolute;
  top:50%; left:50%;
  width:24px; height:24px;
  margin:-12px 0 0 -12px;
  border:3px solid rgba(255,255,255,0.3);
  border-top-color:#fff;
  border-radius:50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 名额进度 */
.quota-bar {
  height:8px; background:#eef0f3;
  border-radius:4px; overflow:hidden;
  margin:12px 0;
}
.quota-bar-fill {
  height:100%; background: linear-gradient(90deg, #00b578, #ff8800, #e53935);
  border-radius:4px; transition: width 0.3s;
}

/* 空状态 */
.empty {
  text-align:center; padding:40px 16px;
  color: var(--text-light);
}
.empty-icon { font-size:48px; margin-bottom:12px; }

/* 列表项 */
.list-item {
  display:flex; align-items:center;
  padding:14px 0;
  border-bottom:1px solid #f0f0f0;
}
.list-item:last-child { border-bottom:none; }
.list-item .label { color: var(--text-sub); font-size:14px; min-width:100px; }
.list-item .value { color: var(--text); font-size:14px; font-weight:500; }

/* 信息栏 */
.info-bar {
  background: var(--primary-light);
  color: var(--primary);
  padding:10px 14px;
  border-radius: var(--radius);
  font-size:13px;
  margin-bottom:16px;
  display:flex; align-items:center; gap:8px;
}

/* 浮动按钮 */
.fab {
  position:fixed; bottom:20px; right:20px;
  width:56px; height:56px; border-radius:50%;
  background: var(--primary); color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-size:24px; box-shadow: var(--shadow-lg);
  cursor:pointer; border:none;
}

/* 隐藏 */
.hidden { display:none !important; }

/* 动画 */
@keyframes fadeIn {
  from { opacity:0; transform: translateY(10px); }
  to { opacity:1; transform: translateY(0); }
}
.animate-in { animation: fadeIn 0.3s ease; }