/* ===== Interview Pages - Professional Design ===== */

/* ---- Config Page ---- */
.config-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.config-page .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6b7280;
  font-size: .88rem;
  margin-bottom: 24px;
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

.config-page .back-link:hover { color: #1a1a2e; }

.config-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 36px 32px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.config-card .card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.config-card .card-desc {
  font-size: .88rem;
  color: #6b7280;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.config-field {
  margin-bottom: 22px;
}

.config-field label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.config-field select,
.config-field input[type="text"],
.config-field textarea {
  width: 100%;
  padding: 11px 14px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: .9rem;
  font-family: inherit;
  color: #1a1a2e;
  outline: none;
  transition: border-color .15s;
}

.config-field select:focus,
.config-field input:focus,
.config-field textarea:focus {
  border-color: #ff6b00;
  box-shadow: 0 0 0 3px rgba(255,107,0,.06);
}

.config-field .help-text {
  font-size: .76rem;
  color: #9ca3af;
  margin-top: 4px;
}

.config-level-group {
  display: flex;
  gap: 10px;
}

.config-level-btn {
  flex: 1;
  padding: 11px;
  text-align: center;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  cursor: pointer;
  font-size: .88rem;
  font-family: inherit;
  color: #6b7280;
  transition: all .15s;
}

.config-level-btn:hover { border-color: #ff6b00; color: #1a1a2e; }

.config-level-btn.active {
  background: #fff3eb;
  border-color: #ff6b00;
  color: #ff6b00;
  font-weight: 600;
}

.config-submit {
  width: 100%;
  padding: 13px;
  margin-top: 8px;
  background: #ff6b00;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}

.config-submit:hover { background: #e55d00; }

/* ---- Interview Page ---- */
.interview-page-pro {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Top bar */
.ivp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.ivp-top-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ivp-pos {
  font-size: .92rem;
  font-weight: 600;
  color: #1a1a2e;
}

.ivp-level {
  padding: 2px 10px;
  background: #f3f4f6;
  border-radius: 10px;
  font-size: .75rem;
  color: #6b7280;
  font-weight: 600;
}

.ivp-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .92rem;
  font-weight: 700;
  color: #1a1a2e;
  font-family: var(--font-mono);
}

.ivp-timer.warning { color: #ef4444; }

/* Progress */
.ivp-progress {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 4px 0;
  overflow-x: auto;
}

.ivp-dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 600;
  color: #9ca3af;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0 3px;
}

.ivp-dot.current {
  border-color: #ff6b00;
  background: #fff3eb;
  color: #ff6b00;
}

.ivp-dot.done {
  border-color: #10b981;
  background: #ecfdf5;
  color: #10b981;
}

.ivp-dot.skipped {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #ef4444;
}

/* Question card */
.ivp-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.ivp-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.ivp-type-badge {
  padding: 3px 10px;
  background: #f3f4f6;
  border-radius: 10px;
  font-size: .73rem;
  font-weight: 600;
  color: #6b7280;
}

.ivp-q-num {
  font-size: .82rem;
  color: #9ca3af;
}

.ivp-question {
  font-size: .98rem;
  line-height: 1.7;
  color: #1a1a2e;
  margin-bottom: 22px;
}

/* Options */
.ivp-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ivp-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  font-size: .88rem;
  color: #4b5563;
  transition: all .12s;
}

.ivp-opt:hover { background: #f5f5f5; }

.ivp-opt.selected {
  background: #fff3eb;
  border-color: #ff6b00;
  color: #ff6b00;
}

.ivp-opt-letter {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  flex-shrink: 0;
  color: #6b7280;
}

.ivp-opt.selected .ivp-opt-letter {
  background: #ff6b00;
  color: #fff;
}

/* Inputs */
.ivp-input {
  width: 100%;
  padding: 12px 16px;
  background: #fafafa;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: .9rem;
  font-family: inherit;
  color: #1a1a2e;
  outline: none;
}

.ivp-input:focus { border-color: #ff6b00; background: #fff; }

.ivp-textarea {
  width: 100%;
  padding: 12px 16px;
  background: #fafafa;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: .9rem;
  font-family: inherit;
  color: #1a1a2e;
  outline: none;
  resize: vertical;
  min-height: 120px;
  line-height: 1.7;
}

.ivp-textarea:focus { border-color: #ff6b00; background: #fff; }

.ivp-code {
  width: 100%;
  padding: 14px 16px;
  background: #1e1e2e;
  border: 1px solid #333;
  border-radius: 8px;
  color: #e5e7eb;
  font-family: var(--font-mono);
  font-size: .82rem;
  outline: none;
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

/* Actions */
.ivp-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.ivp-btn-ghost {
  padding: 9px 18px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: .85rem;
  color: #6b7280;
  cursor: pointer;
  font-family: inherit;
}

.ivp-btn-ghost:hover { background: #f5f5f5; color: #1a1a2e; }

.ivp-btn-next {
  padding: 9px 24px;
  background: #ff6b00;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.ivp-btn-next:hover { background: #e55d00; }

/* ---- Upload Zone (JD) ---- */
.upload-zone-pro {
  border: 2px dashed #d1d5db;
  border-radius: 10px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: #fafafa;
}

.upload-zone-pro:hover,
.upload-zone-pro.drag-over {
  border-color: #ff6b00;
  background: #fff3eb;
}

.upload-zone-pro-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.upload-zone-pro-inner p {
  font-size: .9rem;
  color: #6b7280;
  margin: 0;
}

.upload-preview-pro {
  margin-top: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

.upload-preview-pro img {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  display: block;
}

.upload-preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #fafafa;
  border-top: 1px solid #e5e7eb;
}

.config-field-btn-ghost {
  padding: 4px 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: .8rem;
  color: #ef4444;
  cursor: pointer;
  font-family: inherit;
}

.config-field-btn-ghost:hover {
  background: #fef2f2;
}

/* ===== 移动端适配 ===== */

@media (max-width: 480px) {
  /* 面试页面上边栏 */
  .ivp-top {
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
  }
  .ivp-top-left {
    flex-wrap: wrap;
    gap: 4px;
  }

  /* 进度点 — 允许换行 */
  .ivp-progress {
    padding: 8px 4px;
    gap: 3px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .ivp-dot {
    width: 22px; height: 22px;
    font-size: 0.6rem;
    min-width: 22px;
    line-height: 22px;
  }

  /* 题目卡片 */
  .ivp-card {
    padding: 16px 12px;
    border-radius: 8px;
    margin: 0;
  }
  .ivp-question {
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 14px;
  }
  .ivp-card-header {
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 6px;
  }

  /* 选项按钮 */
  .ivp-options {
    gap: 6px;
  }
  .ivp-opt {
    padding: 12px 12px;
    margin-bottom: 2px;
    font-size: 0.85rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .ivp-opt-letter {
    width: 26px; height: 26px;
    font-size: 0.7rem;
    line-height: 26px;
    flex-shrink: 0;
  }

  /* 文本输入 */
  .ivp-textarea, .ivp-code {
    font-size: 16px !important; /* 防 iOS 缩放 */
    min-height: 100px;
    padding: 12px;
  }
  .ivp-input {
    font-size: 16px !important;
    padding: 12px;
  }

  /* 底部操作栏 — 固定底部 */
  .ivp-actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 10px 12px;
    gap: 6px;
    flex-wrap: nowrap;
    border-top: 1px solid #e5e7eb;
    z-index: 10;
    margin: 0 -8px;
    border-radius: 0;
  }
  .ivp-btn-ghost {
    flex: 0 0 auto;
    min-width: 50px;
    min-height: 44px;
    padding: 8px 10px;
    font-size: 0.78rem;
  }
  .ivp-btn-next {
    flex: 1;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  /* 配置页 */
  .config-page {
    padding: 12px 10px 40px;
  }
  .config-level-group {
    flex-wrap: wrap;
    gap: 6px;
  }
  .config-level-btn {
    flex: 1 1 calc(33% - 4px);
    min-width: 70px;
    padding: 12px 6px;
    font-size: 0.78rem;
    min-height: 44px;
  }

  .config-card {
    padding: 16px 12px;
    border-radius: 8px;
  }
  .config-field label {
    font-size: 0.82rem;
  }
  .config-field select,
  .config-field input[type="text"],
  .config-field textarea {
    font-size: 16px;
    padding: 12px;
  }
  .config-submit {
    padding: 14px;
    font-size: 1rem;
    min-height: 48px;
  }

  /* 模式二：截图上传区 */
  .upload-zone-pro {
    padding: 20px 12px;
  }
  .upload-zone-pro-inner p {
    font-size: 0.82rem;
  }
}
