/* ===== CSS Variables ===== */
:root {
  --bg-deep: #05080f;
  --bg-primary: #0a111c;
  --bg-secondary: #0f1927;
  --bg-card: #111d30;
  --bg-card-hover: #162538;
  --border: #1c2d45;
  --border-light: #243652;
  --text-primary: #e8eef6;
  --text-secondary: #889cb4;
  --text-muted: #5c6f85;
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.3);
  --accent-dim: rgba(59, 130, 246, 0.08);
  --success: #22c55e;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --font-mono: "SF Mono", "Fira Code", "JetBrains Mono", monospace;
  --max-width: 1140px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px var(--accent-dim), 0 0 60px rgba(59, 130, 246, 0.04);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.75;
  min-height: 100vh;
}
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--accent-light); }
img {
  max-width: 100%;
  display: block;
  border-radius: var(--radius-sm);
}

/* ===== Particles Canvas ===== */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.page-wrapper main {
  flex: 1;
}

/* ===== Container ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

/* ===== Header / Navigation ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(5, 8, 15, 0.82);
  border-bottom: 1px solid rgba(28, 45, 69, 0.6);
}
.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 76px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}
.nav-logo {
  display: flex;
  align-items: center;
  transition: opacity 0.2s;
}
.nav-logo img {
  display: block;
  height: 64px;
  width: auto;
}
.nav-logo:hover { opacity: 0.85; }
.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  position: relative;
}
.nav-links a:hover {
  color: var(--text-primary);
  background: var(--accent-dim);
}
.nav-links a.active {
  color: var(--accent-light);
  background: var(--accent-dim);
}
.nav-lang {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  letter-spacing: 0.5px;
}
.nav-lang:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  background: var(--accent-dim);
}
.nav-ext {
  border-color: rgba(34, 197, 94, 0.4);
  color: var(--success);
}
.nav-ext:hover {
  border-color: var(--success);
  color: var(--success);
  background: rgba(34, 197, 94, 0.08);
}

/* Hamburger toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 8px;
  gap: 5px;
  transition: border-color 0.2s;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.25s ease;
}
.nav-toggle:hover { border-color: var(--accent); }
.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Hero Section ===== */
.hero {
  padding: 120px 0 100px;
  text-align: center;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 20px;
  background: linear-gradient(
    135deg,
    #e8eef6 0%,
    #93bbf3 35%,
    #3b82f6 65%,
    #60a5fa 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.3;
}
.hero .subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.9;
}
.badge-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.badge {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
  border: 1px solid var(--border-light);
  border-radius: 9999px;
  padding: 10px 24px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.25s;
}
.badge:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  box-shadow: var(--shadow-glow);
}

/* ===== Section Title ===== */
.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 40px;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 2px;
}

/* ===== News Grid & Cards ===== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.news-card {
  background: linear-gradient(145deg, var(--bg-card), var(--bg-secondary));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.news-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.news-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}
.news-card:hover::before {
  opacity: 1;
}
.news-card time {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-light);
  font-family: var(--font-mono);
  background: var(--accent-dim);
  padding: 4px 12px;
  border-radius: 9999px;
  margin-top: auto;
  align-self: flex-start;
}
.news-card h3 {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-primary);
  transition: color 0.2s;
}
.news-card:hover h3 {
  color: var(--accent-light);
}
.news-card .card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.news-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
}
.more-link {
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--accent-light);
  transition: all 0.25s;
}
.more-link:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--text-primary);
}

/* ===== Page Content ===== */
.page-content {
  padding: 60px 0 100px;
}
.page-content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 48px 0 18px;
  color: var(--text-primary);
  position: relative;
  padding-left: 16px;
}
.page-content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.page-content h2:first-child {
  margin-top: 0;
}
.page-content h2:first-child::before {
  display: none;
}
.page-content p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.9;
  font-size: 1.01rem;
}
.page-content ul,
.page-content ol {
  color: var(--text-secondary);
  padding-left: 24px;
  margin-bottom: 24px;
  line-height: 2;
}
.page-content li { margin-bottom: 4px; }
.page-content strong {
  color: var(--text-primary);
  font-weight: 700;
}
.page-content table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  margin: 28px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.page-content thead {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
}
.page-content th {
  padding: 12px 20px;
  text-align: left;
  color: var(--accent-light);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 2px solid var(--border);
}
.page-content td {
  padding: 12px 20px;
  color: var(--text-secondary);
  font-size: 0.93rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}
