/**
 * components.css - 组件样式系统
 * 包含：Header、Footer、Gallery Card、Pagination、Filter、Stats、Announcement、Advertisement、FAB 等
 * 作者: ike
 * 日期: 2025-12-02
 */

/* ========================================
   1. Header 组件
   ======================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--hb-z-header);
  background: linear-gradient(120deg, rgba(19, 23, 32, 0.94), rgba(13, 19, 33, 0.9));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hb-border-default);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.35);
  transition: background var(--hb-transition-slow), box-shadow var(--hb-transition-slow);
}

.header--scrolled {
  background: linear-gradient(120deg, rgba(14, 17, 27, 0.96), rgba(10, 17, 30, 0.94));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
  border-color: rgba(255, 255, 255, 0.08);
}

.header--menu {
  top: 0;
}

.header__content {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: var(--hb-header-height);
  padding: var(--hb-space-3) 0;
  gap: var(--hb-space-5);
}

.header--scrolled .header__content {
  height: var(--hb-header-height-scrolled);
  padding: var(--hb-space-2) 0;
}

/* Logo 区域 */
.header__brand-nav {
  display: flex;
  align-items: center;
  gap: var(--hb-space-3);
  flex-shrink: 0;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--hb-space-3);
  padding: var(--hb-space-3) var(--hb-space-4);
  border-radius: var(--hb-radius-md);
  background: linear-gradient(135deg, rgba(47, 128, 237, 0.18), rgba(59, 130, 246, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--hb-shadow-md);
  color: var(--hb-text-primary);
  text-decoration: none;
  font-size: var(--hb-font-size-xl);
  font-weight: var(--hb-font-extrabold);
  letter-spacing: 0.4px;
}

.header__logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--hb-radius-md);
  background: var(--hb-primary-gradient);
  color: var(--hb-text-primary);
  font-size: 15px;
  font-weight: var(--hb-font-extrabold);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 8px 20px rgba(47, 128, 237, 0.35);
}

.header__logo-text {
  color: var(--hb-text-primary);
  font-weight: var(--hb-font-extrabold);
  letter-spacing: 0.6px;
}

/* 汉堡菜单按钮 */
.header__menu {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--hb-space-2);
  border-radius: var(--hb-radius-sm);
  transition: background var(--hb-transition-normal);
}

.header__menu:hover {
  background: rgba(255, 255, 255, 0.06);
}

.header__menu span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--hb-text-secondary);
  border-radius: 1px;
  transition: transform var(--hb-transition-normal), opacity var(--hb-transition-normal);
}

.header__menu--active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header__menu--active span:nth-child(2) {
  opacity: 0;
}

.header__menu--active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 1024px) {
  .header__menu {
    display: none;
  }
}

/* 桌面端导航 */
.header__nav-desktop {
  display: none;
  align-items: center;
  gap: var(--hb-space-3);
  margin-left: var(--hb-space-2);
}

.header__nav-desktop ul {
  display: flex;
  align-items: center;
  gap: var(--hb-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 1024px) {
  .header__nav-desktop {
    display: flex;
  }
}

.header__nav-item {
  position: relative;
}

.header__nav-link {
  display: inline-flex;
  align-items: center;
  padding: var(--hb-space-3) var(--hb-space-4);
  border-radius: var(--hb-radius-md);
  color: var(--hb-text-secondary);
  font-size: var(--hb-font-size-base);
  font-weight: var(--hb-font-bold);
  letter-spacing: 0.1px;
  transition: all var(--hb-transition-normal);
}

.header__nav-link:hover {
  color: var(--hb-text-primary);
  background: rgba(47, 128, 237, 0.08);
  box-shadow: var(--hb-shadow-md);
}

.header__nav-link--active {
  background: linear-gradient(135deg, rgba(47, 128, 237, 0.28), rgba(37, 99, 235, 0.32));
  color: var(--hb-text-primary);
  box-shadow: 0 10px 28px rgba(47, 128, 237, 0.35);
  border: 1px solid rgba(47, 128, 237, 0.45);
}

/* 移动端导航面板 */
.header__nav-mobile {
  display: none;
  position: fixed;
  top: var(--hb-header-height);
  left: 0;
  right: 0;
  bottom: 0;
  flex-direction: column;
  gap: var(--hb-space-4);
  padding: var(--hb-space-4);
  background: rgba(11, 15, 23, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--hb-border-default);
  overflow-y: auto;
  /* 使用高于所有页面元素的 z-index 确保菜单不被遮挡 */
  z-index: 9999;
}

.header__nav-mobile--active {
  display: flex;
  z-index: 9999 !important;
  /* 修复嵌套在 fixed 父元素中时 bottom: 0 不生效的问题 */
  height: calc(100dvh - var(--hb-header-height, 64px));
}

.header__nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--hb-space-1);
  color: var(--hb-text-secondary);
  font-weight: var(--hb-font-bold);
}

.header__nav-title {
  font-size: var(--hb-font-size-md);
}

.header__nav-close {
  width: 34px;
  height: 34px;
  border-radius: var(--hb-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--hb-text-muted);
  font-size: var(--hb-font-size-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all var(--hb-transition-normal);
}

.header__nav-close:hover {
  color: var(--hb-text-primary);
  border-color: rgba(47, 128, 237, 0.6);
}

.header__nav-search {
  display: flex;
  gap: var(--hb-space-2);
}

.header__nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--hb-space-2);
}

.header__nav-list .header__nav-link {
  width: 100%;
  padding: var(--hb-space-4);
  font-size: var(--hb-font-size-md);
}

.header__mobile-auth {
  margin-top: auto;
  padding-top: var(--hb-space-4);
  border-top: 1px solid var(--hb-border-default);
}

.header__mobile-btn {
  display: block;
  width: 100%;
  padding: var(--hb-space-4);
  text-align: center;
  border-radius: var(--hb-radius-md);
  font-weight: var(--hb-font-semibold);
  transition: all var(--hb-transition-normal);
}

.header__mobile-btn--ghost {
  background: var(--hb-bg-elevated);
  color: var(--hb-text-secondary);
  border: 1px solid var(--hb-border-default);
}

.header__mobile-btn--ghost:hover {
  background: var(--hb-primary-light);
  color: var(--hb-primary);
  border-color: var(--hb-primary);
}

/* 操作区域 */
.header__actions {
  display: flex;
  align-items: center;
  gap: var(--hb-space-3);
  margin-left: auto;
}

/* 搜索框 */
.header__form {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: var(--hb-space-4);
  background: var(--hb-bg-elevated);
  border-bottom: 1px solid var(--hb-border-default);
  box-shadow: var(--hb-shadow-lg);
}

.header__form--active {
  display: flex;
}

@media (min-width: 768px) {
  .header__form {
    position: relative;
    top: auto;
    display: flex;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    width: auto;
    max-width: 240px;
  }
  
  .header__form--active {
    display: flex;
  }
}

