/* ==========================================================================
   QS88 Visual Architecture - Modern Light Theme (With Related Posts)
   ========================================================================== */

/* 1. 全局基础重置 - 消除边距与错位 */
*, *::before, *::after {
  box-sizing: border-box !important;
  margin: 0;
  padding: 0;
}

:root {
  /* 浅色系高级调色板 */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --header-bg: rgba(255, 255, 255, 0.95);

  /* 主色与高光 */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --accent-orange: #f97316;
  --accent-green: #10b981;
  
  /* 文字层级 */
  --text-dark: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  /* 边框与精致阴影 */
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.08);

  /* 圆角与布局 */
  --radius-xl: 16px;
  --radius-lg: 12px;
  --radius-md: 8px;
  --max-width: 1280px;
}

html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  color: var(--text-body);
  background-color: var(--bg-page);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* --------------------------------------------------------------------------
   2. 顶栏页眉 Header (完美垂直居中)
   -------------------------------------------------------------------------- */
.site-header {
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 76px;
  width: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  height: 100%;
}

.brand-logo a {
  font-size:36px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.5px;
  line-height: 1;
  display: inline-block;; text-decoration:none;
}
.main-nav {
  display: flex;
  align-items: center;
  height: 100%;
}

.main-nav ul {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 6px;
  height: 100%;
  margin: 0;
  padding: 0;
}

.main-nav li {
  display: flex;
  align-items: center;
  height: 100%;
}

.main-nav a {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-body);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
  background-color: var(--primary-light);
  text-decoration: none;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none !important;
  line-height: 1;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);color: #ffffff;
}

.btn-success {
  background-color: var(--accent-green);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
  background-color: #059669;
  transform: translateY(-1px);color: #ffffff;
}


.btn-accent {
  background-color: var(--accent-orange);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(249, 115, 22, 0.2);
}

.btn-accent:hover {
  background-color: #ea580c;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  color: var(--text-dark);
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   3. 页面主体 Content Card
   -------------------------------------------------------------------------- */
.page-wrapper {
  flex: 1;
  margin: 36px auto 60px;
  width: 100%;
}

.content-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 48px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  min-width: 0;
}

.breadcrumb {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }

h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--bg-subtle);
  line-height: 1.35;
  letter-spacing: -0.5px;
}

h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 36px 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 20px;
  background-color: var(--primary);
  border-radius: 2px;
}

h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 24px 0 12px;
}

p {
  margin-bottom: 18px;
  color: var(--text-body);
  font-size: 16px;
  overflow-wrap: break-word;
}

ul, ol {
  margin: 0 0 24px 24px;
  color: var(--text-body);
}

li { margin-bottom: 8px; }
strong { color: var(--text-dark); }

/* --------------------------------------------------------------------------
   4. 引导 Banner
   -------------------------------------------------------------------------- */
.action-banner {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  margin: 32px 0;
  box-shadow: var(--shadow-sm);
}

.action-banner h2 {
  margin-top: 0;
  color: var(--text-dark);
  justify-content: center;
}

.action-banner h2::before { display: none; }

.action-banner p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   5. 数据表格
   -------------------------------------------------------------------------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.data-table th, 
.data-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background-color: var(--bg-subtle);
  color: var(--text-dark);
  font-weight: 700;
  font-size: 14px;
}

.data-table td {
  background-color: #ffffff;
  font-size: 15px;
}

.status-active {
  color: var(--accent-green);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   6. 新闻网格系统 & 相关文章模块 (Related Posts Extension)
   -------------------------------------------------------------------------- */
.news-featured-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 36px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-lg);
}

.news-featured-card h2 a,
.news-featured-card p {
  color: #ffffff !important;
}

.news-badge-featured {
  display: inline-block;
  background-color: var(--accent-orange);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 24px 0 36px;
}

.news-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.news-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.news-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.news-category-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background-color: var(--bg-subtle);
  color: var(--text-muted);
}

