/* ==========================================
   游戏库页面样式
   ==========================================

   图片尺寸要求：
   1. 游戏列表卡片封面
      - 比例：16:9 横版（强制）
      - 格式：SVG、WebP、PNG
      - 建议：640x360 或更高分辨率（至少 1280x720）
      - 存储：images/games/ 目录

   ========================================== */

/* ==========================================
   游戏筛选器
   ========================================== */

.game-filters {
  background: linear-gradient(135deg, var(--bg-light) 0%, #FFF8F0 100%);
  padding: 32px 0;
  margin-bottom: var(--spacing-xxl);
  position: relative;
  overflow: hidden;
}

.game-filters::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 153, 102, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

.game-filters .container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 筛选器主行 */
.filters-main-row {
  display: flex;
  align-items: center;
  gap: 24px;
  background: rgba(255, 255, 255, 0.8);
  padding: 16px 24px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  flex-wrap: wrap;
}

.filter-section {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.filter-pill {
  padding: 8px 18px;
  border: 2px solid var(--border-light);
  border-radius: 50px;
  background: var(--bg-white);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  position: relative;
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-pill:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 153, 102, 0.2);
}

.filter-pill.active {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  color: var(--text-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 153, 102, 0.4);
}

.filter-divider {
  width: 2px;
  height: 40px;
  background: linear-gradient(180deg, transparent, var(--border-light), transparent);
  flex-shrink: 0;
}

/* 搜索区域 */
.search-section {
  flex: 0 0 auto;
  min-width: 250px;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-box input {
  width: 100%;
  padding: 10px 20px;
  border: 2px solid var(--border-light);
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(10px);
}

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

.search-box input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 4px 16px rgba(255, 153, 102, 0.25);
  transform: translateY(-2px);
}

/* 删除旧的搜索容器样式 */
.search-container {
  display: none;
}

/* ==========================================
   游戏列表区域
   ========================================== */

.games-section {
  padding: 20px 0 var(--spacing-xxl);
  min-height: 600px;
}

.loading-text {
  text-align: center;
  padding: var(--spacing-xxl);
  color: var(--text-muted);
  font-size: 16px;
  grid-column: 1 / -1;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 32px;
  margin-bottom: var(--spacing-xxl);
  perspective: 1000px;
}

.game-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  transform-style: preserve-3d;
  opacity: 0;
}

/* 动画激活状态 */
.game-card.visible {
  opacity: 1;
}

/* 动画1: 从左侧滑入 */
.game-card.animate-slide-left {
  animation: slideInLeft 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 动画2: 从右侧滑入 */
.game-card.animate-slide-right {
  animation: slideInRight 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 动画3: 从下方滑入 */
.game-card.animate-slide-up {
  animation: slideInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 动画4: 从上方滑入 */
.game-card.animate-slide-down {
  animation: slideInDown 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 动画5: 缩放淡入 */
.game-card.animate-scale {
  animation: scaleIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 动画6: 旋转淡入 */
.game-card.animate-rotate {
  animation: rotateIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-8deg) scale(0.92);
  }
  to {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
}

/* 动画7: 翻转进入 */
.game-card.animate-flip {
  animation: flipIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes flipIn {
  from {
    opacity: 0;
    transform: perspective(1000px) rotateX(-15deg);
  }
  to {
    opacity: 1;
    transform: perspective(1000px) rotateX(0);
  }
}

/* 动画8: 弹跳进入 */
.game-card.animate-bounce {
  animation: bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.game-card:hover {
  transform: translateY(-8px) rotateX(2deg);
  box-shadow:
    0 20px 40px rgba(255, 153, 102, 0.15),
    0 0 0 1px rgba(255, 153, 102, 0.1);
  border-color: rgba(255, 153, 102, 0.3);
}

/* 游戏海报区域 - 统一使用16:9横版比例 */
/* 支持格式：SVG、WebP、PNG */
.game-image {
  width: 100%;
  aspect-ratio: 16 / 9;  /* 强制16:9比例 */
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, var(--bg-light) 0%, #FFF8F0 100%);
}

.game-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;  /* 自动填充，保持比例 */
  object-position: center center;  /* 居中显示 */
}

.game-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
  pointer-events: none;
  z-index: 2;
}



.game-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card-content {
  padding: 28px;
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
}

.game-card-category {
  display: inline-block;
  padding: 6px 16px;
  background: linear-gradient(135deg, rgba(255, 153, 102, 0.15), rgba(212, 167, 106, 0.15));
  color: var(--primary-color);
  font-size: 11px;
  font-weight: 700;
  border-radius: 50px;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

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

.game-card:hover .game-card-category::before {
  left: 100%;
}

.game-card:hover .game-card-category {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  box-shadow: 0 4px 12px rgba(255, 153, 102, 0.25);
}

.game-card-title {
  font-size: 22px;
  color: var(--text-primary);
  margin-bottom: 12px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.3px;
  position: relative;
  z-index: 1;
}

.game-card-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transition: width 0.4s ease;
  border-radius: 2px;
}

.game-card:hover .game-card-title::after {
  width: 100%;
}

.game-card-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 400;
}

.game-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.game-card-meta {
  display: flex;
  gap: 10px;
  align-items: center;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  border-radius: 50px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.platform-badge::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--primary-color);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
  z-index: -1;
}

.game-card:hover .platform-badge:hover {
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 4px 12px rgba(255, 153, 102, 0.3);
}

.game-card:hover .platform-badge:hover::before {
  width: 150px;
  height: 150px;
}

.game-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 700;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(255, 153, 102, 0.1), rgba(212, 167, 106, 0.1));
  border-radius: 50px;
  transition: all 0.3s ease;
}