.header__form-input {
  flex: 1;
  padding: var(--hb-space-3) var(--hb-space-4);
  background: var(--hb-bg-surface);
  border: 1px solid var(--hb-border-default);
  border-radius: var(--hb-radius-full);
  color: var(--hb-text-primary);
  font-size: var(--hb-font-size-base);
  transition: border-color var(--hb-transition-normal);
}

.header__form-input:focus {
  border-color: var(--hb-primary);
}

.header__form-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: calc(-1 * var(--hb-space-10));
  background: transparent;
  border: none;
  color: var(--hb-text-muted);
  cursor: pointer;
  transition: color var(--hb-transition-normal);
}

.header__form-btn:hover {
  color: var(--hb-primary);
}

.header__form-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.header__form-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: var(--hb-space-2);
  background: transparent;
  border: none;
  color: var(--hb-text-muted);
  cursor: pointer;
}

@media (max-width: 767px) {
  .header__form-close {
    display: flex;
  }
}

.header__form-close svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* 搜索按钮（移动端触发） */
.header__search {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  color: var(--hb-text-muted);
  cursor: pointer;
  transition: color var(--hb-transition-normal);
}

.header__search:hover {
  color: var(--hb-primary);
}

.header__search svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

@media (min-width: 768px) {
  .header__search {
    display: none;
  }
}

/* 用户按钮 */
.header__user {
  display: flex;
  align-items: center;
  gap: var(--hb-space-2);
  padding: var(--hb-space-2) var(--hb-space-4);
  background: var(--hb-bg-elevated);
  border: 1px solid var(--hb-border-default);
  border-radius: var(--hb-radius-full);
  color: var(--hb-text-secondary);
  font-size: var(--hb-font-size-base);
  font-weight: var(--hb-font-medium);
  transition: all var(--hb-transition-normal);
}

.header__user:hover {
  background: var(--hb-primary-light);
  border-color: var(--hb-primary);
  color: var(--hb-primary);
}

.header__user svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.header__user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.header__user span {
  display: none;
}

@media (min-width: 768px) {
  .header__user span {
    display: inline;
  }
}

/* ========================================
   2. Footer 组件
   ======================================== */

.footer {
  background: var(--hb-bg-body);
  border-top: 1px solid var(--hb-border-default);
  padding: var(--hb-space-8) 0 var(--hb-space-6);
}

.footer__stats {
  margin-bottom: var(--hb-space-6);
}

.footer__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--hb-space-3);
  padding-top: var(--hb-space-5);
  border-top: 1px solid var(--hb-border-default);
}

.footer__copyright {
  font-size: var(--hb-font-size-base);
  color: var(--hb-text-muted);
}

/* ========================================
   3. Gallery Card 组件
   CLS 优化：固定宽高比、骨架屏预占位
   ======================================== */

/* 图集网格 - 使用 content-visibility 优化渲染性能 */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--hb-space-4);
  contain: layout style;
  /* 设置最小高度防止内容加载时的高度变化 */
  min-height: 600px;
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--hb-space-5);
  }
}

@media (min-width: 1280px) {
  .gallery-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* 图集项容器 - 固定宽高比防止 CLS */
.gallery-item {
  position: relative;
  contain: layout paint style;
  /* 使用 aspect-ratio 确保卡片加载前后尺寸一致 */
  aspect-ratio: 2 / 3;
}

.gallery-item.is-skeleton {
  /* 骨架屏状态同样保持宽高比 */
  aspect-ratio: 2 / 3;
}

.gallery-item.is-skeleton .gallery-card {
  background: var(--hb-bg-surface);
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: none;
  height: 100%;
}

/* 骨架屏 - 填充整个卡片区域 */
.gallery-skeleton-thumb {
  position: absolute;
  inset: 0;
  border-radius: var(--hb-radius-md);
  background: linear-gradient(120deg, var(--hb-bg-surface) 0%, var(--hb-bg-elevated) 40%, var(--hb-bg-surface) 80%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

/* 骨架屏卡片完整结构 */
.gallery-card--skeleton {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.gallery-card--skeleton .gallery-thumb {
  flex: 1;
  position: relative;
}

/* 图集链接 */
.gallery-link {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* 图集卡片 */
.gallery-card {
  position: relative;
  background: radial-gradient(120% 120% at 50% 0%, rgba(255, 255, 255, 0.03), var(--hb-bg-surface) 60%);
  border: 1px solid var(--hb-border-default);
  border-radius: var(--hb-radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--hb-shadow-xl);
  transition: transform var(--hb-transition-normal), border-color var(--hb-transition-normal), box-shadow var(--hb-transition-normal);
  contain: layout paint style;
}

.gallery-card:hover {
  transform: translate3d(0, -4px, 0);
  border-color: var(--hb-border-hover);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

/* 移动端禁用 hover 动画（性能优化） */
@media (max-width: 768px) {
  .gallery-card,
  .gallery-thumb img {
    transition: none;
  }
  
  .gallery-card:hover {
    transform: none;
  }
}

/* 封面容器 - CLS 优化：确保固定宽高比 */
.gallery-thumb {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--hb-bg-surface);
  border-radius: var(--hb-radius-md);
  isolation: isolate;
  /* 防止内容溢出影响布局 */
  contain: strict;
}

/* 兼容不支持 aspect-ratio 的浏览器 */
@supports not (aspect-ratio: 2 / 3) {
  .gallery-thumb {
    /* 使用 padding-top hack 实现固定宽高比 */
    height: 0;
    padding-top: 150%; /* 2:3 = 150% */
  }
  
  .gallery-thumb > img {
    position: absolute;
    top: 0;
    left: 0;
  }
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--hb-transition-slow);
  /* 防止图片加载时的闪烁 */
  background: var(--hb-bg-surface);
}

.gallery-card:hover .gallery-thumb img {
  transform: scale(1.05);
}

/* 标签芯片 */
.gallery-chip {
  position: absolute;
  padding: var(--hb-space-2) var(--hb-space-3);
  border-radius: var(--hb-radius-md);
  background: var(--hb-bg-overlay);
  color: var(--hb-text-primary);
  font-size: var(--hb-font-size-sm);
  font-weight: var(--hb-font-bold);
  letter-spacing: 0.01em;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--hb-shadow-md);
  backdrop-filter: blur(6px);
  z-index: 2;
}

/* 左上角分类标签 */
.gallery-chip--flag {
  top: var(--hb-space-3);
  left: var(--hb-space-3);
}

/* 右上角数量标签 */
.gallery-chip--count {
  top: var(--hb-space-3);
  right: var(--hb-space-3);
  left: auto;
  background: var(--hb-primary-gradient);
  color: #e8edff;
}

/* 右下角浏览量标签 */
.gallery-chip--views {
  top: auto;
  bottom: var(--hb-space-3);
  left: auto;
  right: var(--hb-space-3);
  background: rgba(15, 23, 42, 0.85);
  color: var(--hb-text-secondary);
  display: flex;
  align-items: center;
  gap: var(--hb-space-1);
}

.gallery-chip--views svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* 底部标题栏 */
.gallery-title-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--hb-space-3) var(--hb-space-4) var(--hb-space-4);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 35%, rgba(0, 0, 0, 0.82) 100%);
  color: var(--hb-text-primary);
  backdrop-filter: blur(6px);
  box-shadow: 0 -18px 30px rgba(0, 0, 0, 0.35);
}

