/**
 * TalentSaaS Admin Panel — Phase 5 功能补齐增强样式
 */

/* ====== 答题界面通用 ====== */

.answer-page {
  max-width: 900px;
  margin: 0 auto;
}

.answer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.answer-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  min-width: 200px;
}

.answer-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: monospace;
}

.answer-timer.normal {
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent);
}

.answer-timer.warning {
  background: rgba(255, 152, 0, 0.1);
  color: #ff9800;
  animation: pulse 1.5s ease-in-out infinite;
}

.answer-timer.danger {
  background: rgba(244, 67, 54, 0.1);
  color: var(--danger);
  animation: pulse 0.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.answer-progress {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  margin-bottom: 20px;
  overflow: hidden;
}

.answer-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #f0c46a);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.answer-progress-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 4px;
}

/* 答题卡导航 */
.answer-card-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
  padding: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.answer-card-nav-item {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg);
  transition: all 0.2s;
  color: var(--text-secondary);
}

.answer-card-nav-item:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.answer-card-nav-item.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.answer-card-nav-item.answered {
  background: rgba(76, 175, 80, 0.15);
  border-color: #4caf50;
  color: #4caf50;
}

.answer-card-nav-item.active.answered {
  background: var(--accent);
  color: #fff;
}

/* 题目卡片 */
.question-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}

.question-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.question-number {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.question-type-badge {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 8px;
}

.question-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* 选项样式 */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.option-item:hover {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.05);
}

.option-item.selected {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.1);
  font-weight: 500;
}

.option-radio {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.option-item.selected .option-radio {
  border-color: var(--accent);
  background: var(--accent);
}

.option-item.selected .option-radio::after {
  content: '';
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
}

.option-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.option-item.selected .option-checkbox {
  border-color: var(--accent);
  background: var(--accent);
}

.option-item.selected .option-checkbox::after {
  content: '✓';
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

/* 量表 */
.scale-options {
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.scale-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  min-width: 50px;
  transition: all 0.2s;
}

.scale-item:hover {
  border-color: var(--accent);
}

.scale-item.selected {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.1);
}

.scale-value {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
}

.scale-label {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* 简答/填空 */
.text-answer {
  width: 100%;
  min-height: 100px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  background: var(--bg);
  color: var(--text-primary);
}

.text-answer:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* 底部按钮 */
.answer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  gap: 12px;
}

.answer-actions .btn-group {
  display: flex;
  gap: 8px;
}

.btn-submit {
  padding: 12px 32px;
  font-size: 1rem;
  font-weight: 600;
}

/* ====== 人才画像可视化 ====== */

.profile-dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.profile-score-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.profile-score-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.profile-score-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.profile-score-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.chart-container {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.chart-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.chart-wrap {
  width: 100%;
  height: 350px;
}

.ability-matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ability-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: 6px;
}

.ability-name {
  font-size: 0.85rem;
  font-weight: 500;
}

.ability-bar-wrap {
  flex: 1;
  margin: 0 12px;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.ability-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.ability-bar.high { background: #4caf50; }
.ability-bar.medium { background: var(--accent); }
.ability-bar.low { background: var(--danger); }

.ability-score {
  font-weight: 600;
  font-size: 0.85rem;
  min-width: 35px;
  text-align: right;
}

/* 综合报告页 */
.report-section {
  margin-bottom: 24px;
}

.report-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 16px;
}

.report-content {
  line-height: 1.8;
  color: var(--text-secondary);
}

.hiring-badge {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
}

.hiring-badge.recommend { background: rgba(76, 175, 80, 0.15); color: #4caf50; }
.hiring-badge.reserve { background: rgba(37, 99, 235, 0.15); color: var(--accent); }
.hiring-badge.not-recommend { background: rgba(244, 67, 54, 0.15); color: var(--danger); }

/* 导出按钮 */
.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.btn-export:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* 响应式 */
@media (max-width: 768px) {
  .profile-dashboard {
    grid-template-columns: 1fr;
  }
  .answer-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .ability-matrix {
    grid-template-columns: 1fr;
  }
  .scale-options {
    flex-wrap: wrap;
  }
}
