/* ===== 全局重置与变量 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1a5fb4;
  --primary-dark: #1348a0;
  --primary-light: #e8f0fe;
  --secondary: #0d9488;
  --accent: #f59e0b;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --bg: #f8fafc;
  --white: #ffffff;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
  --radius: 10px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }
body { font-family: "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }
ul { list-style: none; }

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

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 24px; border-radius: var(--radius); font-size: 14px;
  font-weight: 600; cursor: pointer; border: 2px solid transparent;
  transition: all var(--transition); white-space: nowrap; text-decoration: none;
}
.btn-primary { background: var(--primary); color: var(--white); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--white); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); color: var(--primary); }
.btn-lg { padding: 14px 36px; font-size: 16px; border-radius: 12px; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-block { display: flex; width: 100%; }
.btn-danger { background: #ef4444; color: var(--white); border-color: #ef4444; }
.btn-danger:hover { background: #dc2626; border-color: #dc2626; color: var(--white); }
.btn-success { background: #10b981; color: var(--white); border-color: #10b981; }

/* ===== 顶部导航 ===== */
.header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--white); border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
.header-inner {
  display: flex; align-items: center; gap: 24px;
  height: 68px;
}
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-icon { font-size: 28px; }
.logo-text { font-size: 17px; font-weight: 700; color: var(--primary); white-space: nowrap; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav-link { padding: 6px 12px; border-radius: 8px; font-size: 14px; color: var(--text-muted); transition: all var(--transition); }
.nav-link:hover, .nav-link.active { background: var(--primary-light); color: var(--primary); }
.header-actions { display: flex; gap: 10px; flex-shrink: 0; }
.nav-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; padding: 4px 8px; }

/* ===== Section 通用 ===== */
.section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-title { font-size: 32px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.section-desc { font-size: 16px; color: var(--text-muted); }

/* ===== 页脚 ===== */
.footer { background: #0f172a; color: #94a3b8; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; padding: 60px 0 40px; }
.footer-logo { font-size: 18px; font-weight: 700; color: var(--white); margin-bottom: 12px; }
.footer-desc { font-size: 13px; margin-bottom: 8px; line-height: 1.7; }
.footer-addr { font-size: 13px; }
.footer-col h4 { color: var(--white); font-size: 15px; margin-bottom: 16px; }
.footer-col p { font-size: 13px; margin-bottom: 8px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #94a3b8; font-size: 13px; }
.footer-links a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid #1e293b; padding: 20px 0; }
.footer-bottom-inner { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; text-align: center; }
.copyright, .icp-info { font-size: 12px; color: #64748b; }
.icp-info a { color: #64748b; }
.icp-info a:hover { color: #94a3b8; }

/* ===== 表单公共样式 ===== */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-label .required { color: #ef4444; margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: 14px; color: var(--text);
  background: var(--white); transition: border-color var(--transition);
  font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,95,180,0.1);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: #ef4444; margin-top: 4px; display: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ===== 卡片 ===== */
.card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 32px; border: 1px solid var(--border);
}

/* ===== Alert ===== */
.alert { padding: 12px 18px; border-radius: var(--radius); font-size: 14px; margin-bottom: 16px; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }

/* ===== 页面标题横幅 ===== */
.page-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #1348a0 100%);
  color: var(--white); padding: 60px 0;
}
.page-banner h1 { font-size: 36px; font-weight: 700; margin-bottom: 12px; }
.page-banner p { font-size: 16px; opacity: 0.85; }

/* ===== 分割线 ===== */
.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* ===== 标签 ===== */
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.tag-blue { background: var(--primary-light); color: var(--primary); }
.tag-green { background: #d1fae5; color: #065f46; }
.tag-orange { background: #fef3c7; color: #92400e; }

/* ===== Modal ===== */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 9999; align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--white); border-radius: var(--radius-lg); padding: 40px;
  max-width: 480px; width: 100%; margin: 16px; box-shadow: var(--shadow-md);
  animation: modalIn 0.2s ease;
}
@keyframes modalIn { from { opacity:0; transform:scale(0.95); } to { opacity:1; transform:scale(1); } }
.modal-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.modal-desc { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-muted); }

/* ===== Toast ===== */
#toast-container { position: fixed; bottom: 32px; right: 32px; z-index: 99999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: #1e293b; color: var(--white); padding: 14px 20px;
  border-radius: var(--radius); font-size: 14px; box-shadow: var(--shadow-md);
  animation: toastIn 0.3s ease; min-width: 240px; max-width: 360px;
}
.toast.success { background: #10b981; }
.toast.error { background: #ef4444; }
@keyframes toastIn { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .nav { display: none; }
  .header-actions { display: none; }
  .nav-toggle { display: block; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .section { padding: 56px 0; }
  .section-title { font-size: 26px; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .footer-inner { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
}

/* ===== 移动导航抽屉 ===== */
.mobile-nav {
  display: none; flex-direction: column; position: fixed; inset: 0;
  background: var(--white); z-index: 9999; padding: 80px 24px 24px;
  gap: 8px;
}
.mobile-nav.active { display: flex; }
.mobile-nav-close { position: fixed; top: 18px; right: 24px; font-size: 26px; cursor: pointer; background: none; border: none; }
.mobile-nav .nav-link { font-size: 18px; padding: 14px; }