.gallery-title {
  font-size: var(--hb-font-size-base);
  font-weight: var(--hb-font-bold);
  margin: 0;
  color: var(--hb-text-primary);
  line-height: var(--hb-line-height-tight);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* ========================================
   4. Gallery Section 区域
   CLS 优化：预设最小高度
   ======================================== */

.gallery-section {
  background: var(--hb-bg-body);
  padding: var(--hb-space-5) 0 var(--hb-space-10);
  /* CLS 优化：预设最小高度，避免内容加载时的布局跳动 */
  min-height: 800px;
  /* 性能优化：限制布局影响范围 */
  contain: layout style;
}

/* 加载状态 */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--hb-space-12) 0;
  color: var(--hb-text-muted);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--hb-border-default);
  border-top-color: var(--hb-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--hb-space-16) 0;
  color: var(--hb-text-muted);
  font-size: var(--hb-font-size-md);
}

/* ========================================
   5. Filter Tabs 筛选组件
   CLS 优化：固定高度预占位
   ======================================== */

.filter-tabs-section {
  margin-bottom: var(--hb-space-4);
  /* CLS 优化：固定最小高度 */
  min-height: 48px;
  /* 性能优化 */
  contain: layout style;
}

.filter-tabs-wrapper {
  width: 100%;
  padding-bottom: var(--hb-space-2);
}

.filter-tabs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--hb-space-3);
  width: 100%;
  flex-wrap: wrap;
  /* 固定高度防止按钮加载时的布局变化 */
  min-height: 40px;
}

@media (max-width: 768px) {
  .filter-tabs {
    justify-content: flex-start;
  }
  
  .filter-tabs-section {
    min-height: 80px; /* 移动端可能换行 */
  }
}

.filter-group {
  display: flex;
  align-items: center;
  gap: var(--hb-space-2);
  flex-wrap: wrap;
}

.filter-tab {
  padding: var(--hb-space-2) var(--hb-space-4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(24, 32, 51, 0.8);
  color: var(--hb-text-secondary);
  border-radius: var(--hb-radius-xl);
  font-size: var(--hb-font-size-sm);
  font-weight: var(--hb-font-semibold);
  cursor: pointer;
  transition: all var(--hb-transition-normal);
  box-shadow: var(--hb-shadow-sm);
  white-space: nowrap;
  text-decoration: none;
}

.filter-tab:hover {
  background: rgba(31, 42, 61, 0.9);
  border-color: rgba(59, 130, 246, 0.4);
  color: var(--hb-text-primary);
  transform: translateY(-1px);
  box-shadow: var(--hb-shadow-md);
}

.filter-tab.active {
  background: var(--hb-primary-gradient);
  border-color: var(--hb-primary);
  box-shadow: var(--hb-shadow-primary);
  color: var(--hb-text-primary);
}

/* ========================================
   6. Pagination 分页组件
   CLS 优化：固定高度预占位
   ======================================== */

.pagination-wrapper {
  display: flex;
  justify-content: center;
  margin-top: var(--hb-space-8);
  padding: var(--hb-space-5) 0;
  width: 100%;
  /* CLS 优化：固定高度，防止分页加载时的布局偏移 */
  min-height: 88px;
  /* 性能优化 */
  contain: layout style;
}

.pagination-wrapper--hidden {
  /* 使用 visibility 而非 display:none，保持高度占位 */
  visibility: hidden;
  pointer-events: none;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--hb-space-3);
  background: rgba(15, 23, 42, 0.9);
  padding: var(--hb-space-3) var(--hb-space-5);
  border-radius: var(--hb-radius-xl);
  box-shadow: var(--hb-shadow-lg);
  backdrop-filter: blur(6px);
  /* 宽度与页面内容最大宽度一致 */
  width: 100%;
}

/* 上一页/下一页按钮 */
.page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  color: var(--hb-text-muted);
  border: none;
  border-radius: var(--hb-radius-full);
  font-size: var(--hb-font-size-xl);
  font-weight: 300;
  cursor: pointer;
  transition: all var(--hb-transition-normal);
}

.page-btn:hover:not(:disabled) {
  color: var(--hb-text-primary);
  background: var(--hb-primary-light);
}

.page-btn:disabled {
  color: var(--hb-text-disabled);
  cursor: not-allowed;
}

/* 页码容器 */
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--hb-space-1);
}

/* 页码按钮 */
.page-number-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 var(--hb-space-2);
  border-radius: var(--hb-radius-full);
  border: none;
  background: transparent;
  color: var(--hb-text-secondary);
  font-size: var(--hb-font-size-sm);
  font-weight: var(--hb-font-medium);
  cursor: pointer;
  transition: all var(--hb-transition-normal);
  text-decoration: none;
  line-height: 1;
}

.page-number-btn:hover:not(.active) {
  background: var(--hb-primary-light);
  color: var(--hb-text-primary);
}

.page-number-btn.active {
  background: var(--hb-primary);
  color: var(--hb-text-primary);
  box-shadow: var(--hb-shadow-primary);
}

.page-number-btn:disabled {
  cursor: default;
}

/* 省略号 */
.page-ellipsis {
  color: var(--hb-text-disabled);
  padding: 0 var(--hb-space-1);
}

/* 跳转输入 */
.page-jump {
  display: inline-flex;
  align-items: center;
  gap: var(--hb-space-2);
  margin-left: var(--hb-space-2);
}

.jump-label {
  color: var(--hb-text-muted);
  font-size: var(--hb-font-size-base);
  white-space: nowrap;
}

.jump-input {
  width: 60px;
  padding: var(--hb-space-2) var(--hb-space-2);
  border: 2px solid var(--hb-bg-elevated);
  border-radius: var(--hb-radius-sm);
  background: var(--hb-bg-elevated);
  color: var(--hb-text-muted);
  font-size: var(--hb-font-size-base);
  text-align: center;
  transition: border-color var(--hb-transition-normal);
}

.jump-input:focus {
  border-color: var(--hb-primary);
}

.jump-input::placeholder {
  color: var(--hb-text-disabled);
}

