/* 样式主题：科技感 + 专业性（Glass + Gradient + Grid） */

:root {
  --bg-deep: #0b1020;
  --bg-card: rgba(255, 255, 255, 0.08);
  --bg-card-strong: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.18);
  --text-strong: #e9eef5;
  --text-soft: #b8c0cc;
  --muted: #7c869a;
  --primary-1: #6366f1; /* indigo */
  --primary-2: #8b5cf6; /* violet */
  --primary-3: #06b6d4; /* cyan */
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
}

/* 全局与背景 */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: var(--text-strong);
  background:
    radial-gradient(1200px 800px at 10% -10%, rgba(99,102,241,0.18), transparent 60%),
    radial-gradient(900px 600px at 100% 10%, rgba(139,92,246,0.18), transparent 60%),
    linear-gradient(135deg, #0b1220 0%, #101735 50%, #0b1220 100%);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 背景网格与流光 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)),
    repeating-linear-gradient(
      0deg,
      transparent 0 24px,
      rgba(255,255,255,0.045) 24px 25px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0 24px,
      rgba(255,255,255,0.045) 24px 25px
    );
  mask-image: radial-gradient(80% 60% at 50% 30%, #000 40%, transparent 100%);
  z-index: 0;
}

.container {
  position: relative;
  max-width: 1200px;
  padding: 28px;
  margin: 0 auto;
  z-index: 1;
}

/* 页眉 */
.header { text-align: center; margin-bottom: 28px; }
.header h1 {
  font-size: 2.4rem;
  line-height: 1.15;
  margin: 0 0 12px 0;
  background: linear-gradient(90deg, var(--primary-1), var(--primary-2), var(--primary-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 24px rgba(99,102,241,0.25);
}
.header p { color: var(--text-soft); font-size: 1rem; }

/* 主布局 */
.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 960px) { .main-content { grid-template-columns: 1fr; } }

/* 卡片（玻璃质感） */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: saturate(130%) blur(8px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.28);
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
}
.card h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px 0;
  font-size: 1.25rem;
  color: var(--text-strong);
  border-bottom: 2px solid rgba(99,102,241,0.35);
  padding-bottom: 10px;
}

/* 上传区（动效描边） */
.upload-area {
  border: 2px dashed rgba(255,255,255,0.25);
  border-radius: 12px;
  padding: 32px 18px;
  text-align: center;
  margin-bottom: 16px;
  cursor: pointer;
  position: relative;
  isolation: isolate;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}
.upload-area:hover {
  border-color: rgba(99,102,241,0.7);
  background: rgba(99,102,241,0.06);
  transform: translateY(-1px);
}
.upload-area.dragover {
  border-color: rgba(139,92,246,0.9);
  background: rgba(139,92,246,0.08);
}
.upload-area::after {
  content: "";
  position: absolute; inset: -2px;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,0.45), transparent);
  filter: blur(8px);
  opacity: 0; transition: opacity 0.3s ease;
  z-index: -1;
}
.upload-area:hover::after { opacity: 1; }
.upload-icon { font-size: 2.4rem; color: rgba(255,255,255,0.6); margin-bottom: 8px; }
.upload-area:hover .upload-icon { color: #c3c8ff; }

/* 输入与选择器 */
select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: rgba(20,24,45,0.6);
  color: var(--text-strong);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
select:focus {
  border-color: rgba(99,102,241,0.7);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.25);
}
label { color: var(--text-soft); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary-1), var(--primary-2));
  color: white;
  border: none;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 6px 18px rgba(99,102,241,0.35);
}
.btn:hover { transform: translateY(-1.5px); box-shadow: 0 10px 24px rgba(99,102,241,0.45); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; }

/* 次要按钮（信息色） */
.btn-secondary {
  background: linear-gradient(135deg, #17a2b8, #10839a);
  box-shadow: 0 6px 18px rgba(23,162,184,0.35);
}
.btn + .btn { margin-left: 10px; }

/* 文件信息 */
.file-info {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text-soft);
}

/* 进度条 */
.progress-bar {
  width: 100%; height: 8px; border-radius: 6px; overflow: hidden;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--line-soft);
}
.progress {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--primary-1), var(--primary-2));
  position: relative;
}
.progress::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.25) 0 10px, transparent 10px 20px);
  mix-blend-mode: overlay;
}

/* 结果区 */
.results-section {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 22px;
  margin-top: 22px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  backdrop-filter: saturate(130%) blur(8px);
}
.results-section h2 { margin-top: 0; border-bottom: 2px solid rgba(99,102,241,0.35); padding-bottom: 10px; }

/* 审核项与状态徽章 */
.audit-item {
  border-left: 4px solid var(--success);
  background: rgba(40,167,69,0.08);
  padding: 14px;
  margin: 12px 0;
  border-radius: 0 10px 10px 0;
}
.audit-item.warning { border-left-color: var(--warning); background: rgba(255,193,7,0.08); }
.audit-item.error { border-left-color: var(--danger); background: rgba(220,53,69,0.08); }