.game-card-rating svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  filter: drop-shadow(0 1px 2px rgba(255, 153, 102, 0.3));
}

.game-card:hover .game-card-rating {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 153, 102, 0.3);
}

/* 标签动画 */
.game-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.game-tag {
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  border-radius: 20px;
  border: 1px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.8;
}

.game-card:hover .game-tag {
  opacity: 1;
}

.game-card:hover .game-tag:hover {
  background: linear-gradient(135deg, rgba(255, 153, 102, 0.15), rgba(212, 167, 106, 0.15));
  color: var(--primary-color);
  border-color: rgba(255, 153, 102, 0.2);
  transform: translateY(-1px);
}

.load-more {
  text-align: center;
  margin-top: var(--spacing-xxl);
}

/* ==========================================
   游戏详情模态框
   ========================================== */

.game-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

.game-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(8px);
}

.game-modal-content {
  background: var(--bg-white);
  border-radius: 28px;
  max-width: 1000px;
  width: 95%;
  position: relative;
  animation: slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-close:hover {
  background: var(--primary-color);
  color: white;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 6px 20px rgba(255, 153, 102, 0.4);
}

.modal-close svg {
  width: 24px;
  height: 24px;
}

/* 游戏详情头部 */
.game-detail-header {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 0;
  border-bottom: 1px solid var(--border-light);
}

.game-detail-poster {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 28px 0 0 0;
}

.game-detail-header-content {
  padding: 40px;
  background: linear-gradient(135deg, var(--bg-white) 0%, #FFF8F0 100%);
}

.game-detail-title {
  font-size: 32px;
  color: var(--text-primary);
  margin-bottom: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.game-detail-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.game-detail-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255, 153, 102, 0.1);
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 600;
  border-radius: 50px;
}

/* 游戏详情主体 */
.game-detail-body {
  padding: 32px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.game-detail-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.game-detail-info-item {
  text-align: center;
  padding: 20px 12px;
  background: linear-gradient(135deg, var(--bg-light) 0%, #FFF8F0 100%);
  border-radius: 16px;
  transition: all 0.3s ease;
}

.game-detail-info-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(255, 153, 102, 0.15);
}

.game-detail-info-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.game-detail-info-value {
  display: block;
  font-size: 20px;
  color: var(--primary-color);
  font-weight: 800;
}

.game-detail-description {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 15px;
  margin-bottom: 24px;
}

.game-detail-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.game-detail-tag {
  padding: 6px 16px;
  background: var(--bg-light);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  border-radius: 50px;
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
}

.game-detail-tag:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.game-detail-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 24px;
  grid-column: 1 / -1;
}

.game-detail-actions .btn {
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-detail-actions .btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  color: white;
  box-shadow: 0 8px 20px rgba(255, 153, 102, 0.3);
}

.game-detail-actions .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(255, 153, 102, 0.4);
}

