/* ========== 配色系统 ========== */
:root {
  /* 主色：深邃蓝灰 */
  --primary: #1e3a5f;
  --primary-light: #2d5a87;
  /* 强调色：暗金 */
  --gold: #b8860b;
  --gold-hover: #9a6d0a;
  /* 中性色 */
  --text-dark: #1a1a2e;
  --text-body: #4a4a5a;
  --text-muted: #8e8e9a;
  --bg-page: #f7f7f9;
  --bg-white: #ffffff;
  --border: #e8e8ec;
  /* 阴影 */
  --shadow-card: 0 1px 4px rgba(0,0,0,0.04);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.08);
  /* 圆角 */
  --radius: 10px;
  --radius-lg: 14px;
  /* 字体 */
  --font: -apple-system, 'Microsoft YaHei', 'PingFang SC', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg-page);
  color: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ========== 导航栏 ========== */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0.7rem 0;
}
.navbar-brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary) !important;
  letter-spacing: -0.2px;
}
.nav-link {
  font-size: 0.9rem;
  color: var(--text-body) !important;
  padding: 0.5rem 0.9rem !important;
  border-radius: 6px;
  transition: all 0.15s;
}
.nav-link:hover,
.nav-link.active {
  color: var(--primary) !important;
  background: rgba(30, 58, 95, 0.05);
  font-weight: 600;
}

/* ========== 容器 ========== */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== Banner ========== */
.hero-banner {
  background: var(--primary);
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  text-align: center;
  color: #fff;
  margin: 24px 0 32px;
}
.hero-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}
.hero-subtitle {
  font-size: 0.95rem;
  opacity: 0.85;
  margin-bottom: 28px;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 28px;
}
.hero-stat-num {
  font-size: 1.4rem;
  font-weight: 600;
  opacity: 0.9;
}
.hero-stat-label {
  font-size: 0.8rem;
  opacity: 0.7;
}
.hero-banner .btn-accent {
  background: var(--gold);
  border: none;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 6px;
  transition: all 0.2s;
}
.hero-banner .btn-accent:hover {
  background: var(--gold-hover);
}
.hero-banner .btn-outline-accent {
  border: 1.5px solid rgba(255,255,255,0.6);
  color: #fff;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 6px;
  transition: all 0.2s;
}
.hero-banner .btn-outline-accent:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
}

/* ========== 板块标题 ========== */
.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
}

