*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* 模板替换：只需修改此变量即可统一全站背景色 */
  --page-bg: #C5E861;
  --bg: var(--page-bg);
  --surface: var(--page-bg);
  --primary: #009cff;
  --primary-dark: #0078cc;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --border: #d0d9e4;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --header-h: 64px;
  --sidebar-w: 260px;
}

html {
  scroll-behavior: smooth;
  background: var(--page-bg);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--page-bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.header__menu-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  background: var(--page-bg);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
}

.header__menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header__logo img {
  height: 36px;
  width: auto;
}

.header__logo-text {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}

.header__search-form {
  flex: 1;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.header__search-form input {
  width: 100%;
  height: 42px;
  border: 2px solid var(--border);
  border-radius: 24px;
  padding: 0 48px 0 18px;
  font-size: 15px;
  outline: none;
  background: var(--page-bg);
  transition: border-color 0.2s;
}

.header__search-form input:focus {
  border-color: var(--primary);
  background: var(--page-bg);
}

.header__search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header__search-btn img {
  width: 16px;
  height: 16px;
  filter: brightness(10);
}

.header__nav-links {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.header__nav-links a {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s;
}

.header__nav-links a:hover {
  background: rgba(0, 156, 255, 0.1);
}

.header__nav-links a.btn-primary {
  background: var(--primary);
  color: #fff;
}

.header__nav-links a.btn-primary:hover {
  background: var(--primary-dark);
}

/* Sidebar */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 250;
}

.sidebar-overlay--show {
  display: block;
}

.sidebar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  width: var(--sidebar-w);
  height: calc(100vh - var(--header-h));
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  z-index: 300;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  padding: 16px 0;
}

.sidebar--open {
  transform: translateX(0);
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
}

.sidebar__link {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.sidebar__link:hover,
.sidebar__link--active {
  color: var(--primary);
  background: rgba(0, 156, 255, 0.08);
  border-left-color: var(--primary);
}

/* Main layout */
.layout {
  padding-top: var(--header-h);
  min-height: 100vh;
  background: var(--page-bg);
}

.main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

/* Hero */
.hero {
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  color: var(--text);
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  background: rgba(0, 156, 255, 0.08);
  border-radius: 50%;
}

.hero__title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  margin-bottom: 12px;
  position: relative;
}

.hero__subtitle {
  font-size: 16px;
  opacity: 0.9;
  max-width: 560px;
  margin-bottom: 24px;
  position: relative;
}

.hero__features {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  position: relative;
}

.hero__feature {
  background: rgba(0, 156, 255, 0.1);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
}

.hero__btn {
  padding: 12px 28px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.hero__btn--primary {
  background: var(--primary);
  color: #fff;
}

.hero__btn--secondary {
  background: var(--page-bg);
  color: var(--primary);
  border: 2px solid var(--primary);
}

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

.hero-swiper {
  margin-bottom: 32px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-swiper .swiper-slide img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.hero-swiper .swiper-pagination-bullet-active {
  background: var(--primary);
}

/* Section */
.section {
  margin-bottom: 36px;
}

.section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section__title {
  font-size: 22px;
  font-weight: 800;
}

.section__badge {
  display: inline-block;
  background: #ff4757;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 8px;
  vertical-align: middle;
}

.section__more {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  transition: gap 0.2s;
}

.section__more:hover {
  gap: 8px;
}

.section__more img {
  width: 16px;
  height: 16px;
}

/* Category grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin-bottom: 36px;
}

.category-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  text-align: center;
}

.category-chip:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.category-chip img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.category-chip span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

/* Game grid */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.game-card {
  display: block;
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.game-card__hot {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #ff4757;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 1;
}

.game-card__img-wrap {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--page-bg);
}

.game-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

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

.game-card--large .game-card__img-wrap {
  aspect-ratio: 16/10;
}

.game-card__info {
  padding: 10px 12px;
}

.game-card__name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.game-card__players {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Page header */
.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 14px;
}

.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--primary);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* Search page */
.search-page-form {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  max-width: 600px;
}

.search-page-form input {
  flex: 1;
  height: 48px;
  border: 2px solid var(--border);
  border-radius: 24px;
  padding: 0 20px;
  font-size: 16px;
  outline: none;
  background: var(--page-bg);
}

.search-page-form input:focus {
  border-color: var(--primary);
}

.search-page-form button {
  height: 48px;
  padding: 0 28px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.no-result {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.no-result img {
  width: 80px;
  margin: 0 auto 16px;
  opacity: 0.5;
}

/* About / static */
.static-content {
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  max-width: 800px;
}

.static-content h1 {
  font-size: 28px;
  margin-bottom: 16px;
}

.static-content p {
  margin-bottom: 12px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Footer */
.footer {
  background: var(--page-bg);
  border-top: 1px solid var(--border);
  padding: 32px 20px;
  margin-top: 48px;
}

.footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
}

.footer__nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 16px;
}

.footer__nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.footer__nav a:hover {
  color: var(--primary);
}

.footer__copy {
  font-size: 13px;
  color: var(--text-muted);
}

/* Ad placeholder */
.adv {
  min-height: 0;
}

/* Responsive */
@media (min-width: 1024px) {
  .sidebar {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: none !important;
  }

  .header__menu-btn {
    display: none;
  }

  .layout {
    padding-left: var(--sidebar-w);
  }

  .hero-swiper .swiper-slide img {
    height: 300px;
  }

  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

/* SEO content */
.seo-content {
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 36px;
  box-shadow: var(--shadow);
}

.seo-content h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
}

.seo-content p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.seo-content p:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .header__logo-text {
    display: none;
  }

  .header__nav-links {
    display: none;
  }

  .hero {
    padding: 28px 20px;
  }

  .category-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .category-chip {
    padding: 10px 4px;
  }

  .category-chip img {
    width: 36px;
    height: 36px;
  }

  .category-chip span {
    font-size: 10px;
  }
}
.adv>p{
  text-align: center;
}
