/* ===================================
   Splatoon 3 Hub - 资源中心页面样式
   资源下载与友情链接
   =================================== */

/* 资源区域容器 */
.resources-section {
  padding: 60px 0;
}

.resources-section-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  text-align: center;
  margin-bottom: 16px;
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.4) !important;
}

.resources-section-subtitle {
  text-align: center;
  color: rgba(255, 255, 255, 0.95) !important;
  font-size: clamp(14px, 2vw, 18px);
  margin-bottom: 40px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8) !important;
}

/* 筛选按钮区域 - 复用gallery.css样式 */
.resources-filters,
.links-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 12px 28px;
  background: var(--bg-card);
  border: 2px solid transparent;
  border-radius: 50px;
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8) !important;
}

.filter-btn:hover {
  background: var(--bg-card-hover);
  color: #ffffff !important;
  transform: translateY(-2px);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8) !important;
}

.filter-btn.active {
  border-color: var(--splat-pink);
  color: #ffffff !important;
  background: rgba(255, 105, 180, 0.2);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8) !important;
}

/* 资源卡片网格 */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* 资源卡片 */
.resource-card {
  background: rgba(15, 20, 35, 0.95) !important;
  border: 2px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: var(--border-radius);
  padding: 24px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.resource-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg, var(--neon-pink), var(--neon-cyan), var(--neon-yellow));
  border-radius: calc(var(--border-radius) + 2px);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.resource-card:hover {
  transform: translateY(-8px);
  border-color: var(--splat-pink);
  box-shadow: 0 20px 40px rgba(230, 0, 126, 0.3);
}

.resource-card:hover::before {
  opacity: 1;
  animation: neonGlow 1.5s ease-in-out infinite;
}

.resource-card.hidden {
  display: none;
}

/* 资源卡片头部 */
.resource-card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.resource-card-icon {
  font-size: 40px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.resource-card-title-group {
  flex: 1;
  min-width: 0;
}

.resource-card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
  color: #ffffff !important;
  word-break: break-word;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8) !important;
}

.resource-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
}

.resource-card-size {
  display: flex;
  align-items: center;
  gap: 4px;
}

.resource-card-size::before {
  content: '📦';
  font-size: 10px;
}

.resource-card-date {
  display: flex;
  align-items: center;
  gap: 4px;
}

.resource-card-date::before {
  content: '🕐';
  font-size: 10px;
}

/* 资源卡片内容 */
.resource-card-desc {
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7) !important;
}

/* 资源卡片标签 */
.resource-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.resource-card-tag {
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
}

/* 资源卡片底部 */
.resource-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.resource-card-password {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85) !important;
  user-select: text;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
}

.resource-card-password code {
  padding: 2px 8px;
  background: rgba(230, 0, 126, 0.3) !important;
  border-radius: 4px;
  color: #ffffff !important;
  font-family: monospace;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
}

.resource-card-download {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--splat-magenta), var(--splat-purple));
  border: none;
  border-radius: 50px;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8) !important;
}

.resource-card-download:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(230, 0, 126, 0.4);
}

/* ===================================
   友情链接 - 按分类分块显示
   =================================== */

/* 快速跳转导航 */
.links-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
  position: sticky;
  top: 80px;
  z-index: 100;
  background: rgba(15, 15, 26, 0.95);
  padding: 16px;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.links-nav-loading {
  text-align: center;
  color: rgba(255, 255, 255, 0.6) !important;
}

.links-nav-btn {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8) !important;
}

.links-nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 62, 140, 0.3);
}

.links-nav-btn.active {
  background: var(--splat-pink);
  border-color: var(--splat-pink);
  box-shadow: 0 4px 20px rgba(230, 0, 126, 0.4);
}

/* 导航按钮分类颜色 */
.links-nav-btn[data-category="schedule"].active {
  background: #E6007E;
  border-color: #E6007E;
  box-shadow: 0 4px 20px rgba(230, 0, 126, 0.4);
}

.links-nav-btn[data-category="wiki"].active {
  background: #00A0E9;
  border-color: #00A0E9;
  box-shadow: 0 4px 20px rgba(0, 160, 233, 0.4);
}

.links-nav-btn[data-category="creative"].active {
  background: #FFF000;
  border-color: #FFF000;
  box-shadow: 0 4px 20px rgba(255, 240, 0, 0.4);
}

.links-nav-btn[data-category="stats"].active {
  background: #7CFC00;
  border-color: #7CFC00;
  box-shadow: 0 4px 20px rgba(124, 252, 0, 0.4);
}

