/* ============================================================
   shared.css  — 全站公共样式
   修复：导航汉堡PC端隐藏 / Hero排版 / 深色主题
   ============================================================ */

/* ── CSS 变量 ── */
:root {
  --primary:        #1677ff;
  --primary-light:  #e8f0fe;
  --primary-dark:   #0958d9;
  --hero-bg:        linear-gradient(135deg,#1677ff 0%,#0958d9 100%);
  --bg:             #f5f7fa;
  --card:           #ffffff;
  --text:           #1f2d3d;
  --muted:          #6b7a8e;
  --border:         #e4e9f0;
  --nav-bg:         #ffffff;
  --nav-border:     #e4e9f0;
  --nav-text:       #3a4557;
  --radius:         14px;
  --radius-sm:      10px;
  --font-size-base: 16px;
  --shadow:         0 4px 24px rgba(22,119,255,.08);
}
[data-theme="dark"] {
  --bg:         #0f1623;
  --card:       #162032;
  --text:       #e2e8f0;
  --muted:      #7a8fa6;
  --border:     #243046;
  --nav-bg:     #111c2d;
  --nav-border: #1e2d45;
  --nav-text:   #c8d6e8;
  --primary-light: #1a2d45;
}

/* ── 基础重置 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: var(--font-size-base,16px);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background .3s, color .3s;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

/* ══════════════════════════════════════════════════
   顶部导航
   ══════════════════════════════════════════════════ */
.site-nav {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: background .3s;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  margin-right: 16px;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo-icon {
  width: 32px; height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #fff;
}
/* PC端横排菜单 */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  flex-wrap: nowrap;
}
.nav-link {
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--nav-text);
  white-space: nowrap;
  transition: .18s;
  display: inline-block;
}
.nav-link:hover, .nav-link.active {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-divider {
  width: 1px;
  height: 20px;
  background: var(--nav-border);
  margin: 0 8px;
  flex-shrink: 0;
}

/* 导航栏主题切换按钮 */
.nav-theme-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  margin-left: 12px;
  margin-right: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.nav-theme-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.05);
}

.nav-theme-btn .icon-sun,
.nav-theme-btn .icon-moon {
  position: absolute;
  transition: opacity 0.3s, transform 0.3s;
}

.nav-theme-btn .icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.nav-theme-btn .icon-moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

.nav-theme-btn.is-dark .icon-sun {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

.nav-theme-btn.is-dark .icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* ★ 汉堡按钮：PC端强制隐藏 */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px 4px;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-burger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: .3s;
}

/* ══════════════════════════════════════════════════
   Hero Banner
   ══════════════════════════════════════════════════ */
