* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Arial", sans-serif;
}

body {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Navigation */
.nav {
  background: rgba(0, 0, 0, 0.8);
  padding: 1rem;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.nav-links {
  display: flex;
  justify-content: space-around;
  list-style: none;
}

.nav-link {
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: #e94560;
}

/* Game List */
.game-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 80px;
}

.game-card {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05)
  );
  border-radius: 16px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

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

.game-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

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

.game-image {
  width: 100%;
  height: 220px;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 1.2rem;
  position: relative;
  transition: transform 0.4s ease;
}

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

.game-content {
  position: relative;
  z-index: 1;
}

.game-title {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.game-category {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  padding: 6px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  backdrop-filter: blur(5px);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 100;
  background: rgb(233, 69, 96);
  color:#fff;
  
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 1rem 0;
}

.game-tag {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.game-tag:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.game-content {
  position: relative;
  z-index: 1;
}

.game-title {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.game-card-footer {
  margin-top: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  opacity: 0.8;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
  .game-category {
    font-size: 0.75rem;
    padding: 4px 10px;
  }

  .game-tag {
    font-size: 0.75rem;
  }
}

.game-genre {
  display: inline-block;
  background: rgba(233, 69, 96, 0.2);
  color: #e94560;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  backdrop-filter: blur(5px);
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 5.2em;
  line-height: 1.2em;
  display: -webkit-box;
  box-sizing: border-box;
}
.game-genre-detail {
  display: inline-block;
  max-height: 100%;
}

.game-card-footer {
  margin-top: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  opacity: 0.8;
  font-size: 0.9rem;
}

.play-button {
  background: #e94560;
  color: white;
  padding: 10px 30px;
  border: none;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  opacity: 1;
  transition: all 0.4s ease;
  box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
  margin: 1.5rem auto 1rem;
  display: block;
  text-align: center;
  font-size: 1rem;
  text-decoration: none;
}
/* 新增媒体查询 */
@media (max-width: 768px) {
  .game-card {
    padding: 1rem;
  }

  .game-image {
    height: 180px;
  }

  .play-button {
    padding: 8px 20px;
    font-size: 0.9rem;
  }
}

.back-button {
  background: #e94560;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-bottom: 20px;
}

/* Legal Pages */
.legal-content {
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  padding: 2rem;
  border-radius: 10px;
  margin-top: 80px;
  display: none;
}

@media (max-width: 768px) {
  .game-list {
    grid-template-columns: 1fr;
  }

  /* .nav-links {
    flex-direction: column;
    text-align: center;
  }

  .nav-link {
    padding: 0.5rem;
  } */
}
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* PC端优化样式 */
.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #e94560;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    position: relative;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #e94560;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.nav-link:hover::after {
    width: 60%;
    left: 20%;
}

/* 移动端优化样式 */
.mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    height: 2px;
    background: #fff;
    transition: all 0.3s ease;
    transform-origin: left center;
}

/* 移动端菜单激活状态 */
.menu-active .mobile-menu-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(2px, -3px);
}

.menu-active .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
}

.menu-active .mobile-menu-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(2px, 2px);
}

@media (max-width: 1024px) {
    .nav-container {
        padding: 0 24px;
    }
    
    .nav-links {
        position: fixed;
        top: 72px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 60px);
        background: rgba(0, 0, 0, 0.98);
        flex-direction: column;
        padding: 2rem;
        transition: right 0.3s ease;
    }
    
    .nav-links.active {
        top: 60px;
        left: 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-link {
        padding: 12px 16px;
        font-size: 1.1rem;
        border-radius: 8px;
        transition: background 0.3s ease;
    }
    
    .nav-link:hover {
        background: rgba(255,255,255,0.1);
    }
    
    .nav-link::after {
        display: none;
    }
}

/* 滚动时导航栏样式 */
.nav-scrolled {
    background: rgba(0, 0, 0, 0.98);
    height: 72px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-scrolled .nav-container {
    height: 60px;
}

/* 下拉菜单样式（PC端） */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 8px;
    padding: 1rem;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(8px);
}