/* 隐藏数字输入框的增减按钮 */
.jump-input::-webkit-outer-spin-button,
.jump-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.jump-input {
  -moz-appearance: textfield;
}

.jump-btn {
  padding: var(--hb-space-2) var(--hb-space-3);
  background: var(--hb-success);
  color: var(--hb-text-primary);
  border: none;
  border-radius: var(--hb-radius-sm);
  font-size: var(--hb-font-size-base);
  font-weight: var(--hb-font-medium);
  cursor: pointer;
  transition: all var(--hb-transition-normal);
  white-space: nowrap;
}

.jump-btn:hover {
  background: #059669;
  transform: translateY(-1px);
}

/* 响应式分页 */
@media (max-width: 640px) {
  .pagination {
    flex-wrap: wrap;
    gap: var(--hb-space-2);
    padding: var(--hb-space-3) var(--hb-space-4);
  }
  
  .page-numbers {
    order: 0;
    flex-wrap: wrap;
    gap: var(--hb-space-1);
  }
  
  .page-jump {
    order: 1;
    margin: 0;
    margin-top: var(--hb-space-2);
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 576px) {
  .page-btn {
    width: 32px;
    height: 32px;
    font-size: var(--hb-font-size-md);
  }
  
  .page-number-btn {
    width: 32px;
    height: 32px;
    font-size: var(--hb-font-size-sm);
  }
  
  .jump-input {
    width: 50px;
  }
}

/* ========================================
   7. Stats 统计组件
   ======================================== */

.stats-section {
  margin: 0;
  padding: 0;
}

.stats-container {
  background: transparent;
  border-radius: var(--hb-radius-lg);
  padding: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--hb-space-3);
}

.stats-item {
  flex: 1;
  text-align: center;
  padding: var(--hb-space-4) var(--hb-space-3);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-radius: var(--hb-radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all var(--hb-transition-normal);
  min-width: 0;
  animation: fadeInUp var(--hb-transition-slow) ease forwards;
}

.stats-item:nth-child(1) { animation-delay: 0.03s; }
.stats-item:nth-child(2) { animation-delay: 0.06s; }
.stats-item:nth-child(3) { animation-delay: 0.09s; }
.stats-item:nth-child(4) { animation-delay: 0.12s; }

.stats-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(65, 129, 229, 0.12);
  border-color: rgba(65, 129, 229, 0.2);
}

.stats-item.running-days {
  background: linear-gradient(160deg, rgba(64, 133, 245, 0.18) 0%, rgba(64, 133, 245, 0.06) 100%);
  border-color: rgba(64, 133, 245, 0.22);
}

.stats-item.running-days:hover {
  border-color: rgba(64, 133, 245, 0.32);
  box-shadow: 0 2px 8px rgba(64, 133, 245, 0.18);
}

.stats-number {
  font-size: 1.4rem;
  font-weight: var(--hb-font-extrabold);
  color: #7fb3ff;
  margin-bottom: var(--hb-space-2);
  display: block;
  line-height: 1.1;
}

.stats-label {
  font-size: 0.9rem;
  color: var(--hb-text-muted);
  font-weight: var(--hb-font-medium);
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-unit {
  display: none;
}

/* 响应式统计 */
@media (max-width: 768px) {
  .stats-grid {
    gap: var(--hb-space-2);
  }
  
  .stats-item {
    padding: var(--hb-space-3) var(--hb-space-3);
  }
  
  .stats-number {
    font-size: 1.2rem;
  }
  
  .stats-label {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    gap: var(--hb-space-1);
  }
  
  .stats-item {
    padding: var(--hb-space-3) var(--hb-space-2);
  }
  
  .stats-number {
    font-size: 1.05rem;
  }
  
  .stats-label {
    font-size: 0.72rem;
  }
}

/* ========================================
   8. Announcement Bar 公告栏组件
   CLS 优化：固定最小高度预占位
   ======================================== */

.announcement-bar {
  width: 100%;
  padding: var(--hb-space-4) 0;
  margin: 0;
  background: transparent;
  /* CLS 优化：预设最小高度，防止内容加载时的布局偏移 */
  min-height: 60px;
  /* 性能优化：限制布局影响范围 */
  contain: layout style;
}

.announcement-content {
  width: 100%;
  padding: var(--hb-space-4) var(--hb-space-5);
  font-size: var(--hb-font-size-sm);
  line-height: var(--hb-line-height-relaxed);
  color: var(--hb-text-secondary);
  word-wrap: break-word;
  overflow-wrap: break-word;
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.65), rgba(17, 24, 39, 0.55));
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: var(--hb-radius-sm);
  box-shadow: var(--hb-shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  /* CLS 优化：固定最小高度 */
  min-height: 32px;
}

.announcement-skeleton {
  display: flex;
  align-items: center;
  gap: var(--hb-space-3);
  min-height: 20px;
}

.announcement-skeleton__dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: var(--hb-bg-elevated);
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
  flex-shrink: 0;
}

.announcement-skeleton__line {
  flex: 1;
  height: 12px;
  border-radius: 9999px;
  background: linear-gradient(120deg, var(--hb-bg-elevated) 0%, var(--hb-bg-surface) 40%, var(--hb-bg-elevated) 80%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

.announcement-skeleton__line--short {
  flex: 0.4;
}

.announcement-bar[data-state="placeholder"] .announcement-content {
  color: var(--hb-text-muted);
}

.announcement-content a {
  /* 默认链接颜色 */
  color: #60a5fa;
  font-weight: var(--hb-font-medium);
  border-bottom: 1px solid transparent;
  transition: all var(--hb-transition-normal);
}

.announcement-content a:hover {
  color: #93c5fd;
  border-bottom-color: rgba(96, 165, 250, 0.5);
}

/* 支持富文本编辑器设置的内联颜色样式 */
.announcement-content span[style*="color"],
.announcement-content a span[style*="color"] {
  /* 子元素继承内联颜色 */
}

.announcement-content span[style*="color"] strong,
.announcement-content a span[style*="color"] strong {
  color: inherit;
}

.announcement-content strong {
  font-weight: var(--hb-font-semibold);
  /* 继承父元素颜色，支持内联样式设置的文字颜色 */
  color: inherit;
}

.announcement-content > * {
  margin-top: 0;
  margin-bottom: var(--hb-space-2);
}

.announcement-content > *:last-child {
  margin-bottom: 0;
}

/* 公告徽章 */
.announcement-content .badge {
  display: inline-block;
  padding: 2px var(--hb-space-2);
  margin: 0 var(--hb-space-1);
  border-radius: 3px;
  font-size: var(--hb-font-size-sm);
  font-weight: var(--hb-font-medium);
  line-height: 1.4;
  vertical-align: baseline;
}

.announcement-content .badge-danger {
  background: #dc2626;
  color: var(--hb-text-primary);
}

.announcement-content .badge-success {
  background: #059669;
  color: var(--hb-text-primary);
}

.announcement-content .badge-info {
  background: #2563eb;
  color: var(--hb-text-primary);
}

.announcement-content .badge-warning {
  background: #d97706;
  color: var(--hb-text-primary);
}

.announcement-content .badge-purple {
  background: #9333ea;
  color: var(--hb-text-primary);
}

/* 响应式公告栏 */
@media (max-width: 768px) {
  .announcement-bar {
    padding: var(--hb-space-3) 0;
  }
  
  .announcement-content {
    font-size: var(--hb-font-size-xs);
    line-height: 1.65;
    padding: var(--hb-space-3) var(--hb-space-4);
  }
  
  .announcement-content .badge {
    font-size: var(--hb-font-size-xs);
    padding: 1px var(--hb-space-2);
  }
}

/* ========================================
   9. Advertisement 广告组件
   CLS 优化：使用固定 aspect-ratio 预占位，避免布局偏移
   ======================================== */

.advertisement-section {
  width: 100%;
  padding: var(--hb-space-5) 0;
  background: linear-gradient(180deg, var(--hb-bg-body) 0%, var(--hb-bg-surface) 100%);
  /* 性能优化：限制布局影响范围 */
  contain: layout style;
}

/* 广告区块固定最小高度，防止加载前后高度变化 */
.advertisement-section.ad-top {
  min-height: 112px; /* 预留广告位高度 */
}

@media (min-width: 1024px) {
  .advertisement-section.ad-top {
    min-height: 92px;
  }
}

@media (min-width: 1600px) {
  .advertisement-section.ad-top {
    min-height: 76px;
  }
}

.ad-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--hb-space-4);
  width: 100%;
}