/* ========== 筛选栏 ========== */
.filter-bar {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.filter-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.btn-group {
  display: flex;
  gap: 2px;
  background: #f3f3f6;
  border-radius: 6px;
  padding: 3px;
}
.btn-filter {
  background: transparent;
  border: none;
  color: var(--text-body);
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 5px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-filter:hover { background: #e8e8ec; }
.btn-filter.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.filter-bar .form-select {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 30px 6px 10px;
  font-size: 0.85rem;
  color: var(--text-body);
  background: #f9f9fb;
  cursor: pointer;
}

/* ========== 卡片 ========== */
.topic-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: all 0.2s;
  overflow: hidden;
}
.topic-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.card-top {
  background: #fafafc;
  padding: 10px 14px;
  font-size: 0.78rem;
}
.card-middle { padding: 14px; }
.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.4;
  margin-bottom: 6px;
}
.card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.card-bottom { padding: 14px; }
.price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
}
.download-count { font-size: 0.78rem; }
hr { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ========== 按钮 ========== */
.btn-buy {
  background: var(--gold);
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 20px;
  border-radius: 6px;
  transition: all 0.2s;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}
.btn-buy:hover {
  background: var(--gold-hover);
  color: #fff;
}
.btn-accent {
  background: var(--gold);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 6px;
  transition: all 0.2s;
}
.btn-accent:hover { background: var(--gold-hover); color: #fff; }
.btn-outline-accent {
  border: 1.5px solid var(--gold);
  color: var(--gold);
  background: transparent;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 6px;
  transition: all 0.2s;
}
.btn-outline-accent:hover { background: var(--gold); color: #fff; }

/* ========== 标签 ========== */
.badge {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 12px;
  display: inline-block;
}
.badge-grade-junior { background: #eef4ff; color: #3b6cb4; }
.badge-grade-senior { background: #fef9f0; color: #b0782c; }
.badge-difficulty-medium { background: #f2f2f5; color: #5a5a6e; }
.badge-difficulty-hard { background: #fef0f0; color: #a84040; }

/* ========== 详情页 ========== */
.info-card {
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 90px;
  z-index: 1;
}

.preview-card {
  position: relative;
  z-index: 2;
}
.info-card { position: sticky; top: 1rem; }
.doc-title { font-size: 1.4rem; font-weight: 700; color: var(--text-dark); }
.doc-price { font-size: 1.6rem; font-weight: 800; color: var(--gold); }

/* ========== 试卷区 ========== */
.alert-info {
  background: #f4f7fb;
  border: 1px solid #d6e0ee;
  border-radius: var(--radius);
  color: var(--primary);
}
.alert-success {
  background: #f4faf6;
  border: 1px solid #c8e6d0;
  border-radius: var(--radius);
  color: #2d6a3f;
}

/* ========== 个人中心 ========== */
.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: all 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-hover); }
.stat-value { font-size: 2.2rem; font-weight: 800; color: var(--text-dark); }
.stat-label { font-size: 0.85rem; color: var(--text-muted); }
.stat-card-points .stat-value { color: var(--gold); }
.stat-card-quota .stat-value { color: var(--primary); }

/* ========== 登录弹窗 ========== */
.nav-pills .nav-link {
  color: var(--text-muted);
  font-weight: 600;
  border-radius: 6px;
}
.nav-pills .nav-link.active {
  background: #fff;
  color: var(--text-dark);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* ========== 页脚 ========== */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 28px 0;
  margin-top: 40px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--primary); }

/* ========== 空状态 ========== */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.empty-icon { font-size: 2.5rem; opacity: 0.3; margin-bottom: 1rem; }
.empty-title { font-size: 1rem; font-weight: 600; color: var(--text-muted); }
.empty-desc { font-size: 0.85rem; color: #b0b0ba; }

/* ========== 加载动画 ========== */
.spinner-border { width: 2.2rem; height: 2.2rem; }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .hero-banner { padding: 32px 16px; }
  .hero-title { font-size: 1.4rem; }
  .hero-stats { gap: 20px; }
  .hero-stat-num { font-size: 1.2rem; }
}
/* ========== 品牌数字强化 ========== */
.navbar-brand {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.navbar-brand strong {
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--gold);
  margin-right: 2px;
}
/* ========== Logo 样式 ========== */
.logo-brand {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 1rem;
  color: var(--text-dark) !important;
}

/* # 符号 */
.logo-mark {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--gold);
  margin-right: 4px;
  font-family: 'Georgia', 'Times New Roman', serif;
}

/* 12345 数字 */
.logo-num {
  font-size: 1.5rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 1.5px;
  color: var(--primary);
  font-family: 'Georgia', 'Times New Roman', serif;
}

/* 分隔线 */
.logo-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 8px;
}

/* 数学资料站 */
.logo-text {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-dark);
}
/* ========== 品牌折线图 ========== */
.brand-graph {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
}

.brand-graph-svg {
    width: 180px;
    height: auto;
    opacity: 0.9;
}

.brand-graph-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 4px;
}
/* ========== 详情页导航按钮 ========== */
.detail-nav .btn-outline-accent {
  border-color: var(--border);
  color: var(--text-body);
}
.detail-nav .btn-outline-accent:hover {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}
/* ========== 面包屑按钮式 ========== */
.detail-breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
}

.detail-breadcrumb a {
  color: var(--text-body);
  text-decoration: none;
  padding: 4px 12px;
  border-radius: 4px;
  background: #f3f3f6;
  transition: all 0.15s;
}

.detail-breadcrumb a:hover {
  background: var(--primary);
  color: #fff;
}

.detail-breadcrumb .separator {
  color: var(--text-muted);
  font-weight: 300;
}

.detail-breadcrumb .current {
  color: var(--text-muted);
  padding: 4px 0;
}
/* ========== 试卷区额度条 ========== */
.quota-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f4f7fb;
  border: 1px solid #d6e0ee;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: var(--text-body);
}