.links-nav-btn[data-category="community"].active {
  background: #F39800;
  border-color: #F39800;
  box-shadow: 0 4px 20px rgba(243, 152, 0, 0.4);
}

.links-nav-btn[data-category="gaoshou"].active {
  background: #F39800;
  border-color: #F39800;
  box-shadow: 0 4px 20px rgba(243, 152, 0, 0.4);
}

/* 友链容器 */
.links-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* 友链加载状态 */
.links-loading {
  text-align: center;
  padding: 40px;
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 16px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7) !important;
}

.links-loading::after {
  content: '';
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 3px solid var(--splat-pink);
  border-top-color: transparent;
  border-radius: 50%;
  animation: inkSpin 1s linear infinite;
  margin-left: 12px;
  vertical-align: middle;
}

/* 友链分类区块 */
.links-category-block {
  scroll-margin-top: 120px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 依次延迟动画 */
.links-category-block:nth-child(1) { animation-delay: 0.1s; }
.links-category-block:nth-child(2) { animation-delay: 0.2s; }
.links-category-block:nth-child(3) { animation-delay: 0.3s; }
.links-category-block:nth-child(4) { animation-delay: 0.4s; }
.links-category-block:nth-child(5) { animation-delay: 0.5s; }
.links-category-block:nth-child(6) { animation-delay: 0.6s; }

.links-category-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px 24px;
  background: rgba(15, 20, 35, 0.9);
  border: 2px solid transparent;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.links-category-header:hover {
  border-color: var(--category-color, var(--splat-pink));
  box-shadow: 0 8px 25px var(--category-color, rgba(230, 0, 126, 0.2));
}

.links-category-header::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--category-color, var(--splat-pink));
  border-radius: 18px;
  z-index: -1;
  opacity: 0.2;
  transition: opacity 0.3s ease;
}

.links-category-header:hover::before {
  opacity: 0.3;
}

.links-category-icon {
  font-size: 36px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
}

.links-category-title {
  font-size: 24px;
  font-weight: 900;
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8) !important;
}

.links-category-count {
  margin-left: auto;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
}

/* 友链网格 */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.link-card {
  background: rgba(15, 20, 35, 0.95) !important;
  border: 2px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: var(--border-radius);
  padding: 20px;
  transition: all var(--transition-normal);
  text-decoration: none;
  display: block;
  position: relative;
  overflow: hidden;
}

.link-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--splat-cyan);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.link-card:hover {
  transform: translateX(8px);
  border-color: var(--splat-cyan);
  box-shadow: 0 10px 30px rgba(0, 160, 233, 0.3);
}

.link-card:hover::before {
  transform: scaleY(1);
}

.link-card.hidden {
  display: none;
}

/* 友链卡片头部 */
.link-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.link-card-favicon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.link-card-favicon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.link-card-favicon-fallback {
  font-size: 20px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.link-card-title-group {
  flex: 1;
  min-width: 0;
}

.link-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff !important;
  margin-bottom: 4px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8) !important;
}

.link-card-url {
  font-size: 12px;
  color: rgba(0, 229, 255, 0.9) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
}

.link-card-desc {
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 14px;
  margin-bottom: 12px;
  line-height: 1.5;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7) !important;
}

/* 友链卡片底部 */
.link-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.link-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.link-card-tag {
  padding: 4px 10px;
  background: rgba(0, 160, 233, 0.2);
  border-radius: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
}

.link-card-copy-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8) !important;
}

.link-card-copy-btn:hover {
  background: var(--splat-cyan);
  border-color: var(--splat-cyan);
  color: #ffffff !important;
}

.link-card-copy-btn.copied {
  background: var(--splat-green);
  border-color: var(--splat-green);
  color: #333333 !important;
}

/* 语言标签 */
.link-card-lang {
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
}

.link-card-lang.en { background: rgba(0, 160, 233, 0.25); }
.link-card-lang.ja { background: rgba(230, 0, 126, 0.25); }
.link-card-lang.zh { background: rgba(255, 240, 0, 0.25); }

/* 空状态 */
.resources-empty,
.links-empty {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.7) !important;
}

.resources-empty-icon,
.links-empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.8));
}

.resources-empty-text,
.links-empty-text {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.95) !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8) !important;
}

/* 分类颜色标识 */
.filter-btn[data-category="wallpaper"].active {
  border-color: #E6007E;
  color: #E6007E;
  background: rgba(230, 0, 126, 0.1);
}

.filter-btn[data-category="guide"].active {
  border-color: #00A0E9;
  color: #00A0E9;
  background: rgba(0, 160, 233, 0.1);
}

