/**
 * CoserBox 前台专用样式表
 * 包含图集卡片、分页、导航、网格布局等前台组件
 * @author ike
 * @date 2025-12-19
 */

/* ============================================
   图集卡片
   ============================================ */
.image-card {
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-card:hover {
  transform: translateY(-4px);
}

.image-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  border-radius: 0.75rem;
}

.image-card-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.35);
}

/* 封面图片区域 */
.card-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 0.75rem;
  background-color: var(--bg-tertiary);
  flex-shrink: 0;
}

.image-card:hover .card-cover {
  box-shadow: var(--shadow-hover);
}

/* 卡片底部信息区域 */
.card-info {
  padding: 0.125rem 0 0;
  text-align: left;
}

/* 卡片标题 */
.card-title {
  font-size: 0.8125rem;
  font-weight: 500;
  margin: 0 0 0.25rem 0;
  line-height: 1.4;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

/* 卡片底部元信息 */
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* 分类信息容器 */
.card-category {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
  flex: 1;
}

a.card-category {
  position: relative;
  z-index: 2;
}

/* 分类头像 */
.card-category-avatar {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background-color: var(--bg-tertiary);
}

.card-category-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 分类名称 */
.card-category-name {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

/* 收藏按钮 */
.card-favorite-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: color 0.2s ease;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.card-favorite-btn:hover {
  color: #FF2442;
}

.card-favorite-btn.is-favorited {
  color: #FF2442;
}

.card-favorite-btn svg {
  transition: transform 0.2s ease;
}

.card-favorite-btn:hover svg {
  transform: scale(1.15);
}

/* 收藏心形弹跳动画 */
@keyframes favorite-bounce {

  0%,
  100% {
    transform: scale(1);
  }

  15% {
    transform: scale(1.3);
  }

  30% {
    transform: scale(0.9);
  }

  45% {
    transform: scale(1.2);
  }

  60% {
    transform: scale(0.95);
  }

  75% {
    transform: scale(1.1);
  }
}

.card-favorite-btn.is-favorited svg {
  animation: favorite-bounce 0.6s ease-out;
}

.card-favorite-btn.favorite-animating svg {
  animation: favorite-bounce 0.6s ease-out !important;
}

/* 媒体数量标签 */
.media-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.0625rem 0.3rem;
  border-radius: 0.25rem;
  font-size: 0.625rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.media-count-image {
  background: #00C853;
}

.media-count-video {
  background: #FF2442;
}

.media-count-folder {
  background: #333333;
}

/* ============================================
   通用卡片
   ============================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* ============================================
   表单元素
   ============================================ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background-color: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(255, 36, 66, 0.1);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

/* ============================================
   按钮样式
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-hover);
  border-color: var(--text-muted);
}

/* ============================================
   表格样式
   ============================================ */
table {
  width: 100%;
  background-color: var(--bg-card);
  border-radius: 0.5rem;
  overflow: hidden;
  border-collapse: collapse;
}

th {
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
}

td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.875rem;
}

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

tbody tr {
  transition: background-color 0.15s ease;
}

tbody tr:hover {
  background-color: var(--bg-hover);
}

/* ============================================
   徽章和标签
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  background: var(--color-primary);
  color: white;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.tag:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* VIP 徽章基础样式 */
.vip-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 9999px;
  font-weight: 500;
}

/* VIP 徽章分等级颜色 - 纯色系 */
/* 注册会员 - 灰色 */
.vip-badge-normal {
  background: #999999;
  color: #ffffff;
}

/* 小会员 - 绿色 */
.vip-badge-small {
  background: #00C853;
  color: #ffffff;
}

/* 大会员 - 蓝色 */
.vip-badge-big {
  background: #007AFF;
  color: #ffffff;
}

/* 臻享大会员 - 金色 */
.vip-badge-premium {
  background: #FF9500;
  color: #ffffff;
}

/* 年费会员 - 主色红 */
.vip-badge-year {
  background: #FF2442;
  color: #ffffff;
}

/* 养服大佬 - 深金 */
.vip-badge-supreme {
  background: #D4A017;
  color: #ffffff;
}

/* ============================================
   网格布局
   ============================================ */
.grid-auto-fill {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .grid-auto-fill {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }
}

/* ============================================
   分页
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.pagination a {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.pagination a:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--color-primary);
}

.pagination .active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* ============================================
   统计卡片
   ============================================ */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.stat-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

/* ============================================
   头部导航
   ============================================ */
.header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-link.active {
  color: var(--color-primary);
}

