:root {
  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --accent: #3b82f6;
  --accent-light: #dbeafe;
  --text-main: #1e293b;
  --text-sub: #475569;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text",
               system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-alt);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 15px;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 32px;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  color: var(--text-main);
}

h1 { font-size: 26px; letter-spacing: 0.03em; margin-bottom: 4px; }
h2 { font-size: 20px; margin-bottom: 4px; }
h3 { font-size: 16px; margin-bottom: 4px; }
h4 { font-size: 14px; margin-bottom: 4px; }

/* 品牌 Logo */
.brand-logo {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 4px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
}

.brand-accent {
  color: var(--accent);
  font-weight: 900;
}

.brand-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-sub);
  letter-spacing: 0.02em;
}

@media (max-width: 480px) {
  .brand-logo {
    font-size: 36px;
  }
  .brand-title {
    font-size: 16px;
  }
}

p { margin: 4px 0 8px; color: var(--text-sub); }

.subtitle {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 12px;
}

.tagline {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--accent-light);
  border: 1px solid rgba(37, 99, 235, 0.35);
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 12px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  padding: 16px 18px 16px;
  margin-top: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

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

.pill {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(37, 99, 235, 0.3);
  white-space: nowrap;
}

.pill-red {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fecaca;
}

.pill-green {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}

ul, ol {
  margin: 4px 0 4px 18px;
  padding: 0;
  font-size: 14px;
}

li { margin-bottom: 4px; }

.note {
  font-size: 12px;
  color: var(--text-sub);
  border-left: 3px solid var(--accent);
  padding-left: 10px;
  margin-top: 6px;
}

.hint {
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: var(--radius-md);
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  font-size: 12px;
  color: #166534;
}

.warn {
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: var(--radius-md);
  background: #fef2f2;
  border: 1px solid #fecaca;
  font-size: 12px;
  color: #b91c1c;
}

.divider {
  margin: 18px 0 8px;
  border-bottom: 1px dashed #d1d5db;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 6px;
}

.checklist {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}

.checklist li::before {
  content: "✔";
  color: var(--success);
  font-size: 11px;
  margin-right: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0 8px;
  font-size: 13px;
}

th, td {
  border: 1px solid #e5e7eb;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #eff6ff;
  font-weight: 600;
  color: var(--text-main);
}

.small {
  font-size: 12px;
  color: var(--text-sub);
}

.page-break {
  page-break-before: always;
  margin-top: 20px;
}

/* ====== 图示区域（BOS + OB 简化结构图） ====== */
.chart-box {
  border-radius: var(--radius-md);
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  padding: 10px 10px 12px;
  margin-top: 6px;
  font-size: 12px;
}

.chart-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}

.chart-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 120px;
  margin-bottom: 4px;
}

.kbar {
  position: relative;
  width: 18px;
  border-radius: 4px;
  background: #e5e7eb;
  display: flex;
  justify-content: center;
  align-items: center;
}

.kbar.bull {
  background: #bfdbfe;
  border: 1px solid #60a5fa;
}

.kbar.bear {
  background: #fecaca;
  border: 1px solid #f87171;
}

.kbar span {
  position: absolute;
  top: -14px;
  font-size: 10px;
  color: #4b5563;
  white-space: nowrap;
}

.label-bos {
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 10px;
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
  white-space: nowrap;
}

.ob-zone {
  margin-top: 6px;
  padding: 5px 6px;
  border-radius: var(--radius-sm);
  background: #eef2ff;
  border: 1px dashed #6366f1;
  font-size: 11px;
}

.ob-zone span {
  font-weight: 600;
}

.arrow {
  font-size: 18px;
  margin: 0 4px;
}

/* ====== 交互式组件样式 ====== */
.nav-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  overflow-x: auto;
}

.nav-tab {
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-sub);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.nav-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--accent-light);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* 评分表样式 */
.scoring-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.score-item {
  background: #f8fafc;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.score-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.score-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.score-controls {
  display: flex;
  gap: 6px;
}

.score-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.score-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

.score-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.score-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s;
}

.total-score-box {
  text-align: center;
  padding: 16px;
  margin: 20px 0;
  border-radius: var(--radius-lg);
  font-size: 18px;
  font-weight: 600;
  border: 2px solid;
}

