/**
 * pages.css - 页面特定样式
 * 包含：首页、图集列表、图集详情、用户中心、会员页面、认证页面、搜索页面等
 * 作者: ike
 * 日期: 2025-12-02
 */

/* ========================================
   1. Section 通用区块样式
   ======================================== */

.section {
  padding: var(--hb-space-10) 0;
}

.section--pb0 {
  padding-bottom: 0;
}

.section--gradient {
  background: linear-gradient(180deg, var(--hb-bg-surface) 0%, var(--hb-bg-body) 100%);
}

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

/* 页面头部区块 */
.section--head {
  padding: var(--hb-space-8) 0 var(--hb-space-6);
  background: var(--hb-bg-surface);
}

.section--head-fixed {
  padding-top: var(--hb-space-6);
}

.section__title--head {
  font-size: var(--hb-font-size-3xl);
  font-weight: var(--hb-font-extrabold);
  color: var(--hb-text-primary);
  margin: 0;
}

/* ========================================
   2. 面包屑导航
   ======================================== */

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

@media (min-width: 1280px) {
  .breadcrumb {
    justify-content: flex-end;
    margin-top: 0;
  }
}

.breadcrumb__item {
  display: flex;
  align-items: center;
  font-size: var(--hb-font-size-base);
  color: var(--hb-text-muted);
}

.breadcrumb__item::after {
  content: '/';
  margin-left: var(--hb-space-2);
  color: var(--hb-text-disabled);
}

.breadcrumb__item:last-child::after {
  display: none;
}

.breadcrumb__item a {
  color: var(--hb-text-muted);
  transition: color var(--hb-transition-normal);
}

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

.breadcrumb__item--active {
  color: var(--hb-text-primary);
}

/* ========================================
   3. Container 容器
   ======================================== */

.container {
  width: 100%;
  max-width: var(--hb-max-width);
  margin: 0 auto;
  padding: 0 var(--hb-shell-padding);
}

/* ========================================
   4. Row/Col 栅格系统
   ======================================== */

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 calc(-1 * var(--hb-space-3));
}

.row--grid {
  gap: var(--hb-space-5);
  margin: 0;
}

[class*="col-"] {
  width: 100%;
  padding: 0 var(--hb-space-3);
}

.col-12 { width: 100%; }

@media (min-width: 576px) {
  .col-sm-6 { width: 50%; }
}

@media (min-width: 768px) {
  .col-md-4 { width: 33.333333%; }
  .col-md-6 { width: 50%; }
}

@media (min-width: 992px) {
  .col-lg-12 { width: 100%; }
}

@media (min-width: 1280px) {
  .col-xl-3 { width: 25%; }
  .col-xl-4 { width: 33.333333%; }
  .col-xl-6 { width: 50%; }
  .col-xl-8 { width: 66.666667%; }
}

/* ========================================
   5. 图集详情页样式
   ======================================== */

.section--details {
  padding-bottom: var(--hb-space-6);
}

/* 详情页主容器 - 左右区块对齐 */
.section--details .row {
  align-items: flex-start;
}

/* 文章内容 */
.article {
  width: 100%;
}

.article__content {
  padding: var(--hb-space-5);
  background: var(--hb-bg-elevated);
  border-radius: var(--hb-radius-lg);
  border: 1px solid var(--hb-border-default);
}

/* 左侧内容区块高度自适应 */
.section--details .col-12.col-xl-8 .article__content {
  min-height: fit-content;
}

/* 右侧边栏与左侧顶部对齐 */
.section--details .col-12.col-xl-4 {
  margin-top: 0;
}

/* 移动端右侧边栏顶部间距 */
@media (max-width: 1279px) {
  .section--details .col-12.col-xl-4 {
    margin-top: var(--hb-space-5);
  }
}

