/* ===== 全局重置与基础 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1e293b;
  --primary-dark: #0f172a;
  --accent: #f59e0b;
  --surface: #f8fafc;
  --border: #e2e8f0;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei';
  line-height: 1.6;
  color: var(--text-primary);
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  margin: 0;
  padding: 0;
}

/* ===== 布局容器 ===== */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== 首屏标题区 ===== */
.hero-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 70%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 400;
  opacity: 0.92;
  max-width: 700px;
  margin: 0 auto;
}

/* ===== 平台价值说明 ===== */
.value-section {
  padding: 3rem 2rem;
  background: white;
}

.value-card {
  max-width: 800px;
  margin: 0 auto;
  background: #f8fafc;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
}

.value-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.value-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.value-text strong {
  color: var(--primary);
  font-weight: 700;
}

/* ===== 分类区 ===== */
.categories-section {
  padding: 3rem 2rem;
  background: #f1f5f9;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  margin-bottom: 2.5rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.category-item {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  cursor: pointer;
}

.category-item:hover,
.category-item.active {
  transform: translateY(-3px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border-color: var(--accent);
  background: var(--primary);
  color: white;
}

.category-item.active .category-icon,
.category-item.active .category-name,
.category-item.active .category-desc {
  color: white;
}

.category-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
  text-align: center;
}

.category-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
  text-align: center;
}

.category-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.5;
}

/* ===== 表单区 ===== */
.form-section {
  padding: 3rem 2rem;
  background: white;
}

.diagnosis-form {
  max-width: 800px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.75rem;
}

.form-label {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.form-select,
.form-textarea,
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 1rem;
  background: white;
  font-family: inherit;
}

.form-select:focus,
.form-textarea:focus,
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checkbox-item {
  display: flex;
  align-items: flex-start;
}

.checkbox-item input {
  margin-top: 0.35rem;
  margin-right: 0.75rem;
  width: 18px;
  height: 18px;
}

.checkbox-label {
  font-size: 1rem;
  line-height: 1.5;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.radio-group label {
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  cursor: pointer;
}

.radio-group input {
  margin-right: 0.5rem;
  margin-top: 0.1rem;
}

.btn-submit {
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 1rem;
}

.btn-submit:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ===== 结果区 ===== */
.result-section {
  padding: 3rem 2rem;
  background: #f1f5f9;
}

.result-section.hidden {
  display: none;
}

.result-card {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border);
}

.result-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2rem;
  text-align: center;
}

.result-content {
  margin-bottom: 2rem;
}

.result-item {
  margin-bottom: 1.5rem;
}

.result-subtitle {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.result-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.result-list {
  padding-left: 1.5rem;
  margin-bottom: 0;
}

.result-list li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn-secondary {
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  background: #e2e8f0;
  color: var(--primary);
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
}

.btn-outline {
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  cursor: pointer;
}

.btn-outline:hover:not(:disabled) {
  background: #e2e8f0;
}

/* ===== 页脚 ===== */
.app-footer {
  text-align: center;
  padding: 1.5rem;
  background: var(--primary-dark);
  color: #cbd5e1;
  font-size: 0.9rem;
  border-top: 1px solid #334155;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .result-actions {
    flex-direction: column;
  }
  
  .result-actions > * {
    width: 100%;
  }
}

/* ===== 隐藏滚动条（仅 WebKit）===== */
body::-webkit-scrollbar {
  width: 6px;
}
body::-webkit-scrollbar-track {
  background: #f1f5f9;
}
body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}