html {
  scroll-behavior: smooth;
}

img {
  object-fit: cover;
}

@layer utilities {
  .content-auto {
    content-visibility: auto;
  }

  .text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .text-shadow-lg {
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
  }

  .bg-blur {
    backdrop-filter: blur(8px);
  }

  .scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .scrollbar-hide::-webkit-scrollbar {
    display: none;
  }

  .game-card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .game-card-hover:hover {
    transform: translateY(-8px);
  }

  .dark .game-card-hover:hover {
    box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.1), 0 10px 10px -5px rgba(99, 102, 241, 0.04);
  }

  #navbar {
    position: sticky !important;
    top: 0;
    bottom: auto;
  }
}

/* 新增游戏列表样式 */

/* 热门推荐 - 横向滚动卡片 */
.hot-game-card {
  min-width: 280px;
  transition: all 0.3s ease;
}

.hot-game-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* 最新游戏 - 列表样式 */
.new-game-item {
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
}

.new-game-item:hover {
  border-left-color: #6366f1;
  background: rgba(99, 102, 241, 0.05);
  transform: translateX(4px);
}

/* 精选游戏 - 大卡片样式 */
.featured-game-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

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

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

.featured-game-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* 分类精选 - 紧凑样式 */
.category-game-card {
  transition: all 0.3s ease;
  position: relative;
}

.category-game-card:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.category-game-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: inherit;
  background: linear-gradient(45deg, #6366f1, #ec4899) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: exclude;
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.category-game-card:hover::after {
  opacity: 1;
}

@media (max-width: 768px) {
  body {
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  /* 移动端优化 */
  .hot-game-card {
    min-width: 240px;
  }

  .hot-game-card:hover,
  .new-game-item:hover,
  .featured-game-card:hover,
  .category-game-card:hover {
    transform: translateY(-2px) scale(1.01);
  }
}