/* ===============================
   China-Vietnam Business Info Net
   Global Stylesheet - Responsive All Devices
   =============================== */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-primary: #1565C0;
  --c-primary-dark: #0D47A1;
  --c-primary-light: #1E88E5;
  --c-accent: #D4A017;
  --c-accent-light: #F0C040;
  --c-vietnam: #006837;
  --c-blue: #0D47A1;
  --c-bg: #F5F6FA;
  --c-bg-alt: #EEF0F5;
  --c-white: #FFFFFF;
  --c-text: #1A1A2E;
  --c-text-secondary: #555;
  --c-text-light: #888;
  --c-border: #E0E0E8;
  --c-success: #2E7D32;
  --c-warning: #F57C00;
  --c-danger: #D32F2F;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 28px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 14px;
  --header-h: 64px;
  --max-w: 1280px;
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--c-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--c-primary-dark); }

img { max-width: 100%; display: block; }

ul { list-style: none; }

/* === Layout === */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 20px; }

.section { padding: 48px 0; }
.section-alt { background: var(--c-bg-alt); }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-main-sidebar { grid-template-columns: 2fr 1fr; }
.grid-post-sidebar { grid-template-columns: 1fr 320px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--c-primary); }
.text-secondary { color: var(--c-text-secondary); }
.text-light { color: var(--c-text-light); }
.text-success { color: var(--c-success); }
.text-warning { color: var(--c-warning); }

