/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

/* 主头部 */
.main-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0.5rem 0;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.3rem;
  font-weight: bold;
  color: #667eea;
}

.logo i {
  font-size: 1.7rem;
}

/* 搜索栏 */
.search-bar {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  border-radius: 25px;
  padding: 0.4rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  flex: 1;
  max-width: 400px;
  margin: 0 0.5rem;
}

.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  outline: none;
}

.search-bar button {
  background: #667eea;
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-bar button:hover {
  background: #5a6fd8;
  transform: scale(1.05);
}

/* 导航菜单 */
.main-nav {
  display: flex;
  gap: 0.5rem;
}

.main-nav a {
  text-decoration: none;
  color: #666;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  transition: all 0.3s ease;
  position: relative;
  font-weight: 500;
  font-size: 0.9rem;
}

.main-nav a:hover,
.main-nav a.active {
  color: #667eea;
  background: rgba(102, 126, 234, 0.1);
}

.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: #667eea;
  border-radius: 2px;
}

/* 英雄区域 */
.hero-section {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
  color: white;
  text-align: center;
  padding: 4rem 2rem;
  margin-bottom: 3rem;
}

.hero-content h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  opacity: 0.9;
}

.stat-item i {
  font-size: 1.5rem;
}

/* 主容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* 页面切换 */
.page-section {
  display: none;
  animation: fadeIn 0.5s ease;
}

.page-section.active {
  display: block;
}

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

/* 精选游戏轮播 */
.featured-section {
  margin-bottom: 3rem;
}

.featured-section h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: white;
  text-align: center;
}

.featured-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.carousel-item {
  display: none;
}

.carousel-item:first-child {
  display: block;
}

.featured-game-card {
  position: relative;
  height: 400px;
  overflow: hidden;
  border-radius: 15px;
}

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

.featured-game-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 2rem;
}

.featured-game-info h3 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.featured-game-info p {
  margin-bottom: 1rem;
  opacity: 0.9;
}

.featured-game-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.featured-play-btn {
  background: #667eea;
  border: none;
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.featured-play-btn:hover {
  background: #5a6fd8;
  transform: scale(1.05);
}

/* 分类区域 */
.categories-section {
  margin-bottom: 3rem;
}

.categories-section h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: white;
  text-align: center;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.category-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.category-card i {
  font-size: 3rem;
  color: #667eea;
  margin-bottom: 1rem;
}

.category-card .category-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin-top: 0.5rem;
  display: block;
}

.category-card .category-en-name {
  font-size: 0.9rem;
  font-weight: 400;
  color: #666;
  margin-top: 0.2rem;
  display: block;
}

/* 游戏区域 */
.games-section {
  margin-bottom: 3rem;
}

.games-section h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: white;
  text-align: center;
}

/* 游戏网格 */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* 游戏卡片 */
.game-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.game-card-header {
  position: relative;
  overflow: hidden;
}

.game-card-header img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.game-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.play-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.play-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.game-card-content {
  padding: 1rem;
}

.game-card-content h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem 0;
  color: #333;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-card-content p {
  font-size: 0.8rem;
  color: #666;
  margin: 0 0 0.8rem 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}

.game-category {
  background: #667eea;
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  font-size: 0.7rem;
}

/* 加载更多按钮 */
.load-more-container {
  text-align: center;
  margin: 6rem 0 4rem 0;
  padding: 3rem 0;
  position: relative;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
}

.load-more-btn {
  background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #f5576c);
  background-size: 300% 300%;
  color: white;
  border: none;
  padding: 1.5rem 4rem;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s ease;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
  position: relative;
  overflow: hidden;
  animation: gradientShift 3s ease infinite;
  min-width: 200px;
  justify-content: center;
}

.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.3), transparent);
  transition: left 0.5s;
}

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

.load-more-btn:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
  animation: gradientShift 1s ease infinite;
}

.load-more-btn:active {
  transform: translateY(-1px) scale(1.02);
}

.load-more-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  animation: none;
}

.load-more-btn i {
  font-size: 1.2rem;
  animation: bounce 2s infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-5px);
  }
  60% {
    transform: translateY(-3px);
  }
}

/* 精选页面 */
.featured-page {
  padding: 2rem 0;
}