@media (min-width: 1024px) {
  .ad-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1600px) {
  .ad-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.ad-item {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--hb-radius-md);
  background: radial-gradient(120% 120% at 50% 0%, rgba(255, 255, 255, 0.03), var(--hb-bg-surface) 60%);
  border: 1px solid var(--hb-border-default);
  box-shadow: var(--hb-shadow-md);
  transition: transform var(--hb-transition-normal), box-shadow var(--hb-transition-normal), border-color var(--hb-transition-normal);
  animation: fadeInUp 0.5s ease forwards;
  /* 性能优化：限制重绘范围 */
  contain: layout paint style;
}

.ad-item:nth-child(1) { animation-delay: 0.05s; }
.ad-item:nth-child(2) { animation-delay: 0.1s; }
.ad-item:nth-child(3) { animation-delay: 0.15s; }
.ad-item:nth-child(4) { animation-delay: 0.2s; }
.ad-item:nth-child(5) { animation-delay: 0.25s; }
.ad-item:nth-child(6) { animation-delay: 0.3s; }

.ad-item:hover {
  transform: translateY(-2px);
  border-color: var(--hb-border-hover);
  box-shadow: var(--hb-shadow-lg);
}

.ad-link {
  display: block;
  position: relative;
  width: 100%;
  text-decoration: none;
  border-radius: var(--hb-radius-md);
  overflow: hidden;
}

/* 图片容器：使用 aspect-ratio 固定宽高比，避免 CLS */
.ad-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 10 / 1; /* 10:1 宽高比 */
  background: var(--hb-bg-surface);
  border-radius: var(--hb-radius-md);
  overflow: hidden;
}

/* 兼容不支持 aspect-ratio 的浏览器 */
@supports not (aspect-ratio: 10 / 1) {
  .ad-image-wrapper {
    padding-bottom: 10%; /* 10:1 宽高比 fallback */
  }
  
  .ad-image-wrapper .ad-image {
    position: absolute;
    top: 0;
    left: 0;
  }
}

.ad-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--hb-transition-slow);
  /* 防止图片加载导致的布局抖动 */
  background: var(--hb-bg-surface);
}

.ad-link:hover .ad-image {
  opacity: 0.9;
}

.ad-overlay {
  position: absolute;
  top: var(--hb-space-2);
  right: var(--hb-space-2);
  z-index: 1;
  pointer-events: none;
}

.ad-label {
  display: inline-block;
  padding: 2px var(--hb-space-2);
  background: var(--hb-bg-overlay);
  color: var(--hb-text-primary);
  font-size: var(--hb-font-size-sm);
  border-radius: var(--hb-radius-sm);
  font-weight: var(--hb-font-medium);
}

.ad-top {
  margin-bottom: 0;
}

.ad-bottom {
  margin-top: 0;
}

/* 响应式广告 */
@media (max-width: 1023px) {
  .advertisement-section {
    padding: var(--hb-space-4) 0;
  }
  
  .ad-grid {
    gap: var(--hb-space-3);
  }
}

/* 打印时隐藏广告 */
@media print {
  .advertisement-section {
    display: none;
  }
}

/* ========================================
   10. FAB 浮动操作按钮
   ======================================== */

.fab-container {
  position: fixed;
  right: var(--hb-space-5);
  bottom: var(--hb-space-5);
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: var(--hb-space-3);
  z-index: var(--hb-z-sticky);
}

.fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--hb-primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--hb-shadow-primary);
  transition: transform var(--hb-transition-normal), box-shadow var(--hb-transition-normal);
}

.fab:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(47, 128, 237, 0.5);
}

.fab-content {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fab-content svg {
  width: 24px;
  height: 24px;
  fill: var(--hb-text-primary);
}

.sub-button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--hb-bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--hb-shadow-md);
  opacity: 0;
  transform: scale(0.8) translateY(10px);
  transition: all var(--hb-transition-normal);
  pointer-events: none;
}

.fab-container:hover .sub-button {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.sub-button:nth-child(2) { transition-delay: 0.05s; }
.sub-button:nth-child(3) { transition-delay: 0.1s; }

.sub-button:hover {
  background: var(--hb-primary-light);
  transform: scale(1.1) translateY(0);
}

.sub-button button {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
}

.sub-button svg {
  width: 20px;
  height: 20px;
  fill: var(--hb-text-secondary);
  transition: fill var(--hb-transition-normal);
}

.sub-button:hover svg {
  fill: var(--hb-primary);
}

/* 响应式 FAB */
@media (max-width: 768px) {
  .fab-container {
    right: var(--hb-space-4);
    bottom: var(--hb-space-4);
  }
  
  .fab {
    width: 48px;
    height: 48px;
  }
  
  .fab-content svg {
    width: 20px;
    height: 20px;
  }
  
  .sub-button {
    width: 40px;
    height: 40px;
  }
  
  .sub-button svg {
    width: 18px;
    height: 18px;
  }
}

/* ========================================
   11. Membership Card 会员卡片
   ======================================== */

.membership-status-card {
  background: var(--hb-bg-elevated);
  border-radius: var(--hb-radius-md);
  padding: var(--hb-space-4);
  color: var(--hb-text-secondary);
  border: 1px solid var(--hb-border-default);
}

.membership-header {
  display: flex;
  align-items: center;
  margin-bottom: var(--hb-space-4);
}

.membership-icon-wrapper {
  margin-right: var(--hb-space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hb-bg-surface);
  border-radius: 50%;
  width: 48px;
  height: 48px;
}

.membership-icon-wrapper img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.membership-details h6 {
  font-weight: var(--hb-font-semibold);
  font-size: 1.1rem;
  color: var(--hb-text-primary);
  margin: 0 0 var(--hb-space-1) 0;
}

.membership-details small {
  font-size: 0.8rem;
  color: var(--hb-text-muted);
}

.permissions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--hb-space-2);
  margin-bottom: var(--hb-space-4);
}