.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.mt-xl { margin-top: 40px; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.mb-lg { margin-bottom: 24px; }
.mb-xl { margin-bottom: 40px; }

/* === Typography === */
h1, h2, h3, h4, h5 { line-height: 1.3; font-weight: 700; }
h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
p { color: var(--c-text-secondary); }

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  position: relative;
  padding-left: 16px;
}
.section-title::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 4px;
  background: var(--c-primary);
  border-radius: 2px;
}
.section-subtitle { color: var(--c-text-light); font-size: .9rem; margin-bottom: 28px; }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font);
}
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; border: 2px solid var(--c-primary); color: var(--c-primary); }
.btn-outline:hover { background: var(--c-primary); color: #fff; }
.btn-accent { background: var(--c-accent); color: #fff; }
.btn-accent:hover { background: #B8870E; color: #fff; }
.btn-ghost { background: transparent; color: var(--c-text-secondary); }
.btn-ghost:hover { background: var(--c-bg-alt); color: var(--c-text); }
.btn-sm { padding: 6px 14px; font-size: .85rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-block { width: 100%; justify-content: center; }

/* === Top Bar === */
.topbar {
  background: var(--c-primary-dark);
  color: rgba(255,255,255,0.85);
  font-size: .82rem;
  padding: 6px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.topbar a { color: rgba(255,255,255,0.85); }
.topbar a:hover { color: #fff; }
.topbar-links { display: flex; gap: 14px; align-items: center; }
.topbar-sep { width: 1px; height: 12px; background: rgba(255,255,255,.25); margin: 0 2px; flex-shrink: 0; }

/* === 语言切换器（50种语言） === */
.lang-switch { position: relative; }
.lang-btn {
  background: none; border: none; color: rgba(255,255,255,0.85);
  font-size: .82rem; cursor: pointer; padding: 2px 0; font-family: inherit;
  display: inline-flex; align-items: center; gap: 4px;
}
.lang-btn:hover { color: #fff; }
.lang-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 8px);
  width: 260px; max-width: 80vw; background: #fff; border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15,40,80,0.18); z-index: 2000; overflow: hidden;
  text-align: left;
}
.lang-menu.open { display: block; }
.lang-search { padding: 10px 12px 6px; }
.lang-search input {
  width: 100%; box-sizing: border-box; border: 1px solid var(--c-border);
  border-radius: 8px; padding: 6px 10px; font-size: .8rem; outline: none;
  font-family: inherit;
}
.lang-search input:focus { border-color: var(--c-primary); }
.lang-list { max-height: 300px; overflow-y: auto; padding: 4px 6px 6px; }
.lang-option {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 7px 10px; border-radius: 7px; font-size: .82rem; font-family: inherit;
  color: var(--c-text);
}
.lang-option:hover { background: rgba(21,101,192,0.08); }
.lang-native { font-weight: 600; }
.lang-name { color: var(--c-text-light); font-size: .75rem; }
.lang-tip {
  padding: 8px 14px; font-size: .72rem; color: var(--c-text-light);
  background: var(--c-bg-alt); border-top: 1px solid var(--c-border);
}

/* === Header === */
.header {
  background: #fff;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--header-h);
}
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.3rem; font-weight: 700;
}
.logo-text { font-size: 1.15rem; font-weight: 700; color: var(--c-text); white-space: nowrap; }
.logo-text small {
  display: block; font-size: .65rem; color: var(--c-text-light); font-weight: 400;
  max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  letter-spacing: .02em;
}

/* === Navigation === */
.nav { display: flex; align-items: center; gap: 2px; flex: 1; justify-content: center; min-width: 0; }
.nav-item { position: relative; }
.nav-link {
  padding: 8px 10px;
  color: var(--c-text);
  font-size: .92rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all .2s;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active { background: var(--c-primary); color: #fff; }
.nav-dropdown {
  position: absolute;
  top: 100%; left: 0;
  background: #fff;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius);
  min-width: 180px;
  padding: 8px;
  opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: all .2s;
}
.nav-item:hover .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown a { display: block; padding: 8px 12px; border-radius: 6px; font-size: .88rem; color: var(--c-text); }
.nav-dropdown a:hover { background: var(--c-bg-alt); color: var(--c-primary); }

.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.header-search {
  display: flex; align-items: center;
  background: var(--c-bg-alt);
  border-radius: 20px;
  padding: 4px 4px 4px 14px;
  width: 168px;
}
.header-search input {
  border: none; background: transparent; outline: none;
  font-size: .85rem; flex: 1; font-family: var(--font);
}
.header-search button {
  background: var(--c-primary); border: none;
  width: 28px; height: 28px; border-radius: 50%;
  color: #fff; cursor: pointer; font-size: .8rem;
}

/* Mobile menu toggle */
.menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--c-text); }

/* === Hero === */
.hero {
  background: linear-gradient(135deg, #1565C0 0%, #0D47A1 50%, #083778 100%);
  color: #fff;
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(212,160,23,0.15), transparent);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%; left: -5%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(0,104,55,0.12), transparent);
  border-radius: 50%;
}
.hero-inner { position: relative; z-index: 1; }
.hero h1 { font-size: 2.5rem; margin-bottom: 12px; }
.hero p { font-size: 1.15rem; color: rgba(255,255,255,0.85); max-width: 600px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; margin-top: 40px; flex-wrap: wrap; }
.hero-stat-num { font-size: 2rem; font-weight: 700; color: var(--c-accent-light); }
.hero-stat-label { font-size: .85rem; color: rgba(255,255,255,0.7); }

/* === Cards === */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all .25s;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-body { padding: 20px; }
.card-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.card-text { font-size: .88rem; color: var(--c-text-secondary); line-height: 1.5; }
.card-img { width: 100%; height: 180px; object-fit: cover; background: var(--c-bg-alt); display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.card-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: .72rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.tag-red { background: rgba(211,47,47,0.08); color: var(--c-danger); }
.tag-green { background: rgba(0,104,55,0.1); color: var(--c-vietnam); }
.tag-blue { background: rgba(27,94,143,0.1); color: var(--c-blue); }
.tag-gold { background: rgba(212,160,23,0.12); color: #B8870E; }

/* === Quick Links === */
.quick-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.quick-link {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all .2s;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.quick-link:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); background: var(--c-primary); color: #fff; }
.quick-link:hover .ql-icon { background: rgba(255,255,255,0.2); }
.quick-link:hover .ql-text { color: #fff; }
.ql-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(21,101,192,0.12), rgba(212,160,23,0.1));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.ql-text { font-size: .88rem; font-weight: 500; color: var(--c-text); }

/* === News List === */
.news-item { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--c-border); }
.news-item:last-child { border-bottom: none; }
.news-item-img { width: 140px; height: 90px; border-radius: var(--radius); background: var(--c-bg-alt); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.news-item-body { flex: 1; }
.news-item-title { font-size: 1rem; font-weight: 600; margin-bottom: 6px; color: var(--c-text); }
.news-item-title:hover { color: var(--c-primary); }
.news-item-summary { font-size: .85rem; color: var(--c-text-light); margin-bottom: 6px; line-height: 1.5; }
.news-item-meta { font-size: .78rem; color: var(--c-text-light); display: flex; gap: 12px; }

/* === Data Cards === */
.data-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.data-card-icon { font-size: 2rem; margin-bottom: 8px; }
.data-card-value { font-size: 1.8rem; font-weight: 700; color: var(--c-primary); }
.data-card-label { font-size: .82rem; color: var(--c-text-light); margin-top: 4px; }
.data-card-change { font-size: .78rem; margin-top: 6px; }
.change-up { color: var(--c-danger); }
.change-down { color: var(--c-success); }

/* === Table === */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; background: #fff; }
th { background: var(--c-bg-alt); padding: 12px 16px; text-align: left; font-size: .85rem; font-weight: 600; color: var(--c-text); white-space: nowrap; }
td { padding: 12px 16px; border-top: 1px solid var(--c-border); font-size: .88rem; color: var(--c-text-secondary); }
tr:hover td { background: rgba(21,101,192,0.04); }

/* === Badge === */
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px; font-size: .72rem; font-weight: 600; }
.badge-red { background: var(--c-danger); color: #fff; }
.badge-green { background: var(--c-vietnam); color: #fff; }
.badge-gold { background: var(--c-accent); color: #fff; }
.badge-gray { background: var(--c-bg-alt); color: var(--c-text-secondary); }

/* === Tabs === */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--c-border); margin-bottom: 24px; flex-wrap: wrap; }
.tab { padding: 10px 18px; font-size: .9rem; font-weight: 500; color: var(--c-text-secondary); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .2s; border-radius: 4px 4px 0 0; }
.tab:hover { color: var(--c-primary); }
.tab.active { color: var(--c-primary); border-bottom-color: var(--c-primary); font-weight: 600; }

/* === Breadcrumb === */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--c-text-light); padding: 16px 0; }
.breadcrumb a { color: var(--c-text-light); }
.breadcrumb a:hover { color: var(--c-primary); }
.breadcrumb-sep { color: var(--c-border); }

/* === Page Banner === */
.page-banner {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
  color: #fff;
  padding: 40px 0;
  text-align: center;
}
.page-banner h1 { font-size: 2rem; margin-bottom: 8px; }
.page-banner p { color: rgba(255,255,255,0.8); font-size: .95rem; }

/* === Forum === */
.forum-board {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 16px;
}
.forum-board-header { padding: 14px 20px; background: var(--c-bg-alt); font-weight: 600; font-size: .95rem; display: flex; align-items: center; gap: 8px; }
.forum-board-header .badge { margin-left: auto; }
.forum-topic { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--c-border); transition: background .15s; }
.forum-topic:hover { background: var(--c-bg-alt); }
.forum-topic-avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--c-primary), var(--c-accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 600; flex-shrink: 0; }
.forum-topic-body { flex: 1; min-width: 0; }
.forum-topic-title { font-size: .92rem; font-weight: 600; color: var(--c-text); margin-bottom: 2px; }
.forum-topic-title:hover { color: var(--c-primary); }
.forum-topic-meta { font-size: .76rem; color: var(--c-text-light); display: flex; gap: 10px; flex-wrap: wrap; }
.forum-topic-stats { text-align: right; font-size: .76rem; color: var(--c-text-light); flex-shrink: 0; }
.forum-topic-stats span { display: block; }

/* Forum post detail */
.post-detail { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 24px; margin-bottom: 16px; }
.post-detail-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.post-detail-avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--c-primary), var(--c-accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 600; }
.post-detail-author { font-weight: 600; font-size: .92rem; }
.post-detail-time { font-size: .78rem; color: var(--c-text-light); }
.post-detail-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 16px; }
.post-detail-content { font-size: .92rem; line-height: 1.8; color: var(--c-text-secondary); }
.post-detail-content p { margin-bottom: 14px; }
.post-detail-actions { display: flex; gap: 16px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--c-border); }
.post-action { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--c-text-light); cursor: pointer; transition: color .2s; }
.post-action:hover { color: var(--c-primary); }