.news-category-tag.promo { background-color: #fff7ed; color: #c2410c; }
.news-category-tag.guide { background-color: #eff6ff; color: #1d4ed8; }
.news-category-tag.finance { background-color: #ecfdf5; color: #047857; }
.news-category-tag.notice { background-color: #f3e8ff; color: #6b21a8; }

.news-date { font-size: 13px; color: var(--text-light); }
.news-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }

/* 相关文章专属样式 */
.related-posts-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px dashed var(--border-color);
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.related-post-card {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.related-post-card:hover {
  background-color: #ffffff;
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.related-post-card h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}

.related-post-card h4 a {
  color: var(--text-dark);
}

.related-post-card h4 a:hover {
  color: var(--primary);
  text-decoration: none;
}

.related-post-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.5;
}

.quick-categories {
  background-color: var(--bg-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 32px;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.chip-item {
  background-color: #ffffff;
  color: var(--text-body);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.chip-item:hover {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   7. 底栏页脚 Footer (铺满拉伸)
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: #0f172a;
  color: #94a3b8;
  padding: 56px 0 24px;
  margin-top: auto;
  width: 100%;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 40px;
  width: 100%;
}

.footer-column {
  width: 100%;
}

.footer-column h4 {
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 18px;
}

.footer-column p {
  font-size: 14px;
  line-height: 1.6;
  color: #94a3b8;
}

.footer-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-column li { margin-bottom: 10px; }

.footer-column a {
  color: #94a3b8;
  font-size: 14px;
}

.footer-column a:hover {
  color: #ffffff;
  text-decoration: none;
}

.age-restriction {
  display: inline-block;
  background-color: #ef4444;
  color: #ffffff;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 12px;
  margin-right: 4px;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
  color: #64748b;
  width: 100%;
}

/* --------------------------------------------------------------------------
   8. 响应式布局自适应
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .news-grid { grid-template-columns: 1fr; }
  .related-posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .header-inner { height: 68px; }
  .main-nav {
    display: none;
    width: 100%;
    position: absolute;
    top: 68px;
    left: 0;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
    box-shadow: var(--shadow-lg);
  }
  .main-nav.show { display: block; }
  .main-nav ul { 
    flex-direction: column; 
    gap: 8px;
    height: auto;
  }
  .menu-toggle { display: block; }
  .header-cta { display: none; }
  
  .content-card { padding: 24px 16px; }
  .related-posts-grid { grid-template-columns: 1fr; }
  
  .data-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
.pagination-wrapper {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 8px;
      margin-top: 40px;
      margin-bottom: 20px;
      flex-wrap: wrap;
    }

    .page-numbers {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 40px;
      height: 40px;
      padding: 0 14px;
      border-radius: var(--radius-md, 8px);
      background-color: var(--bg-card, #ffffff);
      border: 1px solid var(--border-color, #e2e8f0);
      color: var(--text-body, #334155);
      font-size: 14px;
      font-weight: 600;
      text-decoration: none !important;
      transition: all 0.2s ease;
      box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.05));
    }

    .page-numbers:hover {
      background-color: var(--primary-light, #eff6ff);
      color: var(--primary, #2563eb);
      border-color: var(--primary, #2563eb);
      transform: translateY(-1px);
    }

    .page-numbers.current {
      background-color: var(--primary, #2563eb);
      color: #ffffff;
      border-color: var(--primary, #2563eb);
      box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
      cursor: default;
    }

    .page-numbers.dots {
      background-color: transparent;
      border-color: transparent;
      box-shadow: none;
      color: var(--text-light, #94a3b8);
      cursor: default;
    }

    .page-numbers.prev,
    .page-numbers.next {
      font-weight: 700;
      padding: 0 18px;
    }

    .page-numbers.disabled {
      opacity: 0.5;
      cursor: not-allowed;
      pointer-events: none;
      background-color: var(--bg-subtle, #f1f5f9);
    }

    @media (max-width: 576px) {
      .pagination-wrapper {
        gap: 6px;
      }
      .page-numbers {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
      }
    }