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

/* ---- Config Page ---- */
.config-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 24px 60px;
  position: relative;
  z-index: 1;
}

.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;
  transition: color .15s;
}

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

.config-card {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 16px;
  padding: 40px 40px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 4px 16px rgba(0,0,0,.03);
  position: relative;
  overflow: hidden;
}
/* 卡片顶部渐变装饰线 */
.config-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff6b00, #f59e0b, #3b82f6, #8b5cf6, #ff6b00);
  background-size: 200% 100%;
  animation: cardLineShine 6s linear infinite;
}
@keyframes cardLineShine {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.config-card .card-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

/* 字段分组区块 */
.config-section {
  background: #fafbfc;
  border: 1px solid #eaecf0;
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 20px;
}
.config-section-title {
  font-size: .8rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 14px;
}

.config-field {
  margin-bottom: 18px;
}
.config-field:last-child { margin-bottom: 0; }

.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: 12px 16px;
  text-align: center;
  background: #f8f9fb;
  border: 1.5px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: .88rem;
  font-family: inherit;
  font-weight: 500;
  color: #6b7280;
  transition: all .18s ease;
}
.config-level-btn:hover { background: #fff; border-color: #d1d5db; color: #1a1a2e; }
.config-level-btn.active {
  background: #fff;
  border-color: #ff6b00;
  color: #ff6b00;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(255,107,0,.1);
}

/* === 搜索框 === */
.search-field-wrap { position: relative; }
.search-row {
  display: flex; align-items: center;
}
.search-input-outside {
  flex: 1; min-width: 0;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: .9rem; font-family: inherit;
  color: #1a1a2e; background: #fff;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.search-input-outside:focus {
  border-color: #ff6b00;
  box-shadow: 0 0 0 3px rgba(255,107,0,.06);
}
.search-input-outside::placeholder { color: #b0b7c3; }

/* 行业标签 */
.industry-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.industry-tag {
  padding: 7px 14px;
  background: #f8f9fb;
  border: 1.5px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: .83rem;
  font-family: inherit;
  color: #4b5563;
  transition: all .18s ease;
  white-space: nowrap;
  letter-spacing: .2px;
}
.industry-tag:hover { background: #fff; border-color: #d1d5db; color: #1a1a2e; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.industry-tag.active {
  background: #fff;
  border-color: #ff6b00;
  color: #ff6b00;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(255,107,0,.12);
}
.industry-tag.industry-hidden { display: none; }
.industry-grid.expanded .industry-tag.industry-hidden { display: inline-block; animation: tagFadeIn .25s ease; }
.industry-toggle-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 14px; background: #fff; border: 1.5px dashed #d1d5db;
  border-radius: 8px; cursor: pointer; font-size: .8rem;
  font-family: inherit; color: #ff6b00; transition: all .15s; white-space: nowrap;
}
.industry-toggle-btn:hover { background: #fff3eb; border-color: #ff6b00; border-style: solid; }
.industry-toggle-btn .arrow { display: inline-block; transition: transform .3s; }
.industry-toggle-btn.expanded .arrow { transform: rotate(180deg); }

/* 岗位标签 */
.role-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.role-tag {
  padding: 5px 12px; background: #f8f9fb; border: 1.5px solid transparent;
  border-radius: 6px; cursor: pointer; font-size: .81rem;
  font-family: inherit; color: #4b5563; transition: all .15s ease;
}
.role-tag:hover { background: #fff; border-color: #ff6b00; color: #ff6b00; box-shadow: 0 1px 3px rgba(255,107,0,.08); }
.role-tag.active {
  background: #fff3eb; border-color: #ff6b00; color: #ff6b00; font-weight: 600;
}
.role-tag.role-hidden { display: none; }
.role-grid.expanded .role-tag.role-hidden { display: inline-block; animation: tagFadeIn .25s ease; }
@keyframes tagFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.role-toggle-btn {
  display: inline-flex; align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: #fff;
  border: 1px dashed #d1d5db;
  border-radius: 16px;
  cursor: pointer;
  font-size: .8rem;
  font-family: inherit;
  color: #ff6b00;
  transition: all .15s;
  white-space: nowrap;
}
.role-toggle-btn:hover {
  background: #fff3eb;
  border-color: #ff6b00;
  border-style: solid;
}
.role-toggle-btn .arrow {
  display: inline-block;
  transition: transform .3s;
}
.role-toggle-btn.expanded .arrow {
  transform: rotate(180deg);
}
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,.1), 0 4px 12px rgba(0,0,0,.06);
  z-index: 50;
  max-height: 340px;
  overflow-y: auto;
  animation: dropIn .2s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top center;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.search-group { padding: 4px 0; }
.search-group + .search-group { border-top: 1px solid #f3f4f6; }
.search-group-label {
  padding: 8px 14px 4px;
  font-size: .7rem; font-weight: 700;
  color: #9ca3af; text-transform: uppercase;
  letter-spacing: .8px;
}
.search-result-item {
  padding: 10px 16px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  font-size: .88rem; transition: all .12s;
}
.search-result-item:hover, .search-result-item.highlight {
  background: #fff8f2; padding-left: 20px;
}
.search-result-item .result-role { color: #1a1a2e; font-weight: 500; }
.search-result-item .result-industry { color: #9ca3af; font-size: .73rem; }
.search-result-item mark {
  background: #fff3cd; color: #e65100;
  padding: 1px 3px; border-radius: 3px;
}
.search-empty {
  padding: 24px 16px; text-align: center;
  color: #9ca3af; font-size: .84rem;
}

/* 自定义岗位选项（置顶高亮） */
.search-custom-option {
  background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 100%) !important;
  border-bottom: 1.5px solid #fcd34d !important;
  padding: 12px 16px !important;
  font-weight: 600 !important;
}
.search-custom-option:hover {
  background: linear-gradient(135deg, #fed7aa 0%, #fde68a 100%) !important;
}

/* 热门岗位网格 */
.search-hot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 4px 0;
}
.search-hot-grid .search-result-item {
  background: #f9fafb;
  border-radius: 8px;
  justify-content: center;
  padding: 8px 10px;
  font-size: .82rem;
}

.config-submit {
  width: 100%;
  padding: 14px;
  margin-top: 14px;
  background: #111827;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: .4px;
  transition: all .18s ease;
}
.config-submit:hover { background: #ff6b00; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(255,107,0,.25); }

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

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

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

.ivp-top-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

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

.ivp-progress-text {
  font-size: .82rem;
  color: #9ca3af;
}

.ivp-end-btn {
  padding: 5px 14px;
  background: #fff;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  color: #ef4444;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.ivp-end-btn:hover {
  background: #fef2f2;
  border-color: #ef4444;
}

.ivp-timer {
  font-size: 1rem;
  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: 30px; height: 30px;
  border-radius: 7px;
  background: #fff;
  border: 2px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  color: #9ca3af;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  font-family: inherit;
  transition: all .15s;
}
.ivp-dot:hover {
  border-color: #b0b7c3;
  background: #f9fafb;
}
.ivp-dot + .ivp-dot {
  margin-left: 4px;
}
.ivp-dot + .ivp-dot::before {
  content: '';
  position: absolute;
  right: calc(100% + 2px); top: 50%;
  width: 4px; height: 2px;
  background: #e5e7eb;
  transform: translateY(-50%);
  pointer-events: none;
}

.ivp-dot.current {
  border-color: #ff6b00;
  background: #ff6b00;
  color: #fff;
  box-shadow: 0 2px 8px rgba(255,107,0,.25);
}
.ivp-dot.done {
  border-color: #10b981;
  background: #ecfdf5;
  color: #10b981;
}
.ivp-dot.done + .ivp-dot::before { background: #10b981; }
.ivp-dot.skipped {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #ef4444;
}

/* 题库来源提示 */
.ivp-notice {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
  text-align: center;
}

/* Question card */
.ivp-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 24px;
}

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

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

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

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

/* 题目内代码格式化 */
.ivp-question code {
  background: #f0f0f5;
  color: #c7254e;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
  white-space: nowrap;
}

.ivp-question pre {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 14px 18px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 12px 0;
  line-height: 1.5;
  font-size: 0.85rem;
}

.ivp-question pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
  white-space: pre;
  border-radius: 0;
}

/* 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: #1a1a2e;
}

.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-ghost:disabled { opacity: .35; cursor: not-allowed; }
.ivp-btn-prev { margin-right: auto; }

.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-question pre {
    font-size: 0.78rem;
    padding: 10px 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;
  }
}