.status-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }
.status-pass { background: rgba(40,167,69,0.18); color: #c5ffd6; }
.status-warning { background: rgba(255,193,7,0.18); color: #fff2c2; }
.status-error { background: rgba(220,53,69,0.18); color: #ffd1d8; }

/* 加载态 */
.loading { text-align: center; padding: 28px; color: var(--text-soft); }
.spinner {
  border: 4px solid rgba(255,255,255,0.16);
  border-top: 4px solid var(--primary-1);
  border-radius: 50%; width: 46px; height: 46px; margin: 0 auto 12px; animation: spin 1s linear infinite;
}
@keyframes spin { from { transform: rotate(0deg);} to { transform: rotate(360deg);} }

/* 分数展示（如果使用） */
.score-circle {
  width: 84px; height: 84px; border-radius: 50%; border: 4px solid var(--success);
  display: flex; align-items: center; justify-content: center; position: relative; flex-shrink: 0;
}
.score-display { text-align: center; }
.score-number { font-size: 24px; font-weight: 800; line-height: 1; display: block; }
.score-text { font-size: 12px; color: var(--text-soft); }

/* 模态层（样例数据） */
.modal {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(8,12,24,0.62);
  backdrop-filter: blur(4px);
  animation: modalFade 0.2s ease;
  z-index: 1000;
}
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }

/* 页脚 */
.footer { text-align: center; color: var(--muted); margin-top: 26px; font-size: 0.9rem; }

/* 测试页（ai-test.html） */
.test-section {
  margin: 20px 0; padding: 20px; background: var(--bg-card);
  border: 1px solid var(--line-soft); border-radius: 12px; backdrop-filter: blur(6px);
}
.button-group { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }

/* 按钮扩展（测试页兼容） */
.btn-primary { background: linear-gradient(135deg, #0ea5e9, #2563eb); box-shadow: 0 6px 18px rgba(37,99,235,0.35); }
.btn-test { background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 6px 18px rgba(34,197,94,0.35); }

/* 提示块（测试页） */
.test-result { margin: 10px 0; padding: 10px; border-radius: 10px; border: 1px solid var(--line-soft); }
.success { background-color: rgba(34,197,94,0.12); color: #d6ffea; }
.error { background-color: rgba(220,53,69,0.12); color: #ffd6dd; }
.loading { background-color: rgba(255,193,7,0.12); color: #fff0c2; }

/* 选择态高亮 */
::selection { background: rgba(139,92,246,0.35); color: white; } 

/* 标题类 */
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px 0;
  font-size: 1.1rem;
  color: var(--text-strong);
}
.section-title i { color: var(--primary-1); }

/* 汇总卡片 */
.summary-card {
  background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(6,182,212,0.08));
  padding: 18px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  margin-bottom: 18px;
}
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.summary-item { text-align: center; }
.summary-value { font-size: 1.8rem; font-weight: 800; }
.summary-label { color: var(--text-soft); }

.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary-1); }

/* 风险评估 */
.risk-box {
  background: rgba(255,193,7,0.08);
  border-left: 4px solid var(--warning);
  padding: 14px;
  margin-bottom: 16px;
  border-radius: 6px;
}
.risk-box h4 { color: #ffe29e; margin: 0 0 8px 0; }

/* AI 评分卡 */
.ai-score-card {
  background: linear-gradient(135deg, rgba(40,167,69,0.08), rgba(99,102,241,0.06));
  padding: 18px; border-radius: 12px; border: 1px solid var(--line-soft);
  margin-bottom: 18px;
}
.ai-score-row { display: flex; align-items: center; gap: 18px; }
.ai-score-text-title { font-size: 1rem; font-weight: 700; margin-bottom: 6px; color: var(--text-strong); }
.ai-score-text-desc { font-size: 0.95rem; color: var(--text-soft); line-height: 1.5; }

/* 导出区域 */
.export-box {
  text-align: center; margin-top: 22px; padding: 16px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--line-soft);
  border-radius: 12px;
}

/* 审核项内容细化 */
.audit-item .item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.audit-item strong { color: var(--text-strong); }
.audit-item p { margin-bottom: 8px; color: var(--text-soft); }
.audit-item .meta { color: var(--muted); font-size: 0.9rem; }

/* 模态内容样式 */
.modal-panel {
  background: var(--bg-card);
  max-width: 90%; max-height: 90%;
  border-radius: 16px; padding: 22px; overflow-y: auto;
  border: 1px solid var(--line-soft);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-title { font-size: 1.2rem; color: var(--text-strong); margin: 0; }
.modal-body { max-height: 60vh; overflow-y: auto; }
.modal-actions { text-align: center; margin-top: 16px; }
.modal-close { background: none; border: none; font-size: 1.25rem; color: var(--text-soft); cursor: pointer; }

/* 通用 */
.muted { color: var(--text-soft); } 