.page-content tbody tr:last-child td {
  border-bottom: none;
}
.page-content tbody tr:hover td {
  background: var(--bg-card);
}
.page-content img {
  max-width: 100%;
  height: auto;
  margin: 24px 0;
  border-radius: var(--radius);
}
.page-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}

/* ===== Member Search ===== */
.member-search {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
#member-search-input {
  width: 260px;
  max-width: 100%;
  padding: 10px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.93rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#member-search-input::placeholder {
  color: var(--text-muted);
}
#member-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
#member-search-btn {
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.93rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
#member-search-btn:hover {
  background: #2563eb;
  box-shadow: 0 0 12px var(--accent-glow);
}
#member-search-btn:active {
  background: #1d4ed8;
}
.member-search-msg {
  font-size: 0.88rem;
  font-weight: 500;
}
.member-search-msg-success { color: var(--success); }
.member-search-msg-error { color: #f87171; }

/* ===== Social Links ===== */
.social-links {
  display: flex;
  gap: 20px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.social-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s ease;
  text-decoration: none;
}
.social-link:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}
.social-link img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.social-link span {
  color: var(--accent-light);
  font-size: 0.95rem;
  font-weight: 500;
}


/* ===== Back Link ===== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 32px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.back-link:hover {
  color: var(--accent-light);
  background: var(--accent-dim);
}



/* ===== Timeline ===== */
.timeline {
  position: relative;
  padding-left: 44px;
  margin-top: 32px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(
    180deg,
    var(--accent),
    var(--border-light) 30%,
    var(--border) 100%
  );
  border-radius: 1px;
}
.timeline-item {
  position: relative;
  margin-bottom: 36px;
  padding: 24px 28px;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s;
}
.timeline-item:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-glow);
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -37px;
  top: 32px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 2.5px solid var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  transition: box-shadow 0.3s;
}
.timeline-item:hover::before {
  box-shadow: 0 0 20px var(--accent-glow), 0 0 40px var(--accent-dim);
}
.timeline-item .year {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-light);
  background: var(--accent-dim);
  display: inline-block;
  padding: 4px 14px;
  border-radius: 9999px;
  margin-bottom: 12px;
}
.timeline-item h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-primary);
}
.timeline-item p {
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.75;
}



/* ===== Article ===== */
.article-header {
  padding: 20px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.article-header time {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-light);
  background: var(--accent-dim);
  padding: 4px 14px;
  border-radius: 9999px;
  display: inline-block;
  margin-bottom: 16px;
}
.article-header h1 {
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: 0.5px;
}
.article-body {
}
.article-body h2, .article-body h3 {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 800;
  padding-left: 16px;
  position: relative;
}
/* 确保 article-body 第一个 h2 不会因为 :first-child 规则而丢失蓝色竖线 */
.page-content .article-body h2:first-child::before,
.page-content .article-body h3:first-child::before {
  display: block;
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 36px;
  color: var(--text-muted);
  font-size: 0.84rem;
  background: var(--bg-primary);
}
.footer-row {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.footer-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}
.site-footer p {
  margin: 4px 0;
  line-height: 1.7;
}
.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.site-footer a:hover {
  color: var(--accent);
}