.reply-item { display: flex; gap: 12px; padding: 16px 0; border-top: 1px solid var(--c-border); }
.reply-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--c-blue), var(--c-vietnam)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .9rem; font-weight: 600; flex-shrink: 0; }
.reply-body { flex: 1; }
.reply-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.reply-author { font-weight: 600; font-size: .88rem; }
.reply-floor { font-size: .76rem; color: var(--c-text-light); }
.reply-content { font-size: .88rem; color: var(--c-text-secondary); line-height: 1.6; }

/* Editor */
.editor { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 20px; margin-bottom: 16px; }
.editor textarea { width: 100%; min-height: 120px; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 12px; font-size: .9rem; resize: vertical; font-family: var(--font); outline: none; transition: border-color .2s; }
.editor textarea:focus { border-color: var(--c-primary); }
.editor-tools { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.editor-tools-left { display: flex; gap: 8px; }
.editor-tool-btn { background: var(--c-bg-alt); border: none; width: 32px; height: 32px; border-radius: 6px; cursor: pointer; font-size: .9rem; transition: background .2s; }
.editor-tool-btn:hover { background: var(--c-border); }

/* === Forms === */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: .88rem; font-weight: 500; margin-bottom: 6px; color: var(--c-text); }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--c-border);
  border-radius: var(--radius); font-size: .9rem; font-family: var(--font);
  outline: none; transition: border-color .2s; background: #fff;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--c-primary); }