.featured-page h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: white;
  text-align: center;
}

.featured-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* 分类页面 */
.categories-page {
  padding: 2rem 0;
}

.categories-page h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: white;
  text-align: center;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

/* 分类页面卡片样式已移除，使用与首页一致的category-card样式 */

.category-games {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.category-game-item {
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 8px;
}

.category-game-item:hover {
  background: rgba(102, 126, 234, 0.1);
  transform: scale(1.05);
}

/* 收藏页面 */
.favorites-page {
  padding: 2rem 0;
}

.favorites-page h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: white;
  text-align: center;
}

.favorites-content {
  position: relative;
}

.favorites-empty {
  text-align: center;
  padding: 4rem 2rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.favorites-empty i {
  font-size: 4rem;
  color: #ccc;
  margin-bottom: 1rem;
}

.favorites-empty h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #333;
}

.favorites-empty p {
  color: #666;
  margin-bottom: 2rem;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 关于页面 */
.about-page {
  padding: 2rem 0;
}

.about-page h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: white;
  text-align: center;
}

.about-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 3rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.about-intro {
  margin-bottom: 3rem;
}

.about-intro h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #333;
}

.about-intro p {
  color: #666;
  line-height: 1.8;
  font-size: 1.1rem;
}

.about-features {
  margin-bottom: 3rem;
}

.about-features h3 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  color: #333;
  text-align: center;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-item {
  text-align: center;
  padding: 2rem;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 15px;
  transition: all 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.feature-item i {
  font-size: 3rem;
  color: #667eea;
  margin-bottom: 1rem;
}

.feature-item h4 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: #333;
}

.feature-item p {
  color: #666;
}

.about-contact {
  text-align: center;
}

.about-contact h3 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #333;
}

.contact-info p {
  color: #666;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.contact-info i {
  color: #667eea;
  margin-right: 0.5rem;
}

/* 页脚 */
footer {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 2rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h4 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: #667eea;
}

.footer-section p {
  color: #ccc;
  line-height: 1.6;
}

.footer-section a {
  color: #ccc;
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: #667eea;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid #444;
  color: #999;
}

/* 收藏按钮 */
.favorite-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  color: #ccc;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.favorite-btn:hover {
  color: #ff6b6b;
  transform: scale(1.1);
  background: rgba(255, 255, 255, 1);
}

.favorite-btn.active {
  color: #ff6b6b;
  background: rgba(255, 255, 255, 1);
}

.favorite-btn.active:hover {
  color: #ff4757;
}

/* 通知样式 */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.notification.show {
  transform: translateX(0);
}

/* 错误信息样式 */
.error-message {
  text-align: center;
  padding: 3rem 1rem;
  color: #666;
}

.error-message i {
  font-size: 3rem;
  color: #ff6b6b;
  margin-bottom: 1rem;
}

.error-message h3 {
  margin: 1rem 0;
  color: #333;
}

/* 无游戏状态 */
.no-games {
  text-align: center;
  padding: 3rem 1rem;
  color: #666;
}

.no-games i {
  font-size: 3rem;
  color: #667eea;
  margin-bottom: 1rem;
}

.no-games h3 {
  margin: 1rem 0;
  color: #333;
}

/* 返回全部按钮 */
.back-to-all-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
}

.back-to-all-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* 收藏页面空状态 */
.favorites-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #666;
}

.favorites-empty i {
  font-size: 3rem;
  color: #ff6b6b;
  margin-bottom: 1rem;
}

.favorites-empty h3 {
  margin: 1rem 0;
  color: #333;
}

/* 响应式设计 */
@media (min-width: 1200px) {
  .games-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .games-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .games-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 576px) and (max-width: 767px) {
  .games-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 575px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .game-card-content {
    padding: 0.8rem;
  }
  
  .game-card-content h3 {
    font-size: 0.9rem;
  }
  
  .game-card-content p {
    font-size: 0.75rem;
  }
}

/* GameMonetize视频广告容器 */
#gamemonetize-video {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10001;
  display: none;
  background: rgba(0, 0, 0, 0.9);
  border-radius: 10px;
  overflow: hidden;
}

#gamemonetize-video.show {
  display: block;
}