.article__category {
  display: inline-block;
  padding: var(--hb-space-2) var(--hb-space-3);
  background: var(--hb-primary-light);
  color: var(--hb-primary);
  font-size: var(--hb-font-size-sm);
  font-weight: var(--hb-font-semibold);
  border-radius: var(--hb-radius-sm);
  margin-bottom: var(--hb-space-4);
}

.article__category:hover {
  background: var(--hb-primary);
  color: var(--hb-text-primary);
}

.article__date {
  display: flex;
  align-items: center;
  gap: var(--hb-space-2);
  color: var(--hb-text-muted);
  font-size: var(--hb-font-size-sm);
  margin-bottom: var(--hb-space-3);
}

.article__date svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.article__content h1 {
  font-size: var(--hb-font-size-2xl);
  font-weight: var(--hb-font-bold);
  color: var(--hb-text-primary);
  margin-bottom: var(--hb-space-4);
  line-height: var(--hb-line-height-tight);
}

/* 标签列表 */
.list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hb-space-4);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--hb-space-4) 0;
}

.list li {
  display: flex;
  align-items: center;
  gap: var(--hb-space-2);
  color: var(--hb-text-muted);
  font-size: var(--hb-font-size-sm);
}

.list li svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* 分类标签 */
.categories {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hb-space-2);
  margin-top: var(--hb-space-3);
}

.categories__item {
  display: inline-block;
  padding: var(--hb-space-1) var(--hb-space-3);
  background: var(--hb-bg-surface);
  color: var(--hb-text-secondary);
  font-size: var(--hb-font-size-sm);
  border-radius: var(--hb-radius-full);
  border: 1px solid var(--hb-border-default);
  transition: all var(--hb-transition-normal);
}

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

.categories__item.badge-primary {
  background: var(--hb-primary);
  border-color: var(--hb-primary);
  color: var(--hb-text-primary);
}

/* ========================================
   6. 侧边栏样式
   ======================================== */

.sidebar {
  position: sticky;
  top: calc(var(--hb-header-height) + var(--hb-space-5));
}

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

/* 统一侧边栏卡片容器 */
.unified-sidebar-card {
  margin-top: 0;
}

/* 侧边栏内部卡片间距统一 */
.unified-sidebar-card > * + * {
  margin-top: var(--hb-space-4);
}

/* 会员状态卡片与下方订阅卡片间距 */
.membership-status-card + .subscribe-card,
.membership-status-card + .subscribe {
  margin-top: var(--hb-space-4);
}

/* ========================================
   7. 用户中心页面
   ======================================== */

.catalog {
  padding: var(--hb-space-8) 0;
}

.catalog--page {
  background: var(--hb-bg-body);
}

/* 个人资料头部 */
.profile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--hb-space-5);
  padding: var(--hb-space-6);
  background: var(--hb-bg-elevated);
  border-radius: var(--hb-radius-lg);
  border: 1px solid var(--hb-border-default);
  margin-bottom: var(--hb-space-6);
}

.profile__user {
  display: flex;
  align-items: center;
  gap: var(--hb-space-4);
}

.profile__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--hb-bg-surface);
  overflow: hidden;
}

.profile__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile__meta h3 {
  font-size: var(--hb-font-size-xl);
  font-weight: var(--hb-font-bold);
  color: var(--hb-text-primary);
  margin: 0 0 var(--hb-space-1) 0;
}

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

/* 用户名和积分横向布局 */
.profile__name-score {
  display: flex;
  align-items: center;
  gap: var(--hb-space-3);
  flex-wrap: wrap;
  margin-bottom: var(--hb-space-1);
}

.profile__name-score h3 {
  margin: 0;
}

.profile__score {
  display: flex;
  align-items: center;
  gap: var(--hb-space-1);
  padding: var(--hb-space-1) var(--hb-space-3);
  background: var(--hb-primary-light);
  border-radius: var(--hb-radius-full);
  font-size: var(--hb-font-size-sm);
  font-weight: var(--hb-font-medium);
  color: var(--hb-primary);
}

.profile__score svg {
  flex-shrink: 0;
  fill: var(--hb-primary);
}