.permission-item-card {
  background: var(--hb-bg-surface);
  border-radius: var(--hb-radius-sm);
  padding: var(--hb-space-3);
  text-align: center;
  transition: transform var(--hb-transition-normal), box-shadow var(--hb-transition-normal);
}

.permission-item-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--hb-shadow-md);
}

.permission-icon {
  margin-bottom: var(--hb-space-2);
}

.permission-text small {
  font-size: 0.75rem;
}

.permission-text .fw-bold {
  font-size: 0.9rem;
  color: var(--hb-text-primary);
  font-weight: var(--hb-font-semibold);
}

.upgrade-prompt-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, rgba(58, 80, 107, 0.5), var(--hb-bg-elevated));
  padding: var(--hb-space-3) var(--hb-space-4);
  border-radius: var(--hb-radius-sm);
}

.upgrade-text small {
  font-size: 0.85rem;
  font-weight: var(--hb-font-medium);
  color: var(--hb-text-secondary);
}

.btn-upgrade {
  background: var(--hb-primary);
  color: var(--hb-text-primary);
  border: none;
  border-radius: var(--hb-radius-sm);
  padding: var(--hb-space-2) var(--hb-space-4);
  font-size: 0.85rem;
  font-weight: var(--hb-font-semibold);
  transition: background var(--hb-transition-normal);
  text-decoration: none;
}

.btn-upgrade:hover {
  background: var(--hb-primary-hover);
}

/* ========================================
   12. Video Action Buttons 视频操作按钮
   ======================================== */

.video-action-container {
  display: flex;
  gap: var(--hb-space-3);
  margin-top: var(--hb-space-4);
}

.video-action-left,
.video-action-right {
  flex: 1;
}

.video-action-btn {
  display: block;
  width: 100%;
  padding: var(--hb-space-3) var(--hb-space-4);
  background: var(--hb-bg-elevated);
  border: 1px solid var(--hb-border-default);
  border-radius: var(--hb-radius-sm);
  color: var(--hb-text-secondary);
  font-size: var(--hb-font-size-base);
  font-weight: var(--hb-font-medium);
  text-align: center;
  cursor: pointer;
  transition: all var(--hb-transition-normal);
}

.video-action-btn:hover {
  background: var(--hb-primary-light);
  border-color: var(--hb-primary);
  color: var(--hb-primary);
}

.video-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 响应式视频按钮 */
@media (max-width: 768px) {
  .video-action-container {
    gap: var(--hb-space-2);
  }
  
  .video-action-btn {
    padding: var(--hb-space-3);
    font-size: var(--hb-font-size-sm);
  }
}

@media (max-width: 576px) {
  .video-action-container {
    flex-direction: column;
    gap: var(--hb-space-2);
  }
  
  .video-action-btn {
    padding: var(--hb-space-3);
  }
}

/* ========================================
   13. Toast 提示组件增强
   ======================================== */

/* jQuery Toast 插件样式覆盖 */
.jq-toast-wrap {
  z-index: var(--hb-z-toast) !important;
}

.jq-toast-single {
  background: var(--hb-bg-elevated) !important;
  border: 1px solid var(--hb-border-default) !important;
  border-radius: var(--hb-radius-md) !important;
  color: var(--hb-text-primary) !important;
  box-shadow: var(--hb-shadow-xl) !important;
}

.jq-toast-single h2 {
  color: var(--hb-text-primary) !important;
  font-weight: var(--hb-font-semibold) !important;
}

/* ========================================
   14. Image Grid 图片网格（详情页）
   ======================================== */

.image-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--hb-space-4);
  margin-top: var(--hb-space-4);
  margin-bottom: var(--hb-space-4);
  padding: 0;
}

.image-grid-item {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: var(--hb-radius-md);
  background: var(--hb-bg-surface);
  box-shadow: var(--hb-shadow-md);
  transition: transform var(--hb-transition-slow), box-shadow var(--hb-transition-slow);
}

.image-grid-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--hb-shadow-lg);
}

.image-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: var(--hb-radius-md);
  background: var(--hb-bg-surface);
}

.gallery-image {
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center center;
  border-radius: var(--hb-radius-md);
  transition: transform var(--hb-transition-slow);
}

.gallery-image:hover {
  transform: scale(1.02);
}

/* 锁定图片样式 */
.image-locked {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: var(--hb-radius-md);
  color: var(--hb-text-primary);
}

/* 响应式图片网格 */
@media (max-width: 768px) {
  .image-gallery-grid {
    gap: var(--hb-space-3);
    margin-top: var(--hb-space-3);
    margin-bottom: var(--hb-space-3);
  }
  
  .image-grid-item {
    border-radius: var(--hb-radius-sm);
  }
  
  .image-container,
  .gallery-image,
  .image-locked {
    border-radius: var(--hb-radius-sm);
  }
  
  /* 移动端 Plan 卡片间距优化 */
  .plan {
    padding: var(--hb-space-4);
    margin-top: var(--hb-space-3);
  }
  
  .plan__title {
    font-size: var(--hb-font-size-md);
    margin-bottom: var(--hb-space-2);
  }
}

@media (max-width: 480px) {
  .image-gallery-grid {
    gap: var(--hb-space-2);
    margin-top: var(--hb-space-2);
    margin-bottom: var(--hb-space-2);
  }
  
  .image-grid-item {
    border-radius: var(--hb-radius-sm);
  }
  
  .plan {
    padding: var(--hb-space-4);
    margin-top: var(--hb-space-2);
  }
}

/* ========================================
   15. Plan Card 套餐卡片
   ======================================== */

.plan {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--hb-bg-elevated);
  border: 1px solid var(--hb-border-default);
  border-radius: var(--hb-radius-lg);
  padding: var(--hb-space-5);
  margin-top: var(--hb-space-4);
  transition: all var(--hb-transition-normal);
}

/* 图片网格后的第一个 plan 卡片减少顶部间距 */
.image-gallery-grid + .plan {
  margin-top: 0;
}

.plan:hover {
  border-color: var(--hb-border-hover);
  box-shadow: var(--hb-shadow-lg);
}