.game-detail-actions .btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid var(--border-light);
}

.game-detail-actions .btn-outline:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(255, 153, 102, 0.05);
}

/* ==========================================
   响应式 - 游戏库页面
   ========================================== */

/* 小型桌面 (769px - 1024px) */
@media (max-width: 1024px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .game-card {
    border-radius: 20px;
  }

  /* game-image 使用 aspect-ratio 自动保持 16:9 比例，无需响应式高度 */

  .game-card-title {
    font-size: 18px;
  }

  .game-detail-header {
    grid-template-columns: 1fr;
  }

  .game-detail-poster {
    border-radius: 28px 28px 0 0;
    height: 300px;
  }

  .game-detail-header-content {
    padding: 28px;
  }

  .game-detail-body {
    grid-template-columns: 1fr;
    padding: 24px 28px;
  }
}

/* 平板 (481px - 768px) */
@media (max-width: 768px) {
  .game-filters {
    padding: 24px 0;
  }

  .filters-main-row {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    align-items: stretch;
  }

  .filter-section {
    width: 100%;
    align-items: flex-start;
  }

  .filter-divider {
    display: none;
  }

  .search-section {
    width: 100%;
    min-width: auto;
  }

  .filter-pill {
    font-size: 14px;
    padding: 6px 16px;
  }

  .games-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .game-card {
    border-radius: 18px;
  }

  /* game-image 使用 aspect-ratio 自动保持 16:9 比例，无需响应式高度 */

  .game-card-content {
    padding: 20px;
  }

  .game-card-title {
    font-size: 18px;
  }

  .game-modal-content {
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
  }

  .game-detail-poster {
    height: 250px;
  }

  .game-detail-header-content {
    padding: 24px;
  }

  .game-detail-title {
    font-size: 24px;
  }

  .game-detail-body {
    padding: 20px 24px;
  }

  .game-detail-info {
    grid-template-columns: 1fr;
  }

  .game-detail-actions {
    flex-direction: column;
  }

  .game-detail-actions .btn {
    width: 100%;
  }
}

/* 手机 (0 - 480px) */
@media (max-width: 480px) {
  .game-filters {
    padding: 20px 0;
  }

  .filters-main-row {
    gap: 12px;
    padding: 12px;
  }

  .filter-pill {
    font-size: 13px;
    padding: 6px 14px;
  }

  .search-box input {
    padding: 10px 16px;
    font-size: 14px;
  }

  .search-icon {
    right: 16px;
  }

  .games-grid {
    gap: 16px;
  }

  .game-card {
    border-radius: 16px;
  }

  /* game-image 使用 aspect-ratio 自动保持 16:9 比例，无需响应式高度 */

  .game-card-content {
    padding: 16px;
  }

  .game-card-title {
    font-size: 16px;
  }

  .game-card-description {
    font-size: 13px;
    line-height: 1.5;
  }

  .modal-close {
    width: 40px;
    height: 40px;
    top: 16px;
    right: 16px;
  }

  .modal-close svg {
    width: 20px;
    height: 20px;
  }

  .game-modal-content {
    width: 96%;
    border-radius: 20px;
  }

  .game-detail-poster {
    height: 200px;
    border-radius: 20px 20px 0 0;
  }

  .game-detail-header-content {
    padding: 20px;
  }

  .game-detail-title {
    font-size: 20px;
    margin-bottom: 12px;
  }

  .game-detail-meta {
    gap: 8px;
  }

  .game-detail-meta-item {
    font-size: 12px;
    padding: 6px 12px;
  }

  .game-detail-body {
    padding: 16px 20px;
    gap: 20px;
  }

  .game-detail-info-item {
    padding: 16px 8px;
  }

  .game-detail-info-value {
    font-size: 18px;
  }

  .game-detail-description {
    font-size: 14px;
  }

  .game-detail-actions {
    margin-top: 16px;
  }

  .game-detail-actions .btn {
    padding: 12px 24px;
    font-size: 14px;
  }
}