.profile__score-value {
  white-space: nowrap;
}

.profile__logout {
  display: flex;
  align-items: center;
  gap: var(--hb-space-2);
  padding: var(--hb-space-3) var(--hb-space-4);
  background: var(--hb-error-light);
  color: var(--hb-error);
  border-radius: var(--hb-radius-md);
  font-weight: var(--hb-font-medium);
  transition: all var(--hb-transition-normal);
}

.profile__logout:hover {
  background: var(--hb-error);
  color: var(--hb-text-primary);
}

.profile__logout svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* 标签页导航 */
.profile__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hb-space-2);
  list-style: none;
  padding: 0;
  margin: 0;
  border: none;
}

.profile__tabs .nav-item {
  flex-shrink: 0;
}

.profile__tabs .nav-link {
  display: block;
  padding: var(--hb-space-3) var(--hb-space-4);
  background: var(--hb-bg-surface);
  color: var(--hb-text-muted);
  border-radius: var(--hb-radius-md);
  font-weight: var(--hb-font-medium);
  transition: all var(--hb-transition-normal);
  text-decoration: none;
}

.profile__tabs .nav-link:hover {
  background: var(--hb-primary-light);
  color: var(--hb-primary);
}

.profile__tabs .nav-link.active {
  background: var(--hb-primary);
  color: var(--hb-text-primary);
}

/* 标签页内容 */
.tab-content {
  width: 100%;
}

.tab-content > .tab-pane {
  display: none;
}

.tab-content > .active {
  display: block;
}

.fade {
  transition: opacity 0.3s linear;
}

.fade:not(.show) {
  opacity: 0;
}

/* 统计卡片 */
.stats {
  display: flex;
  flex-direction: column;
  padding: var(--hb-space-5);
  background: var(--hb-bg-elevated);
  border-radius: var(--hb-radius-lg);
  border: 1px solid var(--hb-border-default);
  height: 100%;
}

.stats span {
  font-size: var(--hb-font-size-base);
  color: var(--hb-text-muted);
  margin-bottom: var(--hb-space-2);
}

.stats p {
  font-size: var(--hb-font-size-2xl);
  font-weight: var(--hb-font-bold);
  color: var(--hb-text-primary);
  margin: 0;
}

.stats p b {
  font-weight: var(--hb-font-extrabold);
}

.stats p a {
  color: var(--hb-primary);
}

.stats svg {
  width: 32px;
  height: 32px;
  fill: var(--hb-primary);
  margin-top: auto;
  opacity: 0.3;
}

/* 用户操作按钮区块 */
.user-actions {
  background: var(--hb-bg-elevated);
  border-radius: var(--hb-radius-lg);
  padding: var(--hb-space-3);
  margin: var(--hb-space-4) 0;
  border: 1px solid var(--hb-border-default);
}

.user-actions__title {
  margin-bottom: var(--hb-space-3);
  text-align: center;
}

.user-actions__title h3 {
  color: var(--hb-text-primary);
  font-size: var(--hb-font-size-md);
  font-weight: var(--hb-font-medium);
  margin: 0;
}

.user-action-btn {
  display: block;
  background: var(--hb-bg-elevated);
  background-image: linear-gradient(180deg, rgba(47, 128, 237, 0.08), transparent);
  border: 1px solid rgba(47, 128, 237, 0.45);
  border-radius: var(--hb-radius-lg);
  padding: var(--hb-space-3) var(--hb-space-2);
  text-decoration: none;
  transition: all var(--hb-transition-normal);
  margin-bottom: var(--hb-space-2);
  height: 100%;
  min-height: 60px;
  box-shadow: 0 2px 10px rgba(47, 128, 237, 0.15);
}

