/**
 * 首页样式
 * 包含：步骤指示器、二维码、进度条、帮助弹窗
 */

/* ========== 步骤指示器 ========== */
.steps {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
}
.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--card-border);
  z-index: 0;
}
.step.done:not(:last-child)::after { 
  background: var(--primary); 
}
.step-num {
  width: 28px; 
  height: 28px;
  border-radius: 50%;
  background: var(--card-border);
  border: 2px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  z-index: 1;
  transition: all 0.3s;
}
.step.active .step-num { 
  border-color: var(--primary); 
  background: var(--primary); 
  color: white; 
}
.step.done .step-num { 
  border-color: var(--success); 
  background: var(--success); 
  color: white; 
}
.step-label { 
  font-size: 11px; 
  color: var(--text-muted); 
  text-align: center; 
}
.step.active .step-label, 
.step.done .step-label { 
  color: var(--text); 
}

/* ========== 二维码区域 ========== */
#qr-section { 
  display: none; 
}

.qr-img {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  border: 3px solid var(--card-border);
  background: white;
  padding: 8px;
}

.qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: relative;
  cursor: default;
}
.qr-wrap.expired {
  cursor: pointer;
}
.qr-img.expired {
  opacity: 0.4;
  filter: grayscale(50%);
}

.qr-refresh-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  border-radius: 12px;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  color: white;
  font-size: 13px;
  pointer-events: none;
}
.qr-refresh-overlay.show { 
  display: flex; 
}
.qr-refresh-overlay svg { 
  width: 32px; 
  height: 32px; 
}

.qr-hint {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}

/* ========== 进度条 ========== */
.progress-wrap {
  width: 100%;
  margin-top: 8px;
}
.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: #334155;
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
  background: var(--primary);
}

.progress-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}
.progress-status.pending { 
  background: #1e3a5f22; 
  border: 1px solid #1e40af55; 
  color: #93c5fd; 
}
.progress-status.processing { 
  background: #1e3a5f33; 
  border: 1px solid #2563eb66; 
  color: #60a5fa; 
}
.progress-status.scanned { 
  background: #1c3a2d33; 
  border: 1px solid #16a34a66; 
  color: #4ade80; 
}
.progress-status.done { 
  background: #14532d33; 
  border: 1px solid #16a34a; 
  color: #4ade80; 
}
.progress-status.failed { 
  background: #450a0a33; 
  border: 1px solid #dc2626; 
  color: #f87171; 
}

/* ========== 帮助气泡 ========== */
.help-bubble {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #1e40af22, #1e3a8a33);
  border: 1px solid #3b82f644;
  color: #93c5fd;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
}
.help-bubble:hover {
  background: linear-gradient(135deg, #1e40af33, #1e3a8a44);
  border-color: #3b82f6;
  color: #bfdbfe;
}
.help-bubble svg {
  width: 16px;
  height: 16px;
}

/* ========== 帮助弹窗 ========== */
.help-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.help-modal.open {
  display: flex;
}
.help-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.help-title {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.help-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s;
}
.help-close:hover {
  background: var(--card-border);
  color: var(--text);
}

/* 帮助步骤 */
.help-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.help-step {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.help-step-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.help-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.help-step-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.help-step-img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--input-bg);
  min-height: 120px;
  object-fit: contain;
}
.help-step-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  padding-left: 38px;
}