.hero {
  background: var(--hero-bg);
  color: #fff;
  padding: 52px 24px 90px;
  position: relative;
  z-index: 1;
}
.hero-inner { max-width: 1180px; margin: 0 auto; }
.breadcrumb { font-size: 14px; opacity: .85; margin-bottom: 16px; }
.breadcrumb a { color: rgba(255,255,255,.8); }
.breadcrumb a:hover { color: #fff; }
.hero h1 { font-size: 40px; font-weight: 800; margin-bottom: 14px; line-height: 1.25; letter-spacing: -0.5px; }
.hero p  { font-size: 17px; opacity: .88; max-width: 760px; line-height: 1.8; }

/* ══════════════════════════════════════════════════
   Main Container（上移与 hero 重叠）
   ══════════════════════════════════════════════════ */
.container {
  max-width: 1180px;
  margin: -56px auto 0;
  padding: 0 20px 64px;
  position: relative;
  z-index: 2;
}

/* ══════════════════════════════════════════════════
   Card
   ══════════════════════════════════════════════════ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 22px;
  transition: background .3s, border-color .3s;
}
.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.card-header h2 { font-size: 18px; font-weight: 700; }
.card-header-dot {
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: 99px;
  flex-shrink: 0;
}
.card-header-sub {
  font-size: 13px; color: var(--muted); margin-left: 2px;
}
.card-body { padding: 20px 22px; }
.side-wrap { padding: 16px 18px; }

/* ══════════════════════════════════════════════════
   Pill links / nav-list
   ══════════════════════════════════════════════════ */
.nav-list { display: flex; flex-direction: column; gap: 8px; }
.pill-link {
  display: block;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: .18s;
}
.pill-link:hover {
  border-color: #93c0ff;
  background: var(--primary-light);
}
.pill-link .title { font-size: 15px; font-weight: 600; }
.pill-link .desc  { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ══════════════════════════════════════════════════
   News items (小卡片用)
   ══════════════════════════════════════════════════ */
.news-list  { display: flex; flex-direction: column; gap: 0; }
.news-item  {
  display: block;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  transition: .15s;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover .title { color: var(--primary); }
.news-item .title { font-size: 15px; font-weight: 600; line-height: 1.5; margin-bottom: 6px; }
.news-item .news-meta { display: flex; align-items: center; gap: 8px; }
.news-cat  { background: var(--primary-light); color: var(--primary); font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; }
.news-date { font-size: 13px; color: var(--muted); }

/* ══════════════════════════════════════════════════
   Plain link list
   ══════════════════════════════════════════════════ */
.link-list  { display: flex; flex-direction: column; gap: 0; }
.plain-link { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); transition:.15s; }
.plain-link:last-child { border-bottom: none; }
.plain-link:hover .title { color: var(--primary); }
.plain-link .title { font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.plain-link .desc  { font-size: 13px; color: var(--muted); }

/* ══════════════════════════════════════════════════
   浮动工具栏（右下角 / 移动端底部）
   ══════════════════════════════════════════════════ */
.float-toolbar {
  position: fixed;
  right: 22px; bottom: 15%;
  display: flex; flex-direction: column;
  gap: 10px;
  z-index: 999;
}
.float-btn {
  width: 42px; height: 42px;
  border-radius: 99px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: .18s;
  color: var(--text);
  position: relative;
}
.float-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 浮动工具栏主题按钮图标切换 */
#floatTheme .icon-sun,
#floatTheme .icon-moon {
  position: absolute;
  transition: opacity 0.3s, transform 0.3s;
}

#floatTheme .icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

#floatTheme .icon-moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

#floatTheme.is-dark .icon-sun {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

#floatTheme.is-dark .icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

#floatBackTop { opacity: 0; pointer-events: none; transition: opacity .3s; }
#floatBackTop.show { opacity: 1; pointer-events: auto; }

/* 字体面板 */
.font-size-panel {
  position: absolute;
  right: 52px; bottom: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
  padding: 10px 12px;
  display: none;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.font-size-panel.show { display: flex; }
.font-size-panel button {
  padding: 4px 12px; border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg); color: var(--text);
  font-size: 13px; font-weight: 600;
  transition: .15s;
}
.font-size-panel button:hover,
.font-size-panel button.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* ══════════════════════════════════════════════════
   Footer - 现代深色风格
   ══════════════════════════════════════════════════ */
.site-footer {
  background: linear-gradient(180deg, #0c1222 0%, #0a0f1a 100%);
  color: #94a3b8;
  margin-top: auto;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(22, 119, 255, 0.3) 50%, transparent 100%);
}

.footer-top {
  padding: 60px 20px 40px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative;
}

.footer-top::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(22, 119, 255, 0.4), transparent);
}

.footer-main {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-brand-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(22, 119, 255, 0.35);
  transition: transform 0.3s ease;
}

.footer-brand-header:hover .footer-logo {
  transform: scale(1.05) rotate(-3deg);
}

.footer-brand h4 {
  font-size: 23px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: -0.5px;
}

.footer-brand .tagline {
  font-size: 14px;
  color: #64748b;
  margin: 4px 0 0 0;
}

.footer-brand .desc {
  font-size: 15px;
  color: #8b9cb8;
  line-height: 1.8;
  margin: 0;
}