/* ============================================
   空状态
   ============================================ */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-tertiary);
}

.empty-state svg {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  opacity: 0.5;
}

/* ============================================
   模态框
   ============================================ */
.modal-overlay {
  background: rgba(0, 0, 0, 0.5);
}

html.dark .modal-overlay {
  background: rgba(0, 0, 0, 0.7);
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-lg);
}

/* ============================================
   下拉菜单
   ============================================ */
.dropdown-menu {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
}

.dropdown-item {
  display: block;
  padding: 0.625rem 1rem;
  color: var(--text-primary);
  transition: all 0.15s ease;
}

.dropdown-item:hover {
  background: var(--bg-hover);
}

/* ============================================
   告警和提示
   ============================================ */
.alert {
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--color-success);
  color: var(--color-success);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--color-warning);
  color: var(--color-warning);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--color-error);
  color: var(--color-error);
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--color-info);
  color: var(--color-info);
}

/* ============================================
   常驻公告 Announcement
   ============================================ */
.announcement-notice {
  border-radius: 0.75rem;
  padding: 0.875rem 1.25rem;
}

/* 浅色模式下的样式 */
html:not(.dark) .announcement-notice {
  background: #F5F5F5;
  border: 1px solid #EEEEEE;
}

/* 深色模式下的样式 */
html.dark .announcement-notice {
  background: #141414;
  border: 1px solid #1A1A1A;
}

.announcement-notice-content {
  font-size: 0.875rem;
  line-height: 1.6;
}

/* 浅色模式下的文字颜色 */
html:not(.dark) .announcement-notice-content {
  color: var(--text-primary);
}

/* 深色模式下的文字颜色 */
html.dark .announcement-notice-content {
  color: #e2e8f0;
}

.announcement-notice-content p {
  margin: 0;
}

.announcement-notice-content a {
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.announcement-notice-content a:hover {
  text-decoration: underline;
}

/* 浅色模式下链接颜色 */
html:not(.dark) .announcement-notice-content a {
  color: #FF2442;
}

html:not(.dark) .announcement-notice-content a:hover {
  color: #E6203B;
}

/* 深色模式下链接颜色 */
html.dark .announcement-notice-content a {
  color: #FF2442;
}

html.dark .announcement-notice-content a:hover {
  color: #FF6B81;
}

/* 公告内容中的强调文字 - 不强制颜色，使用用户设置的颜色或继承 */
.announcement-notice-content strong,
.announcement-notice-content b {
  font-weight: 600;
}

/* 公告内容中的斜体 - 不强制颜色，使用用户设置的颜色或继承 */
.announcement-notice-content em,
.announcement-notice-content i {
  font-style: italic;
}

/* 公告内容中的下划线 */
.announcement-notice-content u {
  text-decoration: underline;
}

/* 多个公告间距 */
.announcement-notice+.announcement-notice {
  margin-top: 0.5rem;
}

/* ============================================
   移动端底部导航栏
   ============================================ */

/* 导航栏背景变量 */
:root {
  --bg-nav: rgba(255, 255, 255, 0.85);
}

html.dark {
  --bg-nav: rgba(15, 23, 42, 0.85);
}

/* 导航项样式 */
.mobile-nav-item {
  color: var(--text-muted);
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item:active {
  transform: scale(0.95);
}

.mobile-nav-item.active,
.mobile-nav-item[class*="active"] {
  color: var(--color-primary);
}

.mobile-nav-item svg {
  stroke-width: 1.5;
}

.mobile-nav-item.active svg,
.mobile-nav-item[class*="active"] svg {
  stroke-width: 2;
}

/* 页面内容底部间距适配 - 移动端需要给底部导航留空间 */
@media (max-width: 767px) {
  main {
    padding-bottom: 4.5rem !important;
  }
}

/* 回到顶部按钮位置由 Tailwind 类控制（bottom-20 right-4 md:bottom-8 md:right-8） */
/* 与左下角 Crisp 客服按钮对称 */

/* ============================================
   统一搜索框组件
   用于全站前台搜索框的标准样式
   ============================================ */

/* 搜索框容器 - 圆角矩形 */
.search-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 2.75rem;
  padding: 0 1rem;
  background: var(--bg-tertiary);
  border-radius: 0.75rem;
  transition: background 0.2s ease;
}

.search-box:focus-within {
  background: var(--bg-input);
}

/* 搜索框内的输入框 - 完全透明，无边框 */
.search-box input {
  flex: 1;
  min-width: 0;
  width: auto;
  height: 100%;
  padding: 0;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.search-box input:focus {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

/* 搜索框图标 */
.search-box .search-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--text-muted);
}

/* 搜索框按钮（可选） */
.search-box button {
  flex-shrink: 0;
  padding: 0.25rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.search-box button:hover {
  color: var(--text-secondary);
}

/* 搜索框尺寸变体 - 大尺寸（搜索结果页） */
.search-box-lg {
  height: 3.5rem;
  padding: 0 1.25rem;
  border-radius: 1rem;
}

.search-box-lg input {
  font-size: 1rem;
}

.search-box-lg .search-icon {
  width: 1.5rem;
  height: 1.5rem;
}

/* 搜索框尺寸变体 - 小尺寸（筛选框） */
.search-box-sm {
  height: 2.25rem;
  padding: 0 0.75rem;
  gap: 0.5rem;
  border-radius: 0.5rem;
}

.search-box-sm input {
  font-size: 0.75rem;
}

.search-box-sm .search-icon {
  width: 1rem;
  height: 1rem;
}

/* ============================================
   纯色背景和强调文字
   ============================================ */
.gradient-bg {
  background: var(--color-primary);
}

.gradient-text {
  color: var(--color-primary);
}

/* ============================================
   成功按钮（权益解锁）
   ============================================ */
.btn-success {
  background: #00C853;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-success:hover {
  background: #00B048;
  transform: translateY(-1px);
}

/* ============================================
   警告文字
   ============================================ */
.text-warning {
  color: #f59e0b;
}

.text-muted {
  color: var(--text-muted);
}

/* ============================================
   图集合集大卡片 (folder-card)
   用于机构合集展示 type=2
   ============================================ */
.folder-card {
  width: 100%;
  height: 100%;
}

.folder-card-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.folder-card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 0.75rem;
  overflow: hidden;
  background-color: var(--bg-tertiary);
}

.folder-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: all 1.5s ease;
}