.form-textarea { min-height: 100px; resize: vertical; }

/* === Filter Bar === */
.filter-bar {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  padding: 16px 20px; margin-bottom: 24px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.filter-group { display: flex; align-items: center; gap: 8px; }
.filter-label { font-size: .82rem; color: var(--c-text-light); }
.filter-chip { padding: 4px 12px; border-radius: 16px; font-size: .8rem; border: 1px solid var(--c-border); cursor: pointer; transition: all .2s; background: #fff; color: var(--c-text-secondary); }
.filter-chip:hover { border-color: var(--c-primary); color: var(--c-primary); }
.filter-chip.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* === Pagination === */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 32px; }
.page-link { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--c-border); border-radius: 6px; font-size: .85rem; cursor: pointer; transition: all .2s; background: #fff; color: var(--c-text-secondary); }
.page-link:hover { border-color: var(--c-primary); color: var(--c-primary); }
.page-link.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* === Sidebar === */
.sidebar-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 20px; margin-bottom: 20px; }
.sidebar-title { font-size: 1rem; font-weight: 600; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--c-primary); }
.sidebar-list li { padding: 8px 0; border-bottom: 1px dashed var(--c-border); font-size: .85rem; }
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list a { color: var(--c-text-secondary); display: flex; align-items: center; gap: 8px; }
.sidebar-list a:hover { color: var(--c-primary); }
.sidebar-list .rank { width: 20px; height: 20px; border-radius: 4px; background: var(--c-bg-alt); display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; color: var(--c-text-light); flex-shrink: 0; }
.sidebar-list .rank-top { background: var(--c-primary); color: #fff; }

/* === Footer === */
.footer { background: #1a1a2e; color: rgba(255,255,255,0.7); padding: 48px 0 0; margin-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 32px; }
.footer-brand { font-size: 1.2rem; font-weight: 700; color: #fff; margin-bottom: 12px; }
.footer-about { font-size: .85rem; line-height: 1.7; }
.footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,0.6); font-size: .85rem; }
.footer-links a:hover { color: #fff; }
.footer-contact p { color: rgba(255,255,255,0.6); font-size: .85rem; margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0; text-align: center; font-size: .8rem; color: rgba(255,255,255,0.4); }

/* === QR Code Placeholder === */
.qr-placeholder { width: 100px; height: 100px; background: #fff; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: .72rem; color: var(--c-text-light); margin-top: 12px; }
.qr-img { width: 100px; height: 100px; object-fit: contain; border-radius: 8px; background: #fff; margin-top: 12px; display: block; }

/* === Banner Ad === */
.ad-banner { background: linear-gradient(135deg, var(--c-bg-alt), #fff); border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 16px 20px; text-align: center; font-size: .82rem; color: var(--c-text-light); margin-bottom: 24px; }

/* === Alert === */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: .88rem; margin-bottom: 16px; }
.alert-info { background: rgba(27,94,143,0.08); color: var(--c-blue); border: 1px solid rgba(27,94,143,0.2); }
.alert-success { background: rgba(46,125,50,0.08); color: var(--c-success); border: 1px solid rgba(46,125,50,0.2); }
.alert-warning { background: rgba(245,124,0,0.08); color: var(--c-warning); border: 1px solid rgba(245,124,0,0.2); }
.alert-danger { background: rgba(211,47,47,0.08); color: #D32F2F; border: 1px solid rgba(211,47,47,0.25); }

/* === Tag Cloud === */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a { padding: 4px 12px; background: var(--c-bg-alt); border-radius: 14px; font-size: .8rem; color: var(--c-text-secondary); transition: all .2s; }
.tag-cloud a:hover { background: var(--c-primary); color: #fff; }

/* === Avatar List === */
.avatar-list { display: flex; }
.avatar-list .avatar { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; margin-left: -8px; display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 600; color: #fff; }
.avatar-list .avatar:first-child { margin-left: 0; }

/* === Divider === */
.divider { height: 1px; background: var(--c-border); margin: 24px 0; }

/* === Empty State === */
.empty-state { text-align: center; padding: 48px 20px; color: var(--c-text-light); }
.empty-state-icon { font-size: 3rem; margin-bottom: 12px; }

/* === Back to Top === */
.back-to-top { position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px; border-radius: 50%; background: var(--c-primary); color: #fff; border: none; cursor: pointer; box-shadow: var(--shadow-md); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; opacity: 0; visibility: hidden; transition: all .3s; z-index: 999; }
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--c-primary-dark); transform: translateY(-2px); }

/* ===============================
   RESPONSIVE - Small Desktop / Laptop (1025-1200px)
   =============================== */
@media (max-width: 1200px) {
  .logo-text small { display: none; }          /* 隐藏副标题，保导航一行 */
  .header-search { width: 130px; }
  .nav-link { padding: 7px 8px; font-size: .88rem; }
  .header-inner { gap: 8px; }
}

/* ===============================
   RESPONSIVE - Tablet
   =============================== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-post-sidebar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .header-search { width: 140px; }
  .nav-link { padding: 8px 10px; font-size: .85rem; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .hero-stats { gap: 24px; }
}

/* ===============================
   RESPONSIVE - Mobile
   =============================== */
@media (max-width: 768px) {
  :root { --header-h: 56px; }

  /* 移动端：头部与深色 Hero 融为一体，去除白色横条 */
  .header { background: var(--c-primary-dark); box-shadow: none; }
  .logo-text { color: #fff; }
  .logo-text small { color: rgba(255,255,255,0.7); }
  .menu-toggle { color: #fff; }

  .menu-toggle { display: block; }
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    box-shadow: none;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s;
    z-index: 999;
  }
  .nav.open {
    padding: 8px;
    box-shadow: var(--shadow-lg);
    max-height: 75vh;
    overflow-y: auto;
  }
  .nav-link { padding: 12px 16px; border-radius: 6px; font-size: .92rem; }
  .nav-item { border-bottom: 1px solid var(--c-border); }
  .nav-item:last-child { border-bottom: none; }
  .nav-item .nav-link { width: 100%; display: flex; justify-content: space-between; align-items: center; }
  .nav-arrow { transition: transform .25s; font-size: .7rem; }
  .nav-item.open .nav-arrow { transform: rotate(180deg); }
  .nav-dropdown {
    position: static;
    opacity: 0; visibility: hidden;
    max-height: 0;
    overflow: hidden;
    box-shadow: none;
    padding: 0 0 0 12px;
    min-width: auto;
    margin-top: 0;
    transform: none;
    transition: max-height .3s, opacity .3s;
  }
  .nav-dropdown::before { display: none; }
  .nav-item.open .nav-dropdown {
    opacity: 1; visibility: visible;
    max-height: 420px;
    padding: 0 0 10px 12px;
  }
  .nav-dropdown a { padding: 10px 14px; font-size: .88rem; color: var(--c-text-secondary); border-left: 2px solid var(--c-border); }
  .nav-dropdown a:hover { border-left-color: var(--c-primary); }
  .header-search { display: none; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-main-sidebar, .grid-post-sidebar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }

  .hero { padding: 36px 0; }
  .hero h1 { font-size: 1.6rem; }
  .hero p { font-size: .92rem; }
  .hero-stats { gap: 20px; }
  .hero-stat-num { font-size: 1.4rem; }

  .section { padding: 28px 0; }
  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.2rem; }

  .news-item { flex-direction: column; gap: 10px; }
  .news-item-img { width: 100%; height: 160px; }

  .forum-topic { flex-wrap: wrap; }
  .forum-topic-stats { width: 100%; text-align: left; display: flex; gap: 16px; padding-top: 6px; }
  .forum-topic-stats span { display: inline; }

  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-group { flex-wrap: wrap; }

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

  /* 移动端：保留顶栏（语言切换），隐藏次要信息与文字链接 */
  .topbar .topbar-info { display: none; }
  .topbar .container { justify-content: flex-end; }
  .topbar-links { gap: 12px; }
  .topbar-links > a { display: none; }
  .lang-menu { top: calc(100% + 6px); }

  .page-banner { padding: 28px 0; }
  .page-banner h1 { font-size: 1.5rem; }

  .container { padding: 0 14px; }
  .card-body { padding: 16px; }
  .post-detail { padding: 16px; }
  .post-detail-title { font-size: 1.15rem; }

  .sidebar-card { padding: 16px; }
}

/* ===============================
   RESPONSIVE - Small Mobile
   =============================== */
@media (max-width: 480px) {
  .hero h1 { font-size: 1.3rem; }
  .hero p { font-size: .85rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .quick-links { grid-template-columns: 1fr; }
  .hero-stats { gap: 16px; }
  .hero-stat-num { font-size: 1.2rem; }
  .logo-text { font-size: 1rem; }
  .logo-text small { font-size: .58rem; }
}

/* === Nav caret (二级栏目指示) === */
.nav-link.has-sub { display: inline-flex; align-items: center; gap: 4px; }
.nav-arrow {
  font-size: .62rem;
  transition: transform .2s;
  display: inline-block;
}
.nav-item:hover .nav-arrow { transform: rotate(180deg); }
/* Submenu indicator bar */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: 3px; left: 12px; right: 12px;
  height: 3px;
  background: var(--c-primary);
  border-radius: 2px;
}
.nav-dropdown { margin-top: 6px; padding-top: 12px; }

/* ===============================
   AUTH PAGES (登录/注册)
   =============================== */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #1565C0 0%, #0D47A1 55%, #083778 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  position: relative;
  overflow: hidden;
}
.auth-page::before {
  content: '';
  position: absolute;
  top: -20%; right: -8%;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(240,192,64,0.18), transparent);
  border-radius: 50%;
}
.auth-page::after {
  content: '';
  position: absolute;
  bottom: -25%; left: -10%;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(255,255,255,0.10), transparent);
  border-radius: 50%;
}
.auth-card {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
  padding: 36px 32px;
  animation: fadeInUp .5s ease-out;
}
.auth-card.wide { max-width: 560px; }
.auth-head { text-align: center; margin-bottom: 24px; }
.auth-logo { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.auth-logo .logo-icon { width: 44px; height: 44px; font-size: 1.4rem; }
.auth-title { font-size: 1.4rem; font-weight: 700; color: var(--c-text); }
.auth-sub { font-size: .85rem; color: var(--c-text-light); margin-top: 6px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--c-text-light); font-size: .78rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--c-border); }
.auth-foot { text-align: center; font-size: .85rem; color: var(--c-text-light); margin-top: 16px; }
.auth-foot a { color: var(--c-primary); font-weight: 500; }
.auth-aside { font-size: .8rem; color: var(--c-text-light); text-align: center; margin-top: 20px; }
.auth-aside a { color: var(--c-text-light); }
.auth-aside a:hover { color: var(--c-primary); }
.form-check { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--c-text-secondary); }
.form-check input { width: auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.code-input-wrap { display: flex; gap: 10px; }
.code-input-wrap .form-input { flex: 1; }
@media (max-width: 480px) {
  .auth-card { padding: 26px 20px; }
  .form-row { grid-template-columns: 1fr; }
}

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeInUp .5s ease-out; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }
.pulse { animation: pulse 2s infinite; }
