﻿/* assets/css/pages/decks.css */

/* 页面允许滚动 */
body {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* topbar 样式复用 ui.css 的 .topbar，这里只写页面布局相关内容 */

.gallery-container {
  /* 给 fixed topbar 预留空间 */
  padding: 90px 20px 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
}

/* === 筛选器 === */
.filter-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 10;
}

.filter-btn {
  padding: 8px 24px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}
.filter-btn:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}
.filter-btn.active {
  background: var(--accent);
  color: #0e0f12;
  font-weight: 700;
  border-color: var(--accent);
  box-shadow: 0 4px 15px rgba(120,190,255,0.4);
}

/* === 卡牌网格 === */
.deck-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 30px 15px;
  padding-bottom: 60px;
}

/* === 卡牌项 === */
.gallery-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  position: relative;
  animation: float-gallery 6s ease-in-out infinite;
  will-change: transform;
}
.gallery-item:nth-child(3n) { animation-delay: 0s; }
.gallery-item:nth-child(3n+1) { animation-delay: 2s; }
.gallery-item:nth-child(3n+2) { animation-delay: 4s; }

.g-card-img {
  width: 100%;
  aspect-ratio: 0.58; /* 保持卡牌比例，避免图片高度塌陷 */
  border-radius: 10px;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s;
  position: relative;
}
.gallery-item:hover .g-card-img {
  transform: scale(1.12) translateY(-8px);
  box-shadow: 0 20px 40px rgba(120,190,255,0.25);
  z-index: 100;
  outline: 2px solid rgba(120,190,255,0.6);
}

.g-card-name {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 1px;
  transition: color 0.2s;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}
.gallery-item:hover .g-card-name {
  color: #fff;
  font-weight: 600;
}

@keyframes float-gallery {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* 恢复页面正常文档流与滚动 */
.page {
  height: auto !important;
  min-height: 100vh;
  overflow: visible !important;
}
