:root {
  --primary: #3164f5;
  --primary-dark: #2548c4;
  --secondary: #6c5ce7;
  --bg: #f5f7fa;
  --card-bg: #ffffff;
  --text: #1a1a2e;
  --text-muted: #5a5a6e;
  --border: #e1e4ea;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.1);
  --radius: 10px;
  --notice-bg: #fff7ed;
  --notice-text: #9a3412;
  --main-route: #3164f5;
  --backup-route: #00a870;
  --website: #2d8cf0;
  --bank: #d4a03c;
  --shopping: #ff6a00;
  --news: #5b6c8a;
  --tool: #00b4b6;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 安全加载层 ===== */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-core {
  text-align: center;
}

.loader-spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 18px;
  border: 4px solid #e8eaf0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loader-text {
  font-size: 16px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.app-wrap {
  transition: opacity 0.5s ease;
}

/* ===== 顶部公告 ===== */
.notice-bar {
  background: var(--notice-bg);
  color: var(--notice-text);
  padding: 10px 0;
  text-align: center;
  font-size: 13px;
  border-bottom: 1px solid #fed7aa;
}

.notice-bar p {
  margin: 0;
}

/* ===== 头部 ===== */
.header {
  background: var(--card-bg);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.main-nav {
  display: flex;
  gap: 6px;
}

.main-nav a {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s;
}

.main-nav a:hover {
  color: var(--primary);
  background: #f0f4ff;
}

.mobile-menu-btn {
  display: none;
  background: #f5f7fa;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

/* ===== 搜索区 ===== */
.hero {
  background: linear-gradient(180deg, #eef3ff 0%, var(--bg) 100%);
  padding: 60px 0 50px;
  text-align: center;
}

.hero-title {
  font-size: 40px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.baidu-search {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  background: #fff;
  border: 2px solid var(--primary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(49, 100, 245, 0.12);
}

.baidu-search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 16px 22px;
  font-size: 16px;
  color: var(--text);
  background: transparent;
}

.baidu-search-input::placeholder {
  color: #b0b4c0;
}

.baidu-search-btn {
  border: none;
  background: var(--primary);
  color: #fff;
  padding: 0 32px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.baidu-search-btn:hover {
  background: var(--primary-dark);
}

.search-tips {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.search-tips a {
  color: var(--primary);
}

.search-tips a:hover {
  text-decoration: underline;
}

/* ===== 内容主体 ===== */
.content-body {
  padding: 40px 0 60px;
}

.section {
  margin-top: 50px;
}

.section:first-child {
  margin-top: 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 26px;
}

.section-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  max-width: 200px;
}

/* ===== 卡片网格 ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 14px;
  text-align: center;
  transition: all 0.25s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: #c8d0e0;
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.card-icon .icon {
  width: 1em;
  height: 1em;
}

/* ===== iconfont Symbol 通用样式 ===== */
.icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.card-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  background: #f0f4ff;
  color: var(--primary);
  font-weight: 500;
}

/* 不同分类图标色：仅主/备用线路保留彩色背景，其余分类使用透明背景展示 SVG 品牌图标 */
.route-main .card-icon { background: var(--main-route); color: #fff; }
.route-backup .card-icon { background: var(--backup-route); color: #fff; }
.route-website .card-icon,
.route-bank .card-icon,
.route-shopping .card-icon,
.route-news .card-icon,
.route-tool .card-icon {
  background: transparent;
  color: var(--text);
}

/* ===== 底部 ===== */
.footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 36px 0;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 14px;
  font-size: 14px;
}

.footer-links a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-links .divider {
  color: #d0d4dc;
}

.footer-record,
.footer-copyright {
  font-size: 13px;
  color: #8a8a9a;
  margin-top: 6px;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--card-bg);
    flex-direction: column;
    padding: 12px 20px;
    box-shadow: var(--shadow);
    gap: 4px;
    border-top: 1px solid var(--border);
  }

  .main-nav.open {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero {
    padding: 44px 0 38px;
  }

  .hero-title {
    font-size: 30px;
  }

  .baidu-search {
    border-radius: 10px;
  }

  .baidu-search-input {
    padding: 14px 16px;
    font-size: 15px;
  }

  .baidu-search-btn {
    padding: 0 20px;
    font-size: 15px;
  }

  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
  }

  .card {
    padding: 16px 10px;
  }

  .card-icon {
    width: 44px;
    height: 44px;
    font-size: 35px;
  }
}

@media (max-width: 480px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .baidu-search {
    flex-direction: column;
    border-radius: 10px;
  }

  .baidu-search-btn {
    padding: 12px;
  }
}