.plan--best {
  border-color: var(--hb-primary);
  background: linear-gradient(180deg, rgba(47, 128, 237, 0.1) 0%, var(--hb-bg-elevated) 100%);
}

.plan__title {
  font-size: var(--hb-font-size-lg);
  font-weight: var(--hb-font-bold);
  color: var(--hb-text-primary);
  margin-bottom: var(--hb-space-3);
  margin-top: 0;
}

.plan__list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--hb-space-5) 0;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  gap: var(--hb-space-3);
}

.plan__list li {
  display: flex;
  align-items: center;
  gap: var(--hb-space-2);
  color: var(--hb-text-secondary);
  font-size: var(--hb-font-size-base);
}

.plan__list li.green svg {
  stroke: var(--hb-success);
}

.plan__list li svg {
  flex-shrink: 0;
  width: 19px;
  height: 14px;
}

.plan__price {
  font-size: var(--hb-font-size-2xl);
  font-weight: var(--hb-font-bold);
  color: var(--hb-text-primary);
  margin-bottom: var(--hb-space-5);
}

.plan__price span {
  font-size: var(--hb-font-size-base);
  font-weight: var(--hb-font-normal);
  color: var(--hb-text-muted);
}

.plan__btn {
  display: block;
  width: 100%;
  padding: var(--hb-space-3) var(--hb-space-5);
  background: var(--hb-primary-gradient);
  color: var(--hb-text-primary);
  border: none;
  border-radius: var(--hb-radius-md);
  font-size: var(--hb-font-size-base);
  font-weight: var(--hb-font-semibold);
  text-align: center;
  cursor: pointer;
  transition: all var(--hb-transition-normal);
  margin-bottom: var(--hb-space-3);
  text-decoration: none;
}

.plan__btn:last-child {
  margin-bottom: 0;
}

.plan__btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--hb-shadow-primary);
}

.plan__btn:disabled,
.plan__btn.btn-disabled {
  background: var(--hb-bg-surface);
  color: var(--hb-text-disabled);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ========================================
   16. Gallery List (Sidebar)
   ======================================== */

.gallery-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.gallery-list-item {
  border-bottom: 1px solid var(--hb-border-default);
  padding: var(--hb-space-3) 0;
  display: flex;
  align-items: center;
}

.gallery-list-item:last-child {
  border-bottom: none;
}

.list-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: var(--hb-space-3);
  background: var(--hb-primary);
  flex-shrink: 0;
}

.gallery-list-item:nth-child(7n+1) .list-dot { background: #ff6b6b; }
.gallery-list-item:nth-child(7n+2) .list-dot { background: #feca57; }
.gallery-list-item:nth-child(7n+3) .list-dot { background: #48dbfb; }
.gallery-list-item:nth-child(7n+4) .list-dot { background: #1dd1a1; }
.gallery-list-item:nth-child(7n+5) .list-dot { background: #ff9f43; }
.gallery-list-item:nth-child(7n+6) .list-dot { background: #a29bfe; }
.gallery-list-item:nth-child(7n+7) .list-dot { background: #54a0ff; }

.gallery-list-item .gallery-title {
  color: var(--hb-text-secondary);
  text-decoration: none;
  transition: color var(--hb-transition-normal);
  font-size: var(--hb-font-size-base);
  line-height: var(--hb-line-height-tight);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-list-item .gallery-title:hover {
  color: var(--hb-primary);
}

/* ========================================
   17. Subscribe Card - 充值会员/积分卡片
   ======================================== */

/* 旧版兼容 */
.subscribe {
  background: var(--hb-bg-elevated);
  border: 1px solid var(--hb-border-default);
  border-radius: var(--hb-radius-lg);
  padding: var(--hb-space-6);
  text-align: center;
}

.subscribe__img {
  margin-bottom: var(--hb-space-4);
}

.subscribe__img svg {
  width: 60px;
  height: 60px;
  fill: var(--hb-primary);
}

.subscribe__title {
  font-size: var(--hb-font-size-lg);
  font-weight: var(--hb-font-bold);
  color: var(--hb-text-primary);
  margin-bottom: var(--hb-space-3);
}

.subscribe__text {
  font-size: var(--hb-font-size-base);
  color: var(--hb-text-muted);
  margin-bottom: var(--hb-space-5);
  line-height: var(--hb-line-height-relaxed);
}

/* 新版充值卡片 */
.subscribe-card {
  background: linear-gradient(160deg, rgba(47, 128, 237, 0.12) 0%, var(--hb-bg-elevated) 40%);
  border: 1px solid rgba(47, 128, 237, 0.3);
  border-radius: var(--hb-radius-lg);
  padding: var(--hb-space-5);
  text-align: center;
}

.subscribe-card__icon {
  margin-bottom: var(--hb-space-3);
}

.subscribe-card__icon svg {
  width: 40px;
  height: 40px;
  fill: var(--hb-primary);
}

.subscribe-card__title {
  font-size: var(--hb-font-size-lg);
  font-weight: var(--hb-font-bold);
  color: var(--hb-text-primary);
  margin: 0 0 var(--hb-space-4) 0;
}

/* 权益列表 */
.subscribe-card__benefits {
  display: flex;
  flex-direction: column;
  gap: var(--hb-space-2);
  margin-bottom: var(--hb-space-4);
  text-align: left;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: var(--hb-space-2);
  padding: var(--hb-space-2) var(--hb-space-3);
  background: rgba(47, 128, 237, 0.08);
  border-radius: var(--hb-radius-sm);
  transition: background var(--hb-transition-normal);
}

.benefit-item:hover {
  background: rgba(47, 128, 237, 0.15);
}

.benefit-icon {
  width: 16px;
  height: 16px;
  min-width: 16px;
  flex-shrink: 0;
  fill: var(--hb-primary);
}

.benefit-text {
  font-size: var(--hb-font-size-sm);
  color: var(--hb-text-secondary);
  font-weight: var(--hb-font-medium);
  line-height: 1.4;
}

/* 按钮组 */
.subscribe-card__actions {
  display: flex;
  gap: var(--hb-space-3);
}

.subscribe-card__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--hb-space-3) var(--hb-space-4);
  border-radius: var(--hb-radius-md);
  font-size: var(--hb-font-size-sm);
  font-weight: var(--hb-font-semibold);
  text-decoration: none;
  transition: all var(--hb-transition-normal);
  white-space: nowrap;
}

.subscribe-card__btn--primary {
  background: var(--hb-primary-gradient);
  color: var(--hb-text-primary);
  border: none;
}

.subscribe-card__btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(47, 128, 237, 0.4);
}

.subscribe-card__btn--secondary {
  background: transparent;
  color: var(--hb-primary);
  border: 1px solid var(--hb-primary);
}

.subscribe-card__btn--secondary:hover {
  background: rgba(47, 128, 237, 0.1);
}

/* 响应式优化 */
@media (max-width: 576px) {
  .subscribe-card {
    padding: var(--hb-space-4);
  }
  
  .subscribe-card__icon svg {
    width: 40px;
    height: 40px;
  }
  
  .subscribe-card__title {
    font-size: var(--hb-font-size-md);
  }
  
  .subscribe-card__benefits {
    gap: var(--hb-space-2);
  }
  
  .benefit-item {
    padding: var(--hb-space-2);
    gap: var(--hb-space-2);
  }
  
  .benefit-icon {
    width: 16px;
    height: 16px;
  }
  
  .benefit-text {
    font-size: var(--hb-font-size-xs);
  }
  
  .subscribe-card__actions {
    flex-direction: column;
    gap: var(--hb-space-2);
  }
  
  .subscribe-card__btn {
    padding: var(--hb-space-3);
    font-size: var(--hb-font-size-sm);
  }
}

/* ========================================
   18. Sign Form 认证表单
   ======================================== */

.sign {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--hb-space-6);
  background: var(--hb-bg-body);
  background-size: cover;
  background-position: center;
}

/* 确保 sign 内部的容器和栅格系统不影响居中 */
.sign .container {
  width: 100%;
  max-width: 100%;
  padding: 0;
}

.sign .row {
  margin: 0;
  justify-content: center;
}

.sign .col-12 {
  padding: 0;
  display: flex;
  justify-content: center;
}

.sign__content {
  width: 100%;
  max-width: 420px;
  margin: 0;
}

.sign__form {
  background: var(--hb-bg-elevated);
  border: 1px solid var(--hb-border-default);
  border-radius: var(--hb-radius-xl);
  padding: var(--hb-space-8);
  box-shadow: var(--hb-shadow-xl);
}

.sign__logo {
  display: block;
  text-align: center;
  margin-bottom: var(--hb-space-6);
}

.sign__logo .text-logo {
  font-size: var(--hb-font-size-2xl);
  font-weight: var(--hb-font-extrabold);
  color: var(--hb-text-primary);
}

.sign__group {
  margin-bottom: var(--hb-space-5);
}

.sign__label {
  display: block;
  margin-bottom: var(--hb-space-2);
  font-size: var(--hb-font-size-base);
  color: var(--hb-text-secondary);
}

.sign__input {
  width: 100%;
  padding: var(--hb-space-4);
  background: var(--hb-bg-surface);
  border: 1px solid var(--hb-border-default);
  border-radius: var(--hb-radius-md);
  color: var(--hb-text-primary);
  font-size: var(--hb-font-size-base);
  transition: border-color var(--hb-transition-normal);
}

.sign__input:focus {
  border-color: var(--hb-primary);
}

.sign__group--checkbox {
  display: flex;
  align-items: center;
  gap: var(--hb-space-3);
  padding: var(--hb-space-4);
  border: 1px solid var(--hb-border-default);
  border-radius: var(--hb-radius-md);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02));
  box-shadow: var(--hb-shadow-md);
  transition: border-color var(--hb-transition-normal), box-shadow var(--hb-transition-normal), transform var(--hb-transition-fast);
}

.sign__group--checkbox:hover {
  border-color: var(--hb-border-hover);
  box-shadow: var(--hb-shadow-lg);
  transform: translateY(-1px);
}

.sign__group--checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--hb-border-default);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all var(--hb-transition-normal);
}