.user-action-btn:hover {
  border-color: var(--hb-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(47, 128, 237, 0.25);
  text-decoration: none;
}

.user-action-btn__icon {
  text-align: center;
  margin-bottom: var(--hb-space-2);
}

.user-action-btn__icon svg {
  width: 20px;
  height: 20px;
  fill: var(--hb-primary);
}

.user-action-btn__content {
  text-align: center;
}

.user-action-btn__title {
  color: var(--hb-text-primary);
  font-size: var(--hb-font-size-sm);
  font-weight: var(--hb-font-medium);
  margin-bottom: 2px;
}

.user-action-btn__desc {
  color: var(--hb-text-muted);
  font-size: var(--hb-font-size-xs);
  line-height: 1.2;
  margin: 0;
}

/* 响应式用户操作按钮 */
@media (max-width: 768px) {
  .user-actions {
    padding: var(--hb-space-3);
  }
  
  .user-action-btn {
    padding: var(--hb-space-2) var(--hb-space-2);
    min-height: 55px;
  }
  
  .user-action-btn__icon svg {
    width: 18px;
    height: 18px;
  }
  
  .user-action-btn__title {
    font-size: var(--hb-font-size-xs);
  }
  
  .user-action-btn__desc {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .user-actions {
    padding: var(--hb-space-2);
  }
  
  .user-actions .row {
    margin: 0 -2px;
  }
  
  .user-actions [class*="col-"] {
    padding: 0 2px;
  }
  
  .user-action-btn {
    padding: var(--hb-space-2);
    min-height: 50px;
  }
  
  .user-action-btn__icon {
    margin-bottom: var(--hb-space-1);
  }
  
  .user-action-btn__icon svg {
    width: 16px;
    height: 16px;
  }
  
  .user-action-btn__title {
    font-size: var(--hb-font-size-xs);
    margin-bottom: 1px;
  }
  
  .user-action-btn__desc {
    font-size: 9px;
    line-height: 1.1;
  }
}

/* Dashbox 仪表盘盒子 */
.dashbox {
  background: var(--hb-bg-elevated);
  border-radius: var(--hb-radius-lg);
  border: 1px solid var(--hb-border-default);
  height: 100%;
}

.dashbox__title {
  display: flex;
  align-items: center;
  padding: var(--hb-space-4) var(--hb-space-5);
  border-bottom: 1px solid var(--hb-border-default);
}

.dashbox__title h3 {
  display: flex;
  align-items: center;
  gap: var(--hb-space-2);
  font-size: var(--hb-font-size-md);
  font-weight: var(--hb-font-semibold);
  color: var(--hb-text-primary);
  margin: 0;
}

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

.dashbox__table-wrap {
  max-height: 320px;
  overflow-y: auto;
}

/* 主表格 */
.main__table {
  width: 100%;
  border-collapse: collapse;
}

.main__table th,
.main__table td {
  padding: var(--hb-space-3) var(--hb-space-4);
  text-align: left;
}

.main__table th {
  font-size: var(--hb-font-size-sm);
  font-weight: var(--hb-font-semibold);
  color: var(--hb-text-muted);
  background: var(--hb-bg-surface);
  position: sticky;
  top: 0;
  z-index: 1;
}

.main__table td {
  border-bottom: 1px solid var(--hb-border-default);
}

.main__table tr:last-child td {
  border-bottom: none;
}

.main__table-text {
  font-size: var(--hb-font-size-base);
  color: var(--hb-text-secondary);
}

.main__table-text a {
  color: var(--hb-text-secondary);
  transition: color var(--hb-transition-normal);
}

.main__table-text a:hover {
  color: var(--hb-primary);
}

.main__table-text--rate {
  display: flex;
  align-items: center;
  gap: var(--hb-space-1);
  color: var(--hb-warning);
}

.main__table-text--rate svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* ========================================
   8. 搜索表单
   ======================================== */

.search-category {
  position: relative;
  width: 100%;
  margin: 0 auto var(--hb-space-5);
  display: flex;
  justify-content: center;
}

.search-category > .search-item {
  position: relative;
  width: 50%;
  display: flex;
  align-items: center;
}

@media (max-width: 576px) {
  .search-category > .search-item {
    width: calc(100% - 40px);
  }
}

.search-category > .search-item > input {
  width: 100%;
  height: 50px;
  padding: 0 var(--hb-space-5);
  background: var(--hb-bg-elevated);
  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);
}

.search-category > .search-item > input:focus {
  border-color: var(--hb-primary);
}

.search-category > .search-item > button {
  position: absolute;
  right: var(--hb-space-5);
  width: 20px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.search-category > .search-item .serarch-img {
  width: 20px;
  height: 20px;
}

/* 搜索表单（内联样式） */
.search-form {
  display: flex;
  gap: var(--hb-space-2);
}

.search-form input {
  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);
  min-width: 200px;
}

.search-form input:focus {
  border-color: var(--hb-primary);
  outline: none;
}

/* ========================================
   9. 标签页导航条
   ======================================== */

.nav-tag {
  width: 100%;
  height: 40px;
  margin: 0 auto var(--hb-space-10);
  border-bottom: 2px solid var(--hb-bg-elevated);
  color: var(--hb-text-primary);
  font-size: var(--hb-font-size-md);
  font-weight: var(--hb-font-semibold);
}

.nav-tag > span {
  cursor: pointer;
  margin-right: var(--hb-space-5);
}

.selected-nav-tag {
  position: relative;
  color: var(--hb-primary);
}

.selected-nav-tag::before {
  position: absolute;
  bottom: -12px;
  content: '';
  background: var(--hb-primary);
  height: 3px;
  border-radius: 3px;
  width: 100%;
}

/* ========================================
   10. 弹窗/对话框
   ======================================== */

.alertBox {
  position: fixed;
  left: 0;
  top: 0;
  z-index: var(--hb-z-modal);
  width: 100vw;
  height: 100%;
  background: rgba(113, 113, 113, 0.525);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.5s;
}

.alertBox > .cont {
  width: 300px;
  border-radius: var(--hb-radius-md);
  background: var(--hb-bg-elevated);
  color: var(--hb-text-primary);
  overflow: hidden;
  padding-bottom: var(--hb-space-5);
}

.alertBox > .cont > .titles {
  padding: var(--hb-space-4);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: var(--hb-font-size-lg);
  font-weight: var(--hb-font-semibold);
}

.alertBox > .cont > .paytype > .wxpay,
.alertBox > .cont > .paytype .alipay {
  margin: 0 var(--hb-space-4);
  padding: var(--hb-space-4);
  background: var(--hb-bg-surface);
  border-radius: var(--hb-radius-md);
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: background var(--hb-transition-normal);
}

.alertBox > .cont > .paytype > .wxpay:hover,
.alertBox > .cont > .paytype .alipay:hover {
  background: var(--hb-primary);
}

.alertBox > .cont > .paytype > .wxpay > .logo,
.alertBox > .cont > .paytype .alipay > .logo {
  width: 25px;
  height: 25px;
  border-radius: var(--hb-radius-sm);
  margin-right: var(--hb-space-3);
}

.alertBox > .cont > .paytype > .wxpay > .loading,
.alertBox > .cont > .paytype .alipay > .loading {
  margin-left: auto;
  width: 20px;
  height: 20px;
  opacity: 0;
}

.alertBox > .cont > .paytype > .wxpay {
  margin-top: var(--hb-space-4);
  margin-bottom: var(--hb-space-2);
}

/* 旋转动画 */
.xuanzhuan {
  opacity: 1 !important;
  animation: xuanzhuancss 2s infinite;
}

@keyframes xuanzhuancss {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ========================================
   11. Card 组件（旧版兼容）
   CLS 优化：固定宽高比
   ======================================== */

.card--gallery {
  position: relative;
  background: var(--hb-bg-card);
  border-radius: var(--hb-radius-lg);
  overflow: hidden;
  transition: all var(--hb-transition-normal);
  /* 性能优化：限制重绘范围 */
  contain: layout paint style;
  /* CLS 优化：固定宽高比 */
  aspect-ratio: 414 / 330;
}

.card--gallery:hover {
  transform: translateY(-4px);
  box-shadow: var(--hb-shadow-xl);
}

.card__cover {
  display: block;
  position: relative;
  overflow: hidden;
  /* CLS 优化：使用 aspect-ratio 固定宽高比 */
  aspect-ratio: 414 / 330;
  width: 100%;
  height: 100%;
  background: var(--hb-bg-surface);
}

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

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

/* 数量徽章 */
.card__count-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: var(--hb-space-1);
  padding: var(--hb-space-1) var(--hb-space-2);
  background: var(--hb-bg-overlay);
  backdrop-filter: blur(4px);
  border-radius: var(--hb-radius-md);
  font-size: var(--hb-font-size-sm);
  font-weight: var(--hb-font-semibold);
  color: var(--hb-text-primary);
  z-index: 2;
}

.card__count-badge--images {
  top: var(--hb-space-2);
  left: var(--hb-space-2);
}

.card__count-badge--videos {
  top: var(--hb-space-2);
  right: var(--hb-space-2);
  background: rgba(255, 59, 48, 0.9);
}

.card__count-icon {
  width: 14px;
  height: 14px;
}

.card__cover svg {
  position: absolute;
  bottom: var(--hb-space-3);
  right: var(--hb-space-3);
  width: 24px;
  height: 24px;
  stroke: var(--hb-text-primary);
  opacity: 0.5;
}

/* 标题栏 */
.card__title-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--hb-space-8) var(--hb-space-4) var(--hb-space-4);
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
}