.folder-card-link:hover .folder-card-cover img {
  object-position: bottom;
  transform: scale(1.05);
}

/* 遮罩层 */
.folder-card-mask {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* 收藏按钮 */
.folder-card-collect {
  pointer-events: auto;
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.5);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0;
}

.folder-card-link:hover .folder-card-collect {
  opacity: 1;
}

.folder-card-collect:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: scale(1.1);
}

.folder-card-collect.is-subscribed {
  opacity: 1;
  color: #FF2442;
}

.folder-card-collect.is-subscribed svg {
  transform: rotate(45deg);
}

/* 图集数量 */
.folder-card-count {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 0.5rem;
  background: rgba(66, 62, 62, 0.55);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
}

/* 更新红点 */
.folder-card-new-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: #FF2442;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* 标题 */
.folder-card-title {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

/* ============================================
   图集合集小卡片 (folder-mini-card)
   用于个人合集密集展示 type=1
   ============================================ */
.folder-mini-card {
  width: 100%;
  height: 100%;
}

.folder-mini-card-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.folder-mini-card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 0.625rem;
  overflow: hidden;
  background-color: var(--bg-tertiary);
}

.folder-mini-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: all 1.5s ease;
}

.folder-mini-card-link:hover .folder-mini-card-cover img {
  object-position: bottom;
  transform: scale(1.05);
}

/* 遮罩层 */
.folder-mini-card-mask {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* 收藏按钮 */
.folder-mini-card-collect {
  pointer-events: auto;
  position: absolute;
  bottom: 0.375rem;
  right: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 0.375rem;
  background: rgba(0, 0, 0, 0.5);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0;
}

.folder-mini-card-link:hover .folder-mini-card-collect {
  opacity: 1;
}

.folder-mini-card-collect:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: scale(1.1);
}

.folder-mini-card-collect.is-subscribed {
  opacity: 1;
  color: #FF2442;
}

.folder-mini-card-collect.is-subscribed svg {
  transform: rotate(45deg);
}