.quota-bar-member {
  background: #f4faf6;
  border-color: #c8e6d0;
  color: #2d6a3f;
}
/* ========== 额度提示小字 ========== */
.quota-tip {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 12px;
}
/* ========== 开通会员链接 ========== */
.quota-link {
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
  margin-left: 12px;
  cursor: pointer;
}
.quota-link:hover {
  color: var(--gold-hover);
  text-decoration: underline;
}
/* ========== 金色链接 ========== */
.text-gold {
  color: var(--gold);
  text-decoration: none;
}
.text-gold:hover {
  color: var(--gold-hover);
  text-decoration: underline;
}
/* ========== 上传页面 ========== */
.upload-page .card {
  max-width: 800px;
  margin: 0 auto;
}
/* ========== 预览占位 ========== */
.preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.preview-placeholder-icon {
  font-size: 3rem;
  opacity: 0.3;
  margin-bottom: 12px;
}
.preview-placeholder-text {
  font-size: 0.9rem;
  margin-bottom: 16px;
}
/* ========== 资料信息行 ========== */
.info-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.85rem;
  color: var(--text-body);
}
.info-row span:first-child {
  color: var(--text-muted);
}
/* ========== 移动端全局适配 ========== */
@media (max-width: 768px) {
  .container {
      padding: 0 12px;
  }
  
  /* 导航栏 */
  .navbar-brand {
      font-size: 1rem;
  }
  .logo-num {
      font-size: 1.2rem;
  }
  .logo-text {
      font-size: 0.75rem;
  }
  .logo-divider {
      margin: 0 4px;
  }
  
  /* 按钮缩小 */
  .btn-accent,
  .btn-outline-accent {
      padding: 6px 14px;
      font-size: 0.85rem;
  }
}
@media (max-width: 768px) {
  .hero-banner {
      padding: 28px 16px;
      border-radius: var(--radius);
  }
  .hero-title {
      font-size: 1.3rem;
  }
  .hero-subtitle {
      font-size: 0.85rem;
      margin-bottom: 20px;
  }
  .hero-stats {
      gap: 16px;
      margin-bottom: 20px;
  }
  .hero-stat-num {
      font-size: 1.1rem;
  }
  .hero-stat-label {
      font-size: 0.7rem;
  }
  .hero-banner .btn-accent,
  .hero-banner .btn-outline-accent {
      padding: 8px 16px;
      font-size: 0.85rem;
      display: block;
      width: 80%;
      margin: 0 auto 8px;
  }
}
@media (max-width: 768px) {
  /* 筛选栏堆叠 */
  .filter-bar {
      flex-direction: column;
      align-items: flex-start;
      gap: 10px;
      padding: 12px;
  }
  .filter-group {
      width: 100%;
  }
  .filter-bar .form-select {
      width: 100% !important;
  }
  .btn-group {
      flex-wrap: wrap;
  }
  
  /* 卡片两列 */
  .row.g-3 {
      margin-left: -6px;
      margin-right: -6px;
  }
  .col-lg-3, .col-md-4, .col-sm-6 {
      padding-left: 6px;
      padding-right: 6px;
  }
  
  /* 卡片内部 */
  .card-title {
      font-size: 0.95rem;
  }
  .card-desc {
      font-size: 0.78rem;
  }
  .price {
      font-size: 1rem;
  }
  .btn-buy {
      padding: 6px 14px;
      font-size: 0.85rem;
  }
}
@media (max-width: 768px) {
  .topic-detail-page .row {
      flex-direction: column;
  }
  .preview-card {
      margin-bottom: 16px;
  }
  .info-card {
      position: static;
      margin-bottom: 16px;
  }
  .doc-title {
      font-size: 1.2rem;
  }
  .doc-price {
      font-size: 1.4rem;
  }
  .detail-breadcrumb {
      font-size: 0.75rem;
      flex-wrap: wrap;
  }
  .detail-breadcrumb a {
      padding: 3px 8px;
  }
}
@media (max-width: 768px) {
  .stat-card {
      padding: 16px !important;
  }
  .stat-value {
      font-size: 1.8rem;
  }
  .stat-label {
      font-size: 0.8rem;
  }
  .user-center .card-header {
      font-size: 0.9rem;
  }
  .list-group-item {
      flex-direction: column;
      align-items: flex-start !important;
      gap: 8px;
  }
  .list-group-item .btn {
      align-self: flex-end;
  }
}
@media (max-width: 768px) {
  .upload-page .card {
      padding: 16px !important;
  }
  .upload-page .form-label {
      font-size: 0.85rem;
  }
  .upload-page .form-control,
  .upload-page .form-select {
      font-size: 0.9rem;
  }
}
@media (max-width: 576px) {
  #loginModal .modal-dialog {
      margin: 12px;
  }
  #loginModal .modal-body {
      padding: 16px;
  }
}
/* ========== 移动端导航栏修复 ========== */
@media (max-width: 991px) {
  .navbar {
      padding: 0.5rem 0;
  }
  
  .navbar-toggler {
      border: 1px solid var(--border);
      padding: 6px 10px;
      border-radius: 6px;
  }
  
  .navbar-toggler-icon {
      width: 1.2em;
      height: 1.2em;
  }
  
  /* 展开后的菜单项 */
  .navbar-collapse {
      background: #fff;
      padding: 12px;
      border-radius: var(--radius);
      box-shadow: var(--shadow-md);
      margin-top: 8px;
  }
  
  .navbar-nav .nav-link {
      padding: 10px 12px !important;
      font-size: 0.95rem;
  }
  
  /* 登录/注册按钮 */
  #nav > div {
      padding: 10px 12px;
  }
}
/* ========== 汉堡菜单按钮加深 ========== */
.navbar-toggler {
  border-color: var(--border);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='%231e3a5f' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}
