/* ============================================
   智合严选 · AI影响力建设 售前评估系统
   ============================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #3B82F6;
  --primary-dark: #1E40AF;
  --primary-light: #DBEAFE;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-500: #6B7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.6;
  min-height: 100vh;
}

/* 顶部导航 */
.topbar {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.2px;
}

.brand-subtitle {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}

.topbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.topbar-tag {
  padding: 4px 12px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}

/* 按钮 */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: white;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-500);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #059669;
}

.btn-text {
  background: transparent;
  color: var(--gray-500);
  border: none;
  cursor: pointer;
  font-size: 13px;
  padding: 4px 8px;
}

.btn-text:hover {
  color: var(--primary);
}

/* 主容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

/* 步骤通用 */
.step {
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-header {
  text-align: center;
  margin-bottom: 32px;
}

.step-num {
  display: inline-block;
  padding: 4px 14px;
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: 100px;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.step-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--gray-900);
}

.step-desc {
  color: var(--gray-500);
  font-size: 15px;
}

/* 入口选择 */
.entry-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  max-width: 760px;
  margin: 0 auto;
}

.entry-card {
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.entry-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  transform: scaleX(0);
  transition: transform 0.3s;
  transform-origin: left;
}

.entry-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.entry-card:hover::before {
  transform: scaleX(1);
}

.entry-icon {
  font-size: 56px;
  margin-bottom: 16px;
}

.entry-card h3 {
  font-size: 22px;
  margin-bottom: 8px;
  color: var(--gray-900);
}

.entry-card p {
  color: var(--gray-500);
  font-size: 14px;
  margin-bottom: 20px;
}

.entry-features {
  list-style: none;
  text-align: left;
  margin: 0 0 24px;
  padding: 0;
}

.entry-features li {
  padding: 6px 0 6px 22px;
  position: relative;
  font-size: 13px;
  color: var(--gray-700);
}

.entry-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

/* 表单 */
.form-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  max-width: 640px;
  margin: 0 auto;
}

.form-row {
  margin-bottom: 22px;
}

.form-row label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.required {
  color: var(--danger);
}

.form-row input,
.form-row select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: all 0.2s;
  background: white;
}

.form-row input:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-hint {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 6px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}

/* 问题选择 */
.selection-status {
  background: white;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 70px;
  z-index: 50;
}

.status-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.status-count {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.status-remaining {
  margin-left: auto;
  color: var(--gray-500);
  font-size: 13px;
}

.status-bar {
  height: 6px;
  background: var(--gray-100);
  border-radius: 100px;
  overflow: hidden;
}

.status-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--success));
  border-radius: 100px;
  transition: width 0.3s;
  width: 0%;
}

.question-categories {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.q-category {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.q-category-header {
  padding: 14px 20px;
  background: linear-gradient(90deg, var(--primary-light), white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.q-category-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
}

.q-category-desc {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px;
}

.q-category-count {
  font-size: 12px;
  padding: 4px 10px;
  background: var(--primary);
  color: white;
  border-radius: 100px;
  font-weight: 600;
}

.q-list {
  padding: 12px;
}

.q-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid transparent;
}

.q-item:hover {
  background: var(--gray-50);
}

.q-item.selected {
  background: var(--primary-light);
  border-color: var(--primary);
}

.q-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--primary);
}

.q-item-text {
  flex: 1;
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.5;
}

/* 答案展示 */
.answer-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.answer-tab {
  flex: 1;
  min-width: 110px;
  padding: 12px 16px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.answer-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.answer-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.answer-tab .mention-rate {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 100px;
  background: rgba(0,0,0,0.1);
}

.answer-tab.active .mention-rate {
  background: rgba(255,255,255,0.25);
}

.answer-list {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  max-height: 600px;
  overflow-y: auto;
}

.answer-item {
  border-bottom: 1px solid var(--gray-100);
  padding: 20px;
}

.answer-item:last-child {
  border-bottom: none;
}

.answer-q {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.answer-q-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.answer-q-text {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.5;
}

.answer-q-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
  margin-left: 6px;
  flex-shrink: 0;
}

.answer-content {
  background: var(--gray-50);
  border-left: 3px solid var(--primary);
  padding: 14px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--gray-700);
  white-space: pre-wrap;
  word-wrap: break-word;
}