.dropdown-item {
    padding: 8px 12px;
    color: rgba(255,255,255,0.8);
    border-radius: 6px;
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

/* 页脚样式 */
.footer {
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 2rem 0;
  margin-top: auto;
  backdrop-filter: blur(10px);
}

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

.footer-section h3 {
  color: #e94560;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-link {
  color: #fff;
  text-decoration: none;
  margin-bottom: 0.5rem;
  display: block;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer-link:hover {
  opacity: 1;
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 调整主体内容间距 */
.main-content {
  min-height: calc(100vh - 120px - 80px); /* 视口高度 - 页脚高度 - 导航栏高度 */
  padding-top: 80px; /* 给固定导航栏留出空间 */
}


/* 更新下拉菜单样式 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: -50px;
    background: rgba(15, 15, 25, 0.98);
    border-radius: 12px;
    padding: 1.5rem;
    min-width: 300px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.1);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(15px);
}

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

.category-column {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.dropdown-item {
    padding: 8px 15px;
    color: rgba(255,255,255,0.85);
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-item:hover {
    background: rgba(233, 69, 96, 0.15);
    color: #fff;
    transform: translateX(5px);
}

/* 移动端适配 */
@media (max-width: 1024px) {
    .dropdown-menu {
        position: static;
        min-width: 100%;
        background: transparent;
        box-shadow: none;
        padding: 0;
        opacity: 1;
        visibility: visible;
        display: none;
    }

    .category-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .dropdown:hover .dropdown-menu {
        transform: none;
    }

    .dropdown-item::before {
        display: none;
    }
}
@media (max-width: 1024px) {
    .nav-links {
        position: fixed;
        top: 72px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: rgba(10, 10, 20, 0.98);
        flex-direction: column;
        padding: 20px;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        justify-content: flex-start;
    }
    .nav-links li{
        margin-bottom: 0;
    }
    .nav-links.active {
        right: 0;
    }

    .nav-link {
        width: 100%;
        padding: 18px 20px;
        font-size: 1.1rem;
        border-radius: 8px;
        margin: 4px 0;
        background: rgba(255,255,255,0.05);
        display: inline-block;
    }

    .dropdown-menu {
        position: static;
        width: 100%;
        background: transparent;
        box-shadow: none;
        padding: 0;
        display: none;
        margin-top: 38px;
    }

    .dropdown-menu.active {
        display: block;
    }

    .category-column {
        padding-left: 20px;
    }

    .dropdown-item {
        padding: 14px 20px;
        font-size: 1rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }
}

/* 移动端点击优化 */
@media (hover: none) and (pointer: coarse) {
    .dropdown:hover .dropdown-menu {
        display: none;
    }
}

/* 详情页样式 */
.game-header {
            margin-top: 100px;
            padding: 40px 0;
            background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6));
            backdrop-filter: blur(10px);
        }

        .game-hero {
            max-width: 600px;
            margin: 0 auto;
            padding: 0 20px;
        }

        /* 推荐栏目样式 */
        .recommended-section {
            padding: 60px 0;
        }

        .recommended-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 30px;
            margin-top: 30px;
        }

        .recommended-card {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 12px;
            overflow: hidden;
            transition: transform 0.3s ease;
            cursor: pointer;
            position: relative;
            margin-bottom: 20px;
        }

        .recommended-card:hover {
            transform: translateY(-5px);
        }

        .recommended-image {
            width: 100%;
            height: 180px;
            object-fit: cover;
            border-radius: 12px 12px 0 0;
        }

        .recommended-content {
            padding: 15px;
        }

        .recommended-title {
            font-size: 1.1rem;
            margin-bottom: 8px;
            color: #fff;
        }

        .recommended-genre {
            font-size: 0.85rem;
            color: rgba(255, 255, 255, 0.7);
            display: -webkit-box;
            -webkit-line-clamp: 4;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        

        @media (max-width: 768px) {
            .recommended-grid {
                grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
                gap: 20px;
            }

            .recommended-image {
                height: 150px;
            }
        }

        @media (max-width: 480px) {
            .recommended-grid {
                grid-template-columns: 1fr;
            }
      }

/* 搜索框 */
.search-container {
    position: relative;
    margin-left: auto;
    padding: 0 20px;
}

.search-form {
    display: flex;
    align-items: center;
}

.search-input {
    width: 200px;
    padding: 8px 35px 8px 15px;
    border: none;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    width: 300px;
    background: rgba(255,255,255,0.15);
}

.search-button {
    background: transparent;
    border: none;
    cursor: pointer;
    margin-left: -35px;
    display: flex;
    align-items: center;
}

.search-icon {
    width: 20px;
    height: 20px;
    fill: rgba(255,255,255,0.7);
    transition: fill 0.3s ease;
}

.search-input:focus + .search-button .search-icon {
    fill: #e94560;
}

/* 移动端适配 */
@media (max-width: 1024px) {
    .search-container {
        order: 3;
        width: 100%;
        padding: 10px 20px;
        background: rgba(0,0,0,0.8);
        position: absolute;
        top: 100%;
        left: 0;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav.active-search .search-container {
        opacity: 1;
        visibility: visible;
    }

    .search-input {
        width: 100%;
    }

    .search-input:focus {
        width: 100%;
    }

    /* 移动端搜索触发按钮 */
    .mobile-search-toggle {
        display: flex;
        align-items: center;
        padding: 10px;
        margin-left: auto;
    }
}

@media (min-width: 1025px) {
    .mobile-search-toggle {
        display: none;
    }
}

/* 移动端搜索按钮样式 */
.mobile-search-toggle {
    display: none; /* 默认隐藏 */
    background: transparent;
    border: none;
    padding: 12px;
    margin-left: auto;
    cursor: pointer;
}

.search-toggle-icon {
    width: 24px;
    height: 24px;
    fill: rgba(255,255,255,0.9);
    transition: fill 0.3s ease;
}

.mobile-search-toggle:hover .search-toggle-icon {
    fill: #e94560;
}

@media (max-width: 1024px) {
    .mobile-search-toggle {
        display: flex; /* 移动端显示 */
        order: 2; /* 在汉堡菜单前显示 */
    }
    
    .mobile-menu-toggle {
        order: 3; /* 汉堡菜单顺序 */
    }
}

@media (max-width: 480px) {
    .mobile-search-toggle {
        padding: 10px;
    }
    
    .search-toggle-icon {
        width: 20px;
        height: 20px;
    }
}
.mt-80{
    margin-top: 80px;
}