.filter-btn[data-category="material"].active {
  border-color: #FFF000;
  color: #FFF000;
  background: rgba(255, 240, 0, 0.1);
}

.filter-btn[data-category="tool"].active {
  border-color: #7CFC00;
  color: #7CFC00;
  background: rgba(124, 252, 0, 0.1);
}

/* 友链分类颜色 */
.filter-btn[data-category="schedule"].active {
  border-color: #E6007E;
  color: #E6007E;
  background: rgba(230, 0, 126, 0.1);
}

.filter-btn[data-category="wiki"].active {
  border-color: #00A0E9;
  color: #00A0E9;
  background: rgba(0, 160, 233, 0.1);
}

.filter-btn[data-category="creative"].active {
  border-color: #FFF000;
  color: #FFF000;
  background: rgba(255, 240, 0, 0.1);
}

.filter-btn[data-category="stats"].active {
  border-color: #7CFC00;
  color: #7CFC00;
  background: rgba(124, 252, 0, 0.1);
}

.filter-btn[data-category="community"].active {
  border-color: #F39800;
  color: #F39800;
  background: rgba(243, 152, 0, 0.1);
}

/* 友链卡片左侧边框颜色 */
.link-card[data-category="schedule"]::before { background: #E6007E; }
.link-card[data-category="wiki"]::before { background: #00A0E9; }
.link-card[data-category="creative"]::before { background: #FFF000; }
.link-card[data-category="stats"]::before { background: #7CFC00; }
.link-card[data-category="community"]::before { background: #F39800; }

.link-card[data-category="schedule"]:hover { border-color: #E6007E; box-shadow: 0 10px 30px rgba(230, 0, 126, 0.3); }
.link-card[data-category="wiki"]:hover { border-color: #00A0E9; box-shadow: 0 10px 30px rgba(0, 160, 233, 0.3); }
.link-card[data-category="creative"]:hover { border-color: #FFF000; box-shadow: 0 10px 30px rgba(255, 240, 0, 0.3); }
.link-card[data-category="stats"]:hover { border-color: #7CFC00; box-shadow: 0 10px 30px rgba(124, 252, 0, 0.3); }
.link-card[data-category="community"]:hover { border-color: #F39800; box-shadow: 0 10px 30px rgba(243, 152, 0, 0.3); }

.link-card-tag[data-category="schedule"] { background: rgba(230, 0, 126, 0.15); color: #E6007E; }
.link-card-tag[data-category="wiki"] { background: rgba(0, 160, 233, 0.15); color: #00A0E9; }
.link-card-tag[data-category="creative"] { background: rgba(255, 240, 0, 0.15); color: #FFF000; }
.link-card-tag[data-category="stats"] { background: rgba(124, 252, 0, 0.15); color: #7CFC00; }
.link-card-tag[data-category="community"] { background: rgba(243, 152, 0, 0.15); color: #F39800; }

/* 响应式 */
@media (max-width: 768px) {
  .resources-hero h1 {
    font-size: 32px;
  }

  .resources-grid {
    grid-template-columns: 1fr;
  }

  .resources-quick-nav {
    flex-direction: column;
    align-items: center;
  }

  .resource-card-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .resource-card-download {
    justify-content: center;
  }

  .link-card-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .link-card-copy-btn {
    justify-content: center;
  }

  /* 友链分类导航 - 移动端 */
  .links-nav {
    top: 70px;
    padding: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .links-nav::-webkit-scrollbar {
    display: none;
  }

  .links-nav-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    font-size: 12px;
    white-space: nowrap;
  }

  /* 友链分类区块 - 移动端 */
  .links-category-header {
    padding: 12px 16px;
  }

  .links-category-icon {
    font-size: 28px;
  }

  .links-category-title {
    font-size: 18px;
  }

  .links-category-count {
    font-size: 12px;
    padding: 4px 12px;
  }

  /* 友链网格 - 移动端 */
  .links-grid {
    grid-template-columns: 1fr;
  }

  .links-container {
    gap: 24px;
  }
}

/* 移动端底部导航存在时的适配 */
@media (max-width: 768px) {
  .links-nav {
    top: calc(70px + var(--safe-area-top, 0px));
  }

  .links-category-block {
    scroll-margin-top: 140px;
  }
}

/* 加载动画 */
.resources-loading,
.links-loading {
  text-align: center;
  padding: 40px;
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 16px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7) !important;
}

.resources-loading::after,
.links-loading::after {
  content: '';
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 3px solid var(--splat-pink);
  border-top-color: transparent;
  border-radius: 50%;
  animation: inkSpin 1s linear infinite;
  margin-left: 12px;
  vertical-align: middle;
}