.answer-content strong {
  color: var(--gray-900);
}

.answer-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
}

.answer-link:hover {
  text-decoration: underline;
}

.answer-link::before {
  content: '🔗';
}

/* 竞争力分析 */
.competitive-summary {
  background: white;
  border-radius: var(--radius-md);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
}

.score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  position: relative;
}

.score-circle::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: white;
  z-index: 0;
}

.score-circle > * {
  position: relative;
  z-index: 1;
}

.score-num {
  font-size: 38px;
  line-height: 1;
  color: var(--gray-900);
}

.score-num span {
  font-size: 16px;
  color: var(--gray-500);
  margin-left: 2px;
}

.score-level {
  font-size: 14px;
  margin-top: 4px;
  padding: 2px 10px;
  border-radius: 100px;
  color: white;
}

.summary-content h3 {
  font-size: 22px;
  color: var(--gray-900);
  margin-bottom: 6px;
}

.summary-content .keyword-info {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 14px;
}

.summary-recommendation {
  background: var(--gray-50);
  border-left: 3px solid var(--primary);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 14px;
  color: var(--gray-700);
}

.dimension-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dim-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 16px;
  align-items: center;
  transition: all 0.2s;
}

.dim-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.dim-weight {
  font-size: 12px;
  color: var(--gray-500);
  text-align: center;
}

.dim-weight-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.dim-info {
  min-width: 0;
}

.dim-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.dim-key {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--gray-100);
  color: var(--gray-500);
  border-radius: 100px;
  font-weight: 500;
}

.dim-desc {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 6px;
}

.dim-evidence {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.5;
}

.dim-score {
  text-align: center;
  padding: 8px 14px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  min-width: 60px;
}

.dim-score-num {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.dim-score-label {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 2px;
}

/* 报告预览 */
.report-preview {
  background: white;
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  max-width: 800px;
  margin: 0 auto;
}

.report-section {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-100);
}

.report-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.report-section h3 {
  font-size: 17px;
  color: var(--primary-dark);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
  display: inline-block;
}

.report-section p {
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.7;
  margin-bottom: 8px;
}

.report-section ul {
  padding-left: 20px;
  font-size: 14px;
  color: var(--gray-700);
}

.report-section li {
  margin-bottom: 6px;
  line-height: 1.6;
}

.report-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
}

.info-item-label {
  font-size: 11px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-item-value {
  font-size: 14px;
  color: var(--gray-900);
  font-weight: 600;
}

.report-watermark {
  margin-top: 20px;
  padding: 10px;
  text-align: center;
  font-size: 12px;
  color: var(--gray-500);
  border-top: 1px dashed var(--gray-200);
}

/* 完成页 */
.finish-card {
  text-align: center;
  background: white;
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  max-width: 500px;
  margin: 40px auto;
  box-shadow: var(--shadow-md);
}

.finish-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.finish-card h2 {
  font-size: 26px;
  color: var(--gray-900);
  margin-bottom: 10px;
}

.finish-desc {
  color: var(--gray-500);
  margin-bottom: 28px;
  font-size: 15px;
}

.finish-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* 页脚 */
.footer {
  text-align: center;
  padding: 24px;
  color: var(--gray-500);
  font-size: 12px;
  border-top: 1px solid var(--gray-200);
  background: white;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--gray-900);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s;
  z-index: 1000;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast.error {
  background: var(--danger);
}

.toast.success {
  background: var(--success);
}

/* 响应式 */
@media (max-width: 768px) {
  .competitive-summary {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .score-circle {
    margin: 0 auto;
  }

  .dim-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .report-info-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }
}

/* 滚动条 */
.answer-list::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.answer-list::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 100px;
}

.answer-list::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}
