/* Category Page Styles */

/* Hero Section Animations */
.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  opacity: 0.9;
  z-index: 1;
}

.hero-section > * {
  position: relative;
  z-index: 2;
}

/* Filter Section */
.filter-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.filter-button {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.filter-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.filter-button.active {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Game Grid Animations */
.game-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
}

/* Game Card Description Line Clamp */
.game-card .line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
  height: 3em; /* 固定高度：2行 × 1.5行高 */
}

.game-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.game-card.hidden {
  opacity: 0;
  transform: scale(0.8) translateY(20px);
  pointer-events: none;
}

.game-card.show {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

/* Game Card Image Hover Effect */
.game-card img {
  transition: transform 0.3s ease;
}

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

/* Load More Button */
.load-more-btn {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.load-more-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.load-more-btn:hover::before {
  left: 100%;
}

.load-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

/* FAQ Section */
.faq-item {
  transition: all 0.3s ease;
  border-radius: 8px;
  overflow: hidden;
}

.faq-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.faq-question {
  transition: all 0.3s ease;
  cursor: pointer;
}

.faq-question:hover {
  background-color: #f8fafc;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 1.5rem;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer.open {
  max-height: 200px;
  padding: 1.5rem;
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-icon.rotate {
  transform: rotate(180deg);
}

/* Related Categories */
.related-category-card {
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.related-category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, #ffffff, #f1f5f9);
}

/* Breadcrumb */
.breadcrumb {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.breadcrumb a {
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: #3b82f6;
}

/* Responsive Grid Animations */
@media (max-width: 768px) {
  .game-card:hover {
    transform: translateY(-4px);
  }
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading .game-card {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Focus States for Accessibility */
.filter-button:focus,
.load-more-btn:focus,
.faq-question:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .filter-section,
  .load-more-btn {
    display: none;
  }
  
  .game-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #e5e7eb;
  }
}