.hero-search {
  position: relative;

  /* [修改] 将纯色背景改为深色动态渐变 */
  /* 颜色取值：极夜黑 -> 深科技蓝 -> 暗霓虹紫 */
  background: linear-gradient(-45deg, #050508, #0f172a, #1a1025, #000000);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  /* 15秒缓慢呼吸流动 */

  padding: 6rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
  z-index: 1;
}

/* [新增] 背景流动动画关键帧 */
@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* 核心画布样式 */
#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  /* 放在内容下方 */
  opacity: 0.8;
  /* 稍微透明一点，让文字更清晰 */
}

/* 内容区域保持层级 */
.hero-content {
  position: relative;
  z-index: 2;
  /* 确保文字在画布之上 */
  max-width: 800px;
  margin: 0 auto;
  /* 增强文字阴影，防止背景光点干扰文字阅读 */
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
}

/* [修改] 标题：高亮多彩流光渐变 */
.hero-content h1 {
  font-size: 3.5rem;
  /* 字体加大，增强气势 */
  font-weight: 800;
  /* 加粗，让渐变色更明显 */
  margin-bottom: 1rem;
  letter-spacing: -1px;
  /* 紧凑一点更现代 */

  /* 定义高亮多彩渐变：青 -> 蓝 -> 紫 -> 红 -> 橙 -> 青 (首尾相接) */
  background: linear-gradient(90deg,
      #00ffcc 0%,
      /* 亮青 */
      #0099ff 20%,
      /* 科技蓝 */
      #bf00ff 40%,
      /* 霓虹紫 */
      #ff0055 60%,
      /* 激进红 */
      #ffcc00 80%,
      /* 活力黄 */
      #00ffcc 100%
      /* 回到亮青 */
    );

  background-size: 200% auto;
  /* 放大背景以支持流动 */

  /* 文字裁切核心代码 */
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  /* 增加流光速度，更具动感 */
  animation: shineText 4s linear infinite;

  /* [关键] 添加霓虹发光辉光，让文字“亮”起来 */
  filter: drop-shadow(0 0 15px rgba(0, 255, 204, 0.3));
}

/* 定义流光动画关键帧 (背景水平移动) */
@keyframes shineText {
  0% {
    background-position: 0% center;
  }

  100% {
    background-position: 200% center;
  }
}

/* [修改] 副标题改为高亮白 */
.hero-content p {
  color: #eeeeee;
  /* 从之前的暗灰色改为亮白灰 */
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  letter-spacing: 0.5px;
  opacity: 0.9;
}

/* 搜索框 */
.search-box-wrapper {
  position: relative;
  max-width: 600px;
  margin: 0 auto 1.5rem auto;
  display: flex;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  /* 增加搜索框立体感 */
  border-radius: 50px;
}

.main-search-input {
  width: 100%;
  padding: 1rem 1.5rem;
  padding-right: 3.5rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  /* 玻璃拟态效果 */
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: 1.1rem;
  outline: none;
  transition: all 0.3s;
}

.main-search-input:focus {
  border-color: var(--primary);
  background: rgba(20, 20, 20, 0.8);
  box-shadow: 0 0 20px rgba(0, 122, 204, 0.3);
}

.search-btn {
  position: absolute;
  right: 5px;
  top: 5px;
  bottom: 5px;
  width: 46px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background 0.2s;
}

.search-btn:hover {
  background: var(--accent);
}

/* 热门标签 */
.hot-tags {
  font-size: 0.9rem;
  color: #aaa;
  /* 标签引导语稍微暗一点，突显链接 */
}

.hot-tags span {
  margin-right: 5px;
}