/* ========== 移动端 Banner 按钮修复 ========== */
@media (max-width: 768px) {
  .hero-banner .btn-accent,
  .hero-banner .btn-outline-accent {
      display: inline-block;
      width: auto;
      margin: 4px 6px;
      padding: 10px 20px;
      font-size: 0.9rem;
  }
}
/* ========== 移动端导航栏完整适配 ========== */
@media (max-width: 991px) {
  .navbar {
      padding: 0.5rem 0;
      position: relative;
  }

  .navbar-toggler {
      border: 1px solid var(--border);
      padding: 6px 10px;
      border-radius: 6px;
      display: block;
  }

  .navbar-toggler-icon {
      width: 1.2em;
      height: 1.2em;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='%231e3a5f' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
  }

  .navbar-collapse {
      background: #fff;
      padding: 12px;
      border-radius: var(--radius);
      box-shadow: var(--shadow-md);
      margin-top: 8px;
  }

  .navbar-collapse.collapse:not(.show) {
      display: none;
  }

  .navbar-collapse.show {
      display: block;
  }

  .navbar-nav .nav-link {
      padding: 10px 12px !important;
      font-size: 0.95rem;
      display: block;
  }

  #nav > div {
      padding: 10px 12px;
  }
}
/* ========== 移动端个人中心精简 ========== */
@media (max-width: 768px) {
  .user-center .row.g-4 {
      --bs-gutter-y: 0.75rem;
      --bs-gutter-x: 0.75rem;
  }

  .stat-card {
      padding: 14px !important;
  }

  .stat-icon {
      font-size: 1.4rem;
      margin-bottom: 6px !important;
  }

  .stat-value {
      font-size: 1.5rem;
  }

  .stat-label {
      font-size: 0.75rem;
  }

  .stat-card h5 {
      font-size: 0.9rem;
      margin-bottom: 8px !important;
  }

  .stat-card .input-group {
      max-width: 100%;
  }

  .stat-card .btn {
      padding: 5px 12px;
      font-size: 0.8rem;
  }

  .stat-card small {
      font-size: 0.7rem;
  }
}
/* ========== 移动端个人中心紧凑 ========== */
@media (max-width: 768px) {
    .user-center .row.g-4 {
        --bs-gutter-y: 0.5rem;
        --bs-gutter-x: 0.5rem;
    }

    /* 积分和额度各占一半 */
    .user-center .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* 会员状态独占全部宽度 */
    .user-center .col-md-4:last-child {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .stat-card {
        padding: 12px !important;
        height: auto !important;
    }

    .stat-icon {
        font-size: 1.2rem;
        margin-bottom: 4px !important;
    }

    .stat-value {
        font-size: 1.3rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .stat-card h5 {
        font-size: 0.85rem;
        margin-bottom: 6px !important;
    }

    .stat-card .btn {
        margin-top: 8px !important;
        font-size: 0.75rem;
        padding: 4px 10px;
    }

    .stat-card .input-group {
        flex-wrap: nowrap;
    }

    .stat-card .form-control {
        font-size: 0.8rem;
    }

    .stat-card small {
        font-size: 0.7rem;
    }
}
/* ========== 移动端个人中心紧凑 ========== */
@media (max-width: 768px) {
  .user-center .row.g-4 {
      --bs-gutter-y: 6px;
      --bs-gutter-x: 6px;
  }

  .user-center .col-md-4 {
      flex: 0 0 50%;
      max-width: 50%;
  }

  .user-center .col-md-4:last-child {
      flex: 0 0 100%;
      max-width: 100%;
  }

  .stat-card {
      padding: 10px !important;
  }

  .stat-icon {
      font-size: 1rem;
      margin-bottom: 2px !important;
  }

  .stat-value {
      font-size: 1.1rem;
  }

  .stat-label {
      font-size: 0.65rem;
  }

  .stat-card h5 {
      font-size: 0.8rem;
      margin-bottom: 4px !important;
  }

  .stat-card .btn {
      margin-top: 6px !important;
      font-size: 0.7rem;
      padding: 3px 8px;
  }

  .stat-card .form-control {
      font-size: 0.75rem;
      height: 30px;
  }

  .stat-card .btn-accent {
      font-size: 0.7rem;
      padding: 3px 8px;
  }

  .stat-card small {
      font-size: 0.65rem;
  }
}
/* ========== 移动端个人中心按钮控制 ========== */
@media (max-width: 768px) {
  .stat-card-points .btn {
      display: none;
  }
  .stat-card-points {
      cursor: pointer;
  }
}
/* ========== 移动端积分卡片可点击 ========== */
@media (max-width: 768px) {
  .stat-card-points {
      cursor: pointer;
  }
}
/* ========== 移动端积分卡片隐藏按钮 ========== */
@media (max-width: 768px) {
  .stat-card-points .btn {
      display: none;
  }
}
/* ========== 移动端积分卡片文案替换 ========== */
@media (max-width: 768px) {
  .stat-card-points .stat-label {
      font-size: 0;
  }
  .stat-card-points .stat-label::after {
      content: "申请提现";
      font-size: 0.65rem;
  }
}
/* ========== 移动端隐藏页脚（首页除外） ========== */
@media (max-width: 768px) {
  .site-footer {
      display: none;
  }
  .home-page ~ .site-footer,
  .home-page + .site-footer,
  body:has(.home-page) .site-footer {
      display: block;
  }
}
/* ========== Toast 提示 ========== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
}
.toast-msg {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding: 14px 20px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  animation: slideIn 0.3s ease;
  max-width: 320px;
}
.toast-msg.success { border-left: 4px solid #10b981; }
.toast-msg.error { border-left: 4px solid #ef4444; }
.toast-msg.info { border-left: 4px solid #3b82f6; }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}
/* ========== Toast 从顶部弹出 ========== */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.toast-msg {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  padding: 12px 24px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  animation: slideDown 0.3s ease;
  white-space: nowrap;
}

.toast-msg.success { border-left: 4px solid #10b981; }
.toast-msg.error { border-left: 4px solid #ef4444; }
.toast-msg.info { border-left: 4px solid #3b82f6; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
/* ========== 页脚固定在底部 ========== */
html, body {
    height: 100%;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main {
    flex: 1;
}
.site-footer {
    margin-top: auto;
}
/* ========== 页脚固定在底部 ========== */
html {
  height: 100%;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

.site-footer {
  flex-shrink: 0;
  margin-top: auto;
}

/* ========== 页脚 Sticky Footer ========== */
html {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body > main,
#main-content,
main.container {
  flex: 1 0 auto;
}

.site-footer {
  flex-shrink: 0;
}
/* ========== 卡片文字溢出处理 ========== */
.card-title {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}
/* ========== 首次加载骨架屏 ========== */
#app > .d-flex {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skeleton-loader {
  width: 200px;
  height: 16px;
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
/* ========== 密钥输入框响应式 ========== */
.global-key-input {
  width: 160px;
}

@media (max-width: 768px) {
  .global-key-input {
      width: 100%;
      max-width: 120px;
  }
}
/* ========== 购买指引弹窗移动端适配 ========== */
@media (max-width: 576px) {
  #purchaseGuideModal .modal-dialog {
      margin: 0.5rem;
      max-width: 100%;
  }
  #purchaseGuideModal .modal-body {
      padding: 1rem;
  }
  #purchaseGuideModal code {
      font-size: 0.9rem;
  }
}
/* ========== 所有弹窗移动端适配 ========== */
@media (max-width: 576px) {
  .modal-dialog {
      margin: 0.5rem;
      max-width: 100%;
  }
  .modal-body {
      padding: 1rem;
  }
  .modal-body img {
      width: 140px !important;
      height: 140px !important;
  }
  .modal-body code {
      font-size: 0.85rem !important;
  }
}
/* ========== 页面切换过渡 ========== */
.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.15s ease;
}
.fade-enter-from,
.fade-leave-to {
    opacity: 0;
}
/* ========== 移动端隐藏页脚 ========== */
@media (max-width: 768px) {
  .site-footer {
      display: none;
  }
}
/* ========== 页脚固定底部（桌面端） ========== */
#app > div {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main.container {
  flex: 1 0 auto;
}

.site-footer {
  flex-shrink: 0;
}

/* ========== 移动端隐藏页脚 ========== */
@media (max-width: 768px) {
  .site-footer {
      display: none;
  }
  main.container {
      padding-bottom: 0;
  }
}
@media (max-width: 768px) {
  .site-footer {
      display: none !important;
  }
}
@media (max-width: 768px) {
  .navbar {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 1030;
  }
  main.container {
      padding-top: 70px; /* 根据导航栏实际高度调整 */
  }
}