.sign__group--checkbox input[type="checkbox"]::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--hb-text-primary);
  border-bottom: 2px solid var(--hb-text-primary);
  transform: rotate(-45deg) scale(0);
  transition: transform var(--hb-transition-fast);
}

.sign__group--checkbox input[type="checkbox"]:hover {
  border-color: var(--hb-border-hover);
  box-shadow: var(--hb-shadow-sm), 0 0 0 4px rgba(59, 130, 246, 0.08);
}

.sign__group--checkbox input[type="checkbox"]:checked {
  background: var(--hb-primary-gradient);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: var(--hb-shadow-primary);
}

.sign__group--checkbox input[type="checkbox"]:checked::after {
  transform: rotate(-45deg) scale(1);
}

.sign__group--checkbox input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.35);
  outline-offset: 3px;
}

.sign__group--checkbox label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  flex: 1;
  cursor: pointer;
  color: var(--hb-text-secondary);
  font-size: var(--hb-font-size-base);
  line-height: 1.4;
}

.sign__checkbox-title {
  font-weight: var(--hb-font-semibold);
  color: var(--hb-text-primary);
}

.sign__checkbox-hint {
  color: var(--hb-text-muted);
  font-size: var(--hb-font-size-sm);
}

.sign__checkbox-hint a {
  color: var(--hb-text-secondary);
  text-decoration: underline;
}

.sign__checkbox-hint a:hover {
  color: var(--hb-primary);
}

@media (max-width: 576px) {
  .sign__group--checkbox {
    padding: var(--hb-space-3);
    gap: var(--hb-space-2);
  }

  .sign__group--checkbox label {
    font-size: var(--hb-font-size-sm);
  }
}

.sign__group--code {
  display: flex;
  align-items: center;
  gap: var(--hb-space-3);
}

.sign__group--code .sign__input {
  flex: 1;
  min-width: 0;
}

.sign__code-btn {
  flex-shrink: 0;
  min-width: 132px;
  height: 46px;
  padding: 0 var(--hb-space-4);
  background: var(--hb-primary-gradient);
  color: var(--hb-text-primary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--hb-radius-md);
  font-size: var(--hb-font-size-base);
  font-weight: var(--hb-font-semibold);
  cursor: pointer;
  box-shadow: var(--hb-shadow-primary);
  transition: all var(--hb-transition-normal);
}

.sign__code-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--hb-shadow-lg);
}

.sign__code-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@media (max-width: 520px) {
  .sign__group--code {
    flex-wrap: wrap;
  }

  .sign__code-btn {
    width: 100%;
  }
}

.sign__btn {
  width: 100%;
  padding: var(--hb-space-4);
  background: var(--hb-primary-gradient);
  color: var(--hb-text-primary);
  border: none;
  border-radius: var(--hb-radius-md);
  font-size: var(--hb-font-size-md);
  font-weight: var(--hb-font-semibold);
  cursor: pointer;
  transition: all var(--hb-transition-normal);
  margin-bottom: var(--hb-space-4);
}

.sign__btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--hb-shadow-primary);
}

.sign__text {
  display: block;
  text-align: center;
  font-size: var(--hb-font-size-base);
  color: var(--hb-text-muted);
  margin-top: var(--hb-space-3);
}

.sign__text a {
  color: var(--hb-primary);
  font-weight: var(--hb-font-medium);
}

.sign__text a:hover {
  text-decoration: underline;
}