/* ==========================================
   首页游戏预览样式
   ========================================== */

.games-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.games-section {
  background: var(--bg-color);
  padding: var(--spacing-xxl) 0;
}

/* ==========================================
   游戏详情弹窗
   ========================================== */

.game-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  animation: modalFadeIn 0.3s ease;
}

.game-modal.active {
  display: block;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg-white);
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  margin: 5vh auto;
  border-radius: var(--border-radius-xl);
  overflow-y: auto;
  box-shadow: var(--shadow-card-hover);
  animation: modalSlideUp 0.4s ease;
}

@keyframes modalSlideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: var(--spacing-lg);
  right: var(--spacing-lg);
  width: 40px;
  height: 40px;
  background: var(--bg-white);
  border: 2px solid var(--border-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--text-white);
  transform: rotate(90deg);
}

.modal-body {
  padding: 0;
}

/* 游戏详情内容 */
.game-detail-header {
  position: relative;
  height: 300px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.game-detail-poster {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  object-fit: cover;
  opacity: 0.3;
}

.game-detail-header-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: var(--spacing-xl);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: var(--text-white);
}

.game-detail-title {
  font-size: 32px;
  margin-bottom: var(--spacing-sm);
}

.game-detail-meta {
  display: flex;
  gap: var(--spacing-lg);
  align-items: center;
  flex-wrap: wrap;
}

.game-detail-meta-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: 14px;
}

.game-detail-body {
  padding: var(--spacing-xxl);
}

.game-detail-description {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xl);
}

.game-detail-tags {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  margin-bottom: var(--spacing-xl);
}

.game-detail-tag {
  padding: 6px 14px;
  background: var(--bg-light);
  color: var(--text-secondary);
  border-radius: var(--radius-medium);
  font-size: 13px;
  font-weight: 500;
}

.game-detail-actions {
  display: flex;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
  padding-top: var(--spacing-lg);
  border-top: 2px solid var(--border-light);
}

.game-detail-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
  padding: var(--spacing-lg);
  background: var(--bg-light);
  border-radius: var(--radius-medium);
}

.game-detail-info-item {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.game-detail-info-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.game-detail-info-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

/* 响应式适配 */
@media (max-width: 768px) {
  .game-filters {
    padding: var(--spacing-lg) 0;
  }

  .games-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  /* game-image 使用 aspect-ratio 自动保持 16:9 比例，无需响应式高度 */

  .game-detail-header {
    height: 200px;
  }

  .game-detail-title {
    font-size: 24px;
  }

  .game-detail-body {
    padding: var(--spacing-lg);
  }

  .modal-content {
    width: 95%;
    max-height: 95vh;
    margin: 2.5vh auto;
  }

  .modal-close {
    width: 36px;
    height: 36px;
    top: var(--spacing-md);
    right: var(--spacing-md);
  }

  .game-detail-actions {
    flex-direction: column;
  }

  .game-detail-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .game-detail-header {
    height: 160px;
  }

  .game-detail-title {
    font-size: 20px;
  }

  .game-detail-meta {
    gap: var(--spacing-md);
  }
}

/* 选中状态的游戏卡片 */
.game-card.selected {
  border: 3px solid var(--primary-color);
  box-shadow: 0 0 0 4px rgba(255, 153, 102, 0.2), 0 12px 40px rgba(255, 153, 102, 0.4);
  transform: translateY(-5px);
  z-index: 10;
}

/* 脉冲动画 */
@keyframes pulse {
  0%, 100% {
    transform: translateY(-5px) scale(1);
    box-shadow: 0 0 0 4px rgba(255, 153, 102, 0.2), 0 12px 40px rgba(255, 153, 102, 0.4);
  }
  50% {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 0 0 8px rgba(255, 153, 102, 0.3), 0 16px 50px rgba(255, 153, 102, 0.5);
  }
}

/* ==========================================
   响应式设计 - 移动端
   ========================================== */

@media (max-width: 640px) {
  .games-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .game-detail-meta {
    gap: var(--spacing-md);
  }
}