/* ===== Responsive ===== */
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .nav-inner { height: 64px; padding: 0 20px; }
  .nav-logo img { height: 48px; }
  .hero {
    padding: 80px 0 60px;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero .subtitle {
    font-size: 1rem;
  }
  .nav-links {
    gap: 0;
  }
  .nav-links a {
    font-size: 0.8rem;
    padding: 6px 10px;
  }
  .article-header h1 {
    font-size: 1.5rem;
  }
  .news-grid {
    grid-template-columns: 1fr;
  }
  .page-content {
    padding: 40px 0 60px;
  }
  .page-content {
    overflow-x: auto;
  }
  .page-content table {
    display: table;
    width: 100%;
    table-layout: fixed;
  }
  .section-title { font-size: 1.35rem; }
  .footer-row {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}
@media (max-width: 640px) {
  .nav-inner { height: 56px; padding: 0 16px; }
  .nav-logo img { height: 40px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 12px;
    left: auto;
    min-width: 140px;
    background: rgba(5, 8, 15, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px;
    gap: 2px;
    z-index: 99;
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  }
  .nav-links.open a {
    padding: 10px 16px;
    font-size: 0.9rem;
    border-radius: 6px;
    white-space: nowrap;
  }
  .timeline {
    padding-left: 32px;
  }
  .timeline-item::before {
    left: -25px;
  }
  .badge-row {
    gap: 8px;
  }
  .badge {
    padding: 8px 16px;
    font-size: 0.8rem;
  }
  .footer-row {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    text-align: center;
  }
  .footer-row > :first-child {
    grid-column: 1 / -1;
  }
  .hero h1 { font-size: 1.75rem; }
  .article-header h1 { font-size: 1.3rem; }
  .page-content h2 { font-size: 1.2rem; }
  .timeline-item { padding: 18px 20px; }
  .timeline-item h3 { font-size: 1rem; }
}
@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .nav-inner { height: 52px; padding: 0 12px; }
  .nav-logo img { height: 36px; }
  .nav-links.open { top: 52px; }
  .hero { padding: 60px 0 40px; }
  .hero h1 { font-size: 1.4rem; letter-spacing: 1px; }
  .hero .subtitle { font-size: 0.9rem; }
  .section-title { font-size: 1.15rem; margin-bottom: 28px; }
  .news-card { padding: 20px; }
  .news-card h3 { font-size: 1rem; }
  .news-card p { font-size: 0.85rem; }
  .page-content { padding: 28px 0 48px; }
  .page-content h2 { font-size: 1.1rem; }
  .page-content p { font-size: 0.92rem; }
  .page-content table { font-size: 0.82rem; }
  .page-content th,
  .page-content td { padding: 10px 12px; }
  .article-header h1 { font-size: 1.15rem; }
  .article-header { padding: 12px 0 24px; margin-bottom: 28px; }
  .timeline { padding-left: 24px; }
  .timeline-item { padding: 14px 16px; margin-bottom: 24px; }
  .timeline-item::before { left: -20px; width: 10px; height: 10px; top: 24px; }
  .timeline-item h3 { font-size: 0.95rem; }
  .timeline-item .year { font-size: 0.75rem; padding: 3px 10px; }
  .badge { padding: 6px 12px; font-size: 0.75rem; }
  .badge-row { gap: 6px; }
  .more-link { font-size: 0.85rem; padding: 8px 18px; }
  .back-link { font-size: 0.82rem; margin-bottom: 20px; }
  .social-link { padding: 8px 10px; gap: 6px; flex: 1; min-width: 0; }
  .social-link img { width: 24px; height: 24px; }
  .social-link span { font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .social-links { gap: 10px; }
  .site-footer { padding: 32px 0 28px; font-size: 0.78rem; }
  .footer-row { padding: 0 16px; gap: 22px; }
  #back-to-top { bottom: 20px; right: 20px; width: 38px; height: 38px; font-size: 1.1rem; }
}



/* ===== Back to Top ===== */
#back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 200;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: rgba(15, 25, 39, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s, color 0.2s, border-color 0.2s;
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#back-to-top:hover {
  background: var(--bg-card);
  color: var(--accent-light);
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}