.card__title {
  font-size: var(--hb-font-size-base);
  font-weight: var(--hb-font-semibold);
  color: var(--hb-text-primary);
  margin: 0 0 var(--hb-space-1) 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__meta {
  font-size: var(--hb-font-size-sm);
  color: var(--hb-text-muted);
  margin: 0;
}

/* 收藏按钮 */
.card__add {
  position: absolute;
  top: var(--hb-space-2);
  right: var(--hb-space-2);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hb-bg-overlay);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.8);
  transition: all var(--hb-transition-normal);
  z-index: 3;
}

.card--gallery:hover .card__add {
  opacity: 1;
  transform: scale(1);
}

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

.card__add svg {
  width: 18px;
  height: 18px;
  fill: var(--hb-text-primary);
}

/* 评分 */
.card__rating {
  position: absolute;
  bottom: var(--hb-space-2);
  left: var(--hb-space-2);
  display: flex;
  align-items: center;
  gap: var(--hb-space-1);
  padding: var(--hb-space-1) var(--hb-space-2);
  background: var(--hb-bg-overlay);
  backdrop-filter: blur(4px);
  border-radius: var(--hb-radius-sm);
  font-size: var(--hb-font-size-sm);
  color: var(--hb-text-muted);
  z-index: 2;
}

.card__rating svg {
  position: static;
  width: 14px;
  height: 14px;
  fill: currentColor;
  stroke: none;
  opacity: 1;
}