.score-a { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.score-b { background: #fef9c3; color: #854d0e; border-color: #fef08a; }
.score-c { background: #fee2e2; color: #991b1b; border-color: #fecaca; }

/* 导航网格 */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.nav-card {
  display: block;
  padding: 20px;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  text-align: center;
}

.nav-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.nav-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.nav-card h3 {
  margin: 0 0 8px 0;
  color: var(--text-main);
}

.nav-card p {
  margin: 0;
  font-size: 13px;
  color: var(--text-sub);
}

/* 章节网格 */
.chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.chapter-card {
  display: block;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.chapter-card:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.chapter-number {
  display: inline-block;
  font-size: 11px;
  padding: 2px 6px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
}

.chapter-card h4 {
  margin: 0 0 4px 0;
  color: var(--text-main);
}

.chapter-card p {
  margin: 0;
  font-size: 12px;
  color: var(--text-sub);
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 8px 16px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
  text-align: center;
}

.btn:hover {
  background: #2563eb;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent-light);
}

/* 表单样式 */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-main);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-family: inherit;
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

/* 折叠章节 */
.collapsible {
  margin-top: 14px;
}

.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

.collapsible-header:hover {
  background: var(--accent-light);
}

.collapsible-header h3 {
  margin: 0;
}

.collapsible-icon {
  transition: transform 0.3s;
}

.collapsible-content {
  padding: 16px;
  background: var(--card-bg);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  border: 1px solid var(--border);
  border-top: none;
  display: none;
}

.collapsible.active .collapsible-icon {
  transform: rotate(180deg);
}

.collapsible.active .collapsible-content {
  display: block;
}

/* 工具网格 */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.tool-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 16px;
}

.tool-card h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  color: var(--text-main);
}

.result-box {
  background: #f8fafc;
  padding: 12px;
  border-radius: var(--radius-md);
  margin-top: 12px;
  font-size: 14px;
}

/* 打印样式 */
.print-btn {
  display: inline-block;
  padding: 8px 16px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  margin: 10px 0;
}

@media print {
  .print-btn, .btn, .score-controls, .collapsible-icon {
    display: none;
  }
  
  body {
    background: white;
    font-size: 13px;
  }
  
  .page {
    padding: 12px 14px;
  }
  
  .card {
    box-shadow: none;
    border-radius: 10px;
  }
  
  .collapsible-header {
    cursor: default;
  }
  
  .collapsible-content {
    display: block;
    border-top: 1px solid var(--border);
    border-radius: var(--radius-md);
  }
}

/* ====== 响应式调整 - 移动端优化 ====== */

/* 平板设备 */
@media (max-width: 768px) {
  .two-col, .scoring-grid, .nav-grid, .chapters-grid, .tools-grid {
    grid-template-columns: 1fr;
  }

  .page {
    padding: 16px 12px;
  }

  .nav-tabs {
    flex-wrap: wrap;
  }
}

/* 手机设备 - 全面优化 */
@media (max-width: 480px) {
  /* 基础布局 */
  body {
    font-size: 14px;
    line-height: 1.65;
  }

  .page {
    padding: 12px 10px 20px;
  }

  /* 标题尺寸调整 */
  h1 { font-size: 20px; }
  h2 { font-size: 17px; }
  h3 { font-size: 15px; }
  h4 { font-size: 14px; }

  /* 卡片优化 */
  .card {
    padding: 12px 14px;
    margin-top: 10px;
    border-radius: 12px;
  }

  .card:hover {
    transform: none; /* 移动端禁用hover抬起效果 */
  }

  .card-header {
    flex-wrap: wrap;
    gap: 6px;
  }

  .card-header h1,
  .card-header h2,
  .card-header h3,
  .card-header h4 {
    flex: 1 1 100%;
    margin-bottom: 4px;
  }

  /* Pill标签 */
  .pill {
    font-size: 10px;
    padding: 2px 6px;
  }

  /* 列表优化 */
  ul, ol {
    margin-left: 14px;
    font-size: 13px;
  }

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

  /* 折叠面板 - 增大触摸区域 */
  .collapsible {
    margin-top: 10px;
  }

  .collapsible-header {
    padding: 14px 12px;
    min-height: 48px; /* 触摸友好 */
  }

  .collapsible-header h3 {
    font-size: 14px;
    line-height: 1.4;
    padding-right: 20px;
  }

  .collapsible-content {
    padding: 12px;
  }

  /* 表格响应式 - 水平滚动 */
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 8px 0;
    font-size: 12px;
  }

  table thead,
  table tbody,
  table tr {
    display: table;
    width: 100%;
    table-layout: fixed;
  }

  th, td {
    padding: 8px 6px;
    min-width: 80px;
    word-break: break-word;
  }

  /* 提示框优化 */
  .hint, .warn, .note {
    font-size: 13px;
    padding: 10px;
    line-height: 1.6;
  }

  /* 章节导航网格 - 单列紧凑布局 */
  .chapters-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .chapter-card {
    padding: 10px 12px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .chapter-card .chapter-number {
    font-size: 10px;
    padding: 2px 6px;
    flex-shrink: 0;
  }

  .chapter-card h4 {
    font-size: 14px;
    margin: 0;
    flex-shrink: 0;
  }

  .chapter-card p {
    font-size: 12px;
    color: var(--text-sub);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* 按钮优化 - 触摸友好 */
  .btn {
    padding: 12px 20px;
    font-size: 14px;
    min-height: 44px;
    width: 100%;
    display: block;
  }

  .btn-outline {
    margin-top: 8px;
  }

  /* 评分网格 */
  .scoring-grid {
    gap: 8px;
  }

  .score-item {
    padding: 10px;
  }

  .score-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  /* 导航卡片 - 紧凑横向布局 */
  .nav-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .nav-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 12px 14px;
    text-align: left;
    gap: 12px;
  }

  .nav-icon {
    font-size: 24px;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .nav-card h3 {
    font-size: 14px;
    margin-bottom: 2px;
  }

  .nav-card p {
    font-size: 12px;
    margin: 0;
    color: var(--text-sub);
  }

  /* 工具网格 */
  .tools-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tool-card {
    padding: 12px;
  }

  /* 表单优化 */
  .form-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .form-input, .form-select, .form-textarea {
    padding: 12px;
    font-size: 16px; /* 防止iOS缩放 */
  }

  .checkbox-group {
    flex-direction: column;
    gap: 10px;
  }

  .checkbox-item {
    font-size: 14px;
    padding: 8px 0;
  }

  /* 图示区域 */
  .chart-box {
    padding: 8px;
    overflow-x: auto;
  }

  .chart-row {
    min-width: 300px;
  }

  /* Tab导航 */
  .nav-tabs {
    gap: 4px;
  }

  .nav-tab {
    padding: 10px 12px;
    font-size: 13px;
    flex: 1;
    text-align: center;
  }

  /* 双栏布局强制单栏 */
  .two-col {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }
}

/* ====== 内联样式覆盖（移动端） ====== */
@media (max-width: 480px) {
  /* 覆盖内联的grid双栏布局 */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* 覆盖内联的flex row布局 */
  [style*="display: flex"][style*="gap"] {
    flex-direction: column !important;
  }

  /* 修复内联样式的字体大小 */
  [style*="font-size: 13px"],
  [style*="font-size:13px"] {
    font-size: 14px !important;
  }

  [style*="font-size: 12px"],
  [style*="font-size:12px"] {
    font-size: 13px !important;
  }

  /* 内联padding优化 */
  [style*="padding: 14px"],
  [style*="padding:14px"],
  [style*="padding: 16px"],
  [style*="padding:16px"] {
    padding: 12px !important;
  }

  /* 内联表格优化 */
  [style*="width: 100%"] table,
  table[style] {
    font-size: 12px !important;
  }

  /* 覆盖内联的固定flex布局 */
  [style*="display: flex; gap: 12px"],
  [style*="display:flex;gap:12px"],
  [style*="display: flex; gap: 16px"],
  [style*="display:flex;gap:16px"] {
    flex-direction: column !important;
    gap: 10px !important;
  }

  /* flex子元素宽度 */
  [style*="flex: 1"],
  [style*="flex:1"] {
    flex: none !important;
    width: 100% !important;
  }
}

/* ====== 小屏幕表格卡片化布局（可选） ====== */
@media (max-width: 400px) {
  /* 超小屏幕进一步优化 */
  .page {
    padding: 10px 8px 16px;
  }

  .collapsible-content {
    padding: 10px;
  }

  h1 { font-size: 18px; }
  h2 { font-size: 16px; }
  h3 { font-size: 14px; }

  /* 表格进一步压缩 */
  th, td {
    padding: 6px 4px;
    font-size: 11px;
  }
}

/* ====== 横屏模式优化 ====== */
@media (max-width: 768px) and (orientation: landscape) {
  .page {
    padding: 12px 16px;
  }

  .two-col {
    grid-template-columns: 1fr 1fr;
  }

  .chapters-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ====== 安全区域适配（刘海屏/底部横条） ====== */
@supports (padding: max(0px)) {
  .page {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
}

/* ====== 触摸反馈优化 ====== */
@media (hover: none) and (pointer: coarse) {
  /* 纯触摸设备 */
  .card:hover,
  .chapter-card:hover,
  .nav-card:hover,
  .collapsible-header:hover {
    transform: none;
    box-shadow: var(--shadow-soft);
  }

  .collapsible-header:active,
  .chapter-card:active,
  .nav-card:active,
  .btn:active {
    opacity: 0.85;
    transform: scale(0.98);
  }

  /* 增大所有可点击元素的触摸区域 */
  .btn,
  .nav-tab,
  .chapter-card,
  .nav-card {
    min-height: 44px;
  }
}

/* ====== 统一 Modal 弹窗组件 ====== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  max-width: 320px;
  width: 100%;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.modal-overlay.active .modal-box {
  transform: scale(1) translateY(0);
}

.modal-content {
  padding: 24px 20px 20px;
  text-align: center;
}

.modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 28px;
}

.modal-icon.success {
  background: #dcfce7;
  color: #16a34a;
}

.modal-icon.warning {
  background: #fef3c7;
  color: #d97706;
}

.modal-icon.danger {
  background: #fee2e2;
  color: #dc2626;
}

.modal-icon.info {
  background: #dbeafe;
  color: #2563eb;
}

.modal-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 8px;
}

.modal-message {
  font-size: 14px;
  color: var(--text-sub);
  margin: 0;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  border-top: 1px solid var(--border);
}

.modal-btn {
  flex: 1;
  padding: 14px 16px;
  border: none;
  background: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.modal-btn:active {
  background: #f1f5f9;
}

.modal-btn.cancel {
  color: var(--text-sub);
  border-right: 1px solid var(--border);
}

.modal-btn.confirm {
  color: var(--accent);
}

.modal-btn.confirm.danger {
  color: #dc2626;
}

.modal-btn.confirm.success {
  color: #16a34a;
}

/* 单按钮模式（alert） */
.modal-actions.single .modal-btn {
  border-right: none;
}

/* Modal 响应式 */
@media (max-width: 480px) {
  .modal-box {
    max-width: calc(100vw - 40px);
  }

  .modal-content {
    padding: 20px 16px 16px;
  }

  .modal-icon {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }

  .modal-title {
    font-size: 16px;
  }

  .modal-message {
    font-size: 13px;
  }

  .modal-btn {
    padding: 12px 14px;
    font-size: 14px;
  }
}

/* ====== Footer 页脚 ====== */
.site-footer {
  background: var(--text-main);
  color: #94a3b8;
  padding: 32px 20px 24px;
  margin-top: 40px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-brand {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.footer-brand span {
  color: var(--accent);
}

.footer-tagline {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.footer-section h4 {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 14px;
}

.footer-contact-item .icon {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.footer-contact-item a {
  color: #94a3b8;
  text-decoration: none;
  word-break: break-all;
}

.footer-contact-item a:hover {
  color: #fff;
}

.footer-contact-item .label {
  font-size: 11px;
  color: #64748b;
  display: block;
}

.footer-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 24px 0;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #64748b;
}

.footer-copyright {
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-meta a {
  color: #64748b;
  text-decoration: none;
  margin-left: 16px;
}

.footer-meta a:hover {
  color: #94a3b8;
}

/* Footer 响应式 */
@media (max-width: 480px) {
  .site-footer {
    padding: 24px 16px 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-meta {
    margin-top: 8px;
  }

  .footer-meta a {
    margin: 0 8px;
  }
}