/* 图集数量 */
.folder-mini-card-count {
  position: absolute;
  top: 0.375rem;
  right: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.125rem;
  padding: 0.125rem 0.375rem;
  border-radius: 0.375rem;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.folder-mini-card-count-icon {
  width: 0.625rem;
  height: 0.625rem;
  opacity: 0.9;
}

/* 更新红点 */
.folder-mini-card-new-dot {
  width: 0.3125rem;
  height: 0.3125rem;
  border-radius: 50%;
  background: #FF2442;
  animation: pulse-dot 2s infinite;
}

/* 标题 */
.folder-mini-card-title {
  margin-top: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  line-height: 1.3;
}

/* 移动端适配 */
@media (max-width: 640px) {
  .folder-card-title {
    font-size: 0.8125rem;
  }

  .folder-mini-card-title {
    font-size: 0.6875rem;
    margin-top: 0.25rem;
  }

  .folder-mini-card-count {
    font-size: 0.5625rem;
    padding: 0.0625rem 0.25rem;
  }
}

/* ============================================
   公告列表
   ============================================ */
.notice-list .notice-item:last-child {
  border-bottom: none !important;
}

.notice-item:hover .notice-title {
  color: var(--color-primary);
}

.notice-item .notice-index {
  transition: transform 0.2s ease;
}

.notice-item:hover .notice-index {
  transform: scale(1.1);
}

/* ============================================
   骨架屏组件
   加载占位效果，与 image-card 保持相同布局
   ============================================ */
.skeleton-card {
  display: flex;
  flex-direction: column;
}

.skeleton-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 0.75rem;
  background-color: var(--bg-tertiary);
  overflow: hidden;
}

.skeleton-badge {
  width: 2rem;
  height: 1.25rem;
  border-radius: 0.375rem;
  background-color: var(--bg-secondary);
}

.skeleton-info {
  padding: 0.125rem 0 0;
}

.skeleton-title {
  height: 1rem;
  border-radius: 0.25rem;
  background-color: var(--bg-tertiary);
  margin-bottom: 0.5rem;
  width: 85%;
}

.skeleton-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.skeleton-avatar {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background-color: var(--bg-tertiary);
}

.skeleton-name {
  width: 3rem;
  height: 0.75rem;
  border-radius: 0.25rem;
  background-color: var(--bg-tertiary);
}

.skeleton-count {
  width: 2rem;
  height: 0.75rem;
  border-radius: 0.25rem;
  background-color: var(--bg-tertiary);
}

/* 骨架屏闪烁动画 */
.skeleton-animate {
  background: linear-gradient(90deg,
      var(--bg-tertiary) 0%,
      var(--bg-secondary) 50%,
      var(--bg-tertiary) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ============================================
   空状态组件
   列表无数据时的友好提示
   ============================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.empty-state-icon {
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

.empty-state-icon svg {
  width: 6rem;
  height: 6rem;
}

.empty-state-text {
  margin-bottom: 1.5rem;
}

.empty-state-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}

.empty-state-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.empty-state-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  background: var(--color-primary);
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.empty-state-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* ============================================
   瀑布流加载组件
   滚动加载更多内容
   ============================================ */

/* 加载更多容器 */
.load-more-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem 0;
}

/* 加载中动画 */
.load-more-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
}

.load-more-spinner span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: var(--color-primary);
  animation: load-more-bounce 1.4s ease-in-out infinite both;
}

.load-more-spinner span:nth-child(1) {
  animation-delay: -0.32s;
}

.load-more-spinner span:nth-child(2) {
  animation-delay: -0.16s;
}

.load-more-spinner span:nth-child(3) {
  animation-delay: 0s;
}

@keyframes load-more-bounce {

  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.5;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* 加载进度文字 */
.load-more-progress {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* 加载完成状态 */
.load-more-end {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.load-more-end::before,
.load-more-end::after {
  content: '';
  width: 2rem;
  height: 1px;
  background: var(--border-color);
}

/* 卡片入场动画 */
.gallery-grid-item {
  animation: gallery-card-enter 0.4s ease-out forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes gallery-card-enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 渐进式动画延迟 */
.gallery-grid-item:nth-child(1) {
  animation-delay: 0s;
}

.gallery-grid-item:nth-child(2) {
  animation-delay: 0.05s;
}

.gallery-grid-item:nth-child(3) {
  animation-delay: 0.1s;
}

.gallery-grid-item:nth-child(4) {
  animation-delay: 0.15s;
}

.gallery-grid-item:nth-child(5) {
  animation-delay: 0.2s;
}

.gallery-grid-item:nth-child(6) {
  animation-delay: 0.25s;
}

.gallery-grid-item:nth-child(n+7) {
  animation-delay: 0.3s;
}

/* 禁用动画（用于偏好减少动画的用户） */
@media (prefers-reduced-motion: reduce) {
  .skeleton-animate {
    animation: none;
  }

  .gallery-grid-item {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .load-more-spinner span {
    animation: none;
    opacity: 1;
    transform: none;
  }
}