/* ========================================
   12. 图片宽高比
   CLS 优化：确保图片加载前后尺寸一致
   ======================================== */

.aspect-img-414x330 {
  aspect-ratio: 414 / 330;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 防止图片加载时的闪烁 */
  background: var(--hb-bg-surface);
}

/* 兼容不支持 aspect-ratio 的浏览器 */
@supports not (aspect-ratio: 414 / 330) {
  .aspect-img-414x330 {
    height: auto;
    min-height: 0;
    /* 使用 padding-bottom hack */
    padding-bottom: 79.71%; /* 330/414 ≈ 79.71% */
  }
}

.bd {
  border-radius: var(--hb-radius-md);
}

/* ========================================
   13. 视频容器
   ======================================== */

#vueBox {
  border-radius: var(--hb-radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  width: 100%;
  transform: translateZ(0);
}

#vueBox .vueBoxImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0 0 var(--hb-radius-lg) var(--hb-radius-lg);
  aspect-ratio: 16 / 9;
}

.el-carousel,
.el-carousel__container,
.el-carousel__item {
  height: 100%;
  overflow: hidden;
}

/* 隐藏轮播图滚动条 */
.el-carousel::-webkit-scrollbar,
.el-carousel__container::-webkit-scrollbar,
.el-carousel__item::-webkit-scrollbar,
#vueBox::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* ========================================
   14. 视频播放器错误状态
   ======================================== */