.footer-stats {
  display: flex;
  gap: 32px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-stat {
  text-align: left;
}

.footer-stat-value {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.footer-stat-label {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
  letter-spacing: 0.5px;
}

.footer-section h5 {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 24px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  padding-bottom: 12px;
}

.footer-section h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

.footer-section h5 svg {
  opacity: 0.7;
  color: var(--primary);
}

.footer-links-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-links-col a {
  font-size: 15px;
  color: #8b9cb8;
  text-decoration: none;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  padding-left: 0;
}

.footer-links-col a:hover {
  color: #fff;
  padding-left: 8px;
}

.footer-links-col a::before {
  content: '';
  width: 0;
  height: 2px;
  background: var(--primary);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: width 0.25s ease;
  border-radius: 1px;
}

.footer-links-col a:hover::before {
  width: 4px;
}

.footer-links-col a svg {
  opacity: 0;
  transition: opacity 0.25s;
  width: 14px;
  height: 14px;
}

.footer-links-col a:hover svg {
  opacity: 1;
}

.footer-hot-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-hot-cities a {
  font-size: 13px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  color: #8b9cb8;
  text-decoration: none;
  transition: all 0.25s ease;
}

.footer-hot-cities a:hover {
  background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.3);
}

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

.footer-contact-item svg {
  width: 18px;
  height: 18px;
  color: #64748b;
  flex-shrink: 0;
  transition: color 0.25s;
}

.footer-contact-item:hover svg {
  color: var(--primary);
}

.footer-contact-item a {
  color: #8b9cb8;
  text-decoration: none;
  transition: color 0.25s;
}

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

.footer-qrcode {
  margin-top: 20px;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  text-align: center;
}

.footer-qrcode img {
  width: 80px;
  height: 80px;
  border-radius: 8px;
}

.footer-qrcode p {
  font-size: 12px;
  color: #64748b;
  margin: 10px 0 0 0;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copyright {
  font-size: 14px;
  color: #64748b;
}

.footer-copyright a {
  color: #8b9cb8;
  text-decoration: none;
  transition: color 0.25s;
}

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

.footer-bottom-links {
  display: flex;
  gap: 24px;
}

.footer-bottom-links a {
  font-size: 14px;
  color: #64748b;
  text-decoration: none;
  transition: color 0.25s;
  position: relative;
}

.footer-bottom-links a:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 3px;
  background: #475569;
  border-radius: 50%;
}

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

.footer-disclaimer {
  width: 100%;
  font-size: 13px;
  color: #475569;
  text-align: center;
  padding: 16px 20px;
  background: rgba(0,0,0,0.25);
  border-top: 1px solid rgba(255,255,255,0.03);
}

/* 移动端footer响应式 */
@media (max-width: 768px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .footer-stats {
    justify-content: flex-start;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  .footer-bottom-links {
    justify-content: center;
  }
  .footer-section h5 {
    margin-bottom: 20px;
  }
}

@media (max-width: 480px) {
  .footer-top {
    padding: 40px 16px 32px;
  }
  .footer-main {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-stats {
    gap: 24px;
  }
  .footer-stat-value {
    font-size: 24px;
  }
  .footer-brand h4 {
    font-size: 20px;
  }
  .footer-hot-cities {
    gap: 8px;
  }
  .footer-hot-cities a {
    padding: 6px 12px;
    font-size: 11px;
  }
}

/* ══════════════════════════════════════════════════
   移动端响应式
   ══════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* 导航：显示汉堡，隐藏横排链接 */
  .nav-burger { display: flex !important; }
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 60px; left: 0; right: 0;
    background: var(--nav-bg);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 10px 20px 16px;
    gap: 2px;
    box-shadow: 0 8px 24px rgba(0,0,0,.10);
    z-index: 199;
    flex: none;
  }
  .nav-links.open { display: flex; }
  .nav-link {
    padding: 12px 14px;
    font-size: 16px;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    display: block;
  }
  .nav-link:last-child { border-bottom: none; }
  .nav-link:hover, .nav-link.active { border-radius: 8px; }
  
  /* 移动端导航栏主题按钮 - 保持圆形按钮样式 */
  .nav-divider { display: none; }
  .nav-theme-btn {
    /* 重置为默认圆形按钮样式 */
    width: 36px;
    height: 36px;
    padding: 0;
    margin-left: 12px;
    margin-right: 8px;
    justify-content: center;
    gap: 0;
  }
  .nav-theme-btn::before {
    content: none;
  }
  .nav-theme-btn .icon-sun,
  .nav-theme-btn .icon-moon {
    position: absolute;
  }

  /* Hero */
  .hero { padding: 32px 16px 80px; }
  .hero h1 { font-size: 27px; }
  .hero p  { font-size: 15px; }

  /* 容器 */
  .container { padding: 0 12px 40px; }

  /* 浮动工具栏移动到底部通栏 */
  .float-toolbar {
    right: auto; bottom: 0; left: 0; width: 100%;
    flex-direction: row;
    justify-content: center;
    padding: 10px 20px;
    background: var(--card);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 16px rgba(0,0,0,.07);
    gap: 20px;
  }
  .font-size-panel {
    right: auto; left: 50%; bottom: 60px;
    transform: translateX(-50%);
  }
  body { padding-bottom: 70px; }
}

/* 字号切换 */
body.font-small  { font-size: 14px; }
body.font-default{ font-size: 16px; }
body.font-large  { font-size: 18px; }

body.font-small  p, body.font-small  li, body.font-small  td, body.font-small  span { font-size: 0.87em; }
body.font-large  p, body.font-large  li, body.font-large  td, body.font-large  span { font-size: 1.13em; }

body.font-small  h1 { font-size: 1.7em; }
body.font-small  h2 { font-size: 1.2em; }
body.font-large  h1 { font-size: 2.3em; }
body.font-large  h2 { font-size: 1.6em; }

/* ── 工具类 ── */
.hidden {
  display: none !important;
}

/* 主题切换/汉堡按钮（统一导航栏通用，配合 assets/js/theme.js） */
.theme-btn, .burger-btn {
  width: 36px; height: 36px; border: 1px solid var(--border); background: var(--card);
  color: var(--text); border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; margin-left: 8px; flex-shrink: 0; transition: .18s;
}
.theme-btn:hover, .burger-btn:hover { border-color: var(--primary); color: var(--primary); }