.hot-tags a {
  color: #fff;
  /* 标签文字改为白色 */
  text-decoration: none;
  margin: 0 5px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  /* 半透明白背景 */
  transition: all 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hot-tags a:hover {
  color: #fff;
  background: var(--primary);
  /* 悬停变蓝 */
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(0, 122, 204, 0.4);
}

/* --- 主容器与筛选 --- */
.main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* 整合包专区样式 */
.pack-banner {
  background: rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 3rem;
  border: 1px solid rgba(139, 92, 246, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 0 50px rgba(124, 58, 237, 0.15), 0 16px 48px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.pack-banner::after {
  content: '';
  position: absolute;
  right: -60px;
  top: -60px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.pack-info h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.8rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pack-tag {
  background: linear-gradient(92deg, #7c3aed, #06b6d4);
  color: #fff;
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 999px;
  vertical-align: middle;
}

.pack-info p {
  color: #9aa1b2;
  margin: 0;
  max-width: 600px;
  line-height: 1.6;
}

.pack-actions {
  display: flex;
  gap: 1rem;
  z-index: 2;
}

.pack-btn {
  background: linear-gradient(92deg, #7c3aed, #8b5cf6 45%, #06b6d4);
  color: white;
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 22px rgba(124, 58, 237, 0.4);
}

.pack-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(124, 58, 237, 0.6);
}

.pack-btn.secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.pack-btn.secondary:hover {
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: none;
}

.pack-meta {
  display: flex;
  flex-wrap: wrap;
  /* 移动端自动换行 */
  gap: 1rem;
  margin-top: 1.2rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #9aa1b2;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: all 0.3s;
}

.meta-item:hover {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.45);
  color: #fff;
}

.meta-icon {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* 高亮标签样式 (如：稳定版) */
.meta-item.highlight {
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.1);
  border-color: rgba(34, 211, 238, 0.35);
}

/* 响应式调整：手机端调整间距 */
@media (max-width: 768px) {
  .pack-meta {
    justify-content: center;
    /* 居中显示 */
    gap: 0.8rem;
  }
}

/* 筛选工具栏 */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.filter-group {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.filter-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #9aa1b2;
  padding: 0.4rem 1.2rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
  /* [关键修改] 默认设为 600，防止点击时宽度跳动 */
  font-weight: 600;
}

.filter-pill:hover,
.filter-pill.active {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.55);
  color: #fff;
}

.filter-pill.active {
  background: linear-gradient(92deg, #7c3aed, #06b6d4);
  border-color: transparent;
  box-shadow: 0 4px 18px rgba(124, 58, 237, 0.45);
}

.sort-select {
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.04)
    url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa1b2' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E")
    no-repeat right 14px center;
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.45rem 2.6rem 0.45rem 1.1rem;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
}

.sort-select:hover {
  border-color: rgba(139, 92, 246, 0.55);
  color: #fff;
}

.sort-select:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

.sort-select option {
  background: #14141c;
  color: #e8eaf0;
}

/* --- 资源卡片 --- */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.res-card {
  background-color: rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  position: relative;
  display: flex;
  flex-direction: column;
}

.res-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.5);
}

.res-img-box {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  font-weight: bold;
  font-size: 1.2rem;
}

.type-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  color: #fff;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
}

.type-badge.workflow {
  background: rgba(139, 92, 246, 0.85);
}

.type-badge.checkpoint {
  background: rgba(232, 121, 249, 0.8);
}

.type-badge.lora {
  background: rgba(34, 211, 238, 0.75);
}

.hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.res-card:hover .hover-overlay {
  opacity: 1;
}

.quick-view-btn {
  background: rgba(255, 255, 255, 0.9);
  color: #000;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  transform: translateY(10px);
  transition: transform 0.2s;
}

.res-card:hover .quick-view-btn {
  transform: translateY(0);
}

.res-info {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.res-title {
  font-size: 1rem;
  margin: 0 0 0.8rem 0;
  line-height: 1.4;
  color: #fff;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.res-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #9aa1b2;
}

.author {
  display: flex;
  align-items: center;
  gap: 6px;
}

.avatar {
  width: 20px;
  height: 20px;
  background: #555;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: #fff;
}

.stats {
  display: flex;
  gap: 10px;
}

/* 按钮悬停效果增强 */
#load-more-btn:hover {
  border-color: rgba(139, 92, 246, 0.6) !important;
  color: #fff !important;
  background: rgba(139, 92, 246, 0.12) !important;
}

/* 新增卡片的进入动画 */
.fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================
   [新增] 快速预览弹窗样式
   ========================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  /* 深色遮罩 */
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: none;
  /* 默认隐藏 */
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: #1e1e1e;
  width: 90%;
  max-width: 800px;
  border-radius: 16px;
  border: 1px solid #333;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--primary);
}

.modal-body {
  display: flex;
  flex-direction: column;
}

/* 模拟大图区域 */
.modal-img-placeholder {
  height: 300px;
  width: 100%;
  background: #252526;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #555;
}

.modal-info {
  padding: 2rem;
  text-align: left;
}

.modal-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-bottom: 1rem;
  background: #333;
  color: #fff;
}

.modal-info h2 {
  margin: 0 0 0.5rem 0;
  color: #fff;
}

.modal-info p {
  color: #888;
  margin-bottom: 2rem;
}

.modal-actions {
  display: flex;
  gap: 1rem;
}

.action-btn {
  padding: 10px 24px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.action-btn.download {
  background: var(--primary);
  color: #fff;
}

.action-btn.detail {
  background: #333;
  color: #ccc;
}

@media (min-width: 768px) {
  .modal-body {
    flex-direction: row;
  }

  .modal-img-placeholder {
    width: 50%;
    height: auto;
    min-height: 400px;
  }

  .modal-info {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .pack-banner {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .pack-info p {
    margin-bottom: 1rem;
  }

  .pack-actions {
    flex-direction: column;
    width: 100%;
  }

  .pack-btn {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    justify-content: center;
  }

  .hero-content h1 {
    font-size: 2rem;
  }
}