#err {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 9;
  height: 100%;
  width: 100%;
  object-fit: cover;
  border-radius: 0;
}

/* 主视频容器 */
.primary-video {
  margin-top: var(--hb-space-4);
  border-radius: var(--hb-radius-md);
  overflow: hidden;
}

#image-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--hb-bg-body);
}

/* ========================================
   15. 加载提示
   ======================================== */

.video-loading {
  padding: var(--hb-space-8) 0;
}

.spinner-border {
  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;
}

.spinner-border .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================
   16. 下载信息
   ======================================== */

.download-info {
  padding: var(--hb-space-3);
  background: var(--hb-bg-surface);
  border-radius: var(--hb-radius-sm);
  font-size: var(--hb-font-size-sm);
  color: var(--hb-text-muted);
}

.download-info .d-flex {
  display: flex;
}

.download-info .justify-content-between {
  justify-content: space-between;
}

.download-info .align-items-center {
  align-items: center;
}

.download-info .flex-wrap {
  flex-wrap: wrap;
}

.download-info span {
  margin-right: var(--hb-space-3);
}

/* ========================================
   17. 工具类补充
   ======================================== */

.d-block { display: block; }
.d-flex { display: flex; }
.d-none { display: none; }

.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-danger { color: var(--hb-error); }
.text-success { color: var(--hb-success); }
.text-warning { color: var(--hb-warning); }
.text-primary { color: var(--hb-primary); }

.fw-bold { font-weight: var(--hb-font-bold); }
.fw-semibold { font-weight: var(--hb-font-semibold); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--hb-space-1); }
.mb-2 { margin-bottom: var(--hb-space-2); }
.mb-3 { margin-bottom: var(--hb-space-3); }
.mb-4 { margin-bottom: var(--hb-space-4); }
.mb-5 { margin-bottom: var(--hb-space-5); }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--hb-space-2); }
.mt-3 { margin-top: var(--hb-space-3); }
.mt-4 { margin-top: var(--hb-space-4); }
.mt-5 { margin-top: var(--hb-space-5); }

.me-3 { margin-right: var(--hb-space-3); }

.py-3 { padding-top: var(--hb-space-3); padding-bottom: var(--hb-space-3); }
.py-4 { padding-top: var(--hb-space-4); padding-bottom: var(--hb-space-4); }

.btn-block { display: block; width: 100%; }
.btn-outline-primary {
  background: transparent;
  border: 1px solid var(--hb-primary);
  color: var(--hb-primary);
  padding: var(--hb-space-2) var(--hb-space-4);
  border-radius: var(--hb-radius-sm);
  cursor: pointer;
  transition: all var(--hb-transition-normal);
}

.btn-outline-primary:hover {
  background: var(--hb-primary);
  color: var(--hb-text-primary);
}

/* ========================================
   18. 广告管理器
   ======================================== */

.adManager {
  width: 100%;
  display: block;
}

/* ========================================
   19. 提示文字
   ======================================== */

.tipspmd {
  position: absolute;
  bottom: var(--hb-space-4);
  left: var(--hb-space-4);
  font-size: var(--hb-font-size-lg);
  font-weight: var(--hb-font-semibold);
  color: var(--hb-text-primary);
}

/* ========================================
   20. 底部 Logo
   ======================================== */

.footer_logo_img {
  width: 226px;
}
