:root {
  --primary-color: #2F6BFF;
  --accent-color: #6FA3FF;
  --button-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  --card-bg: #FFFFFF;
  --page-bg: #F4F7FB;
  --text-main: #1F2D3D;
  --border-color: #D6E2FF;
  --glow-color: #A5C4FF;
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) */
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--page-bg);
  padding-top: var(--header-offset);
  overflow-x: hidden;
}

/* Header styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px; /* Fixed height for desktop */
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-color); /* Distinct background for header-top */
  color: #fff;
}

.header-container {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
}

.logo {
  display: block;
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
  line-height: 1;
}

.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.desktop-nav-buttons {
  display: flex;
  gap: 12px;
}

.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
}

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1001;
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #fff;
  border-radius: 3px;
  transition: all 0.3s ease-in-out;
}

/* Main Navigation */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px; /* Fixed height for desktop */
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--accent-color); /* Distinct background for main-nav */
  color: #fff;
}

.nav-container {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row; /* Desktop first */
  justify-content: center;
  align-items: center;
  padding: 0 20px;
}

.nav-link {
  color: #fff;
  text-decoration: none;
  padding: 8px 15px;
  font-size: 15px;
  white-space: nowrap;
  transition: background-color 0.3s ease;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  color: #fff;
  background: var(--button-gradient);
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

/* Overlay for mobile menu */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

/* Footer styles */
.site-footer {
  background-color: var(--primary-color);
  color: #fff;
  padding: 40px 20px 20px;
  font-size: 14px;
}

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

.footer-col h3 {
  color: #fff;
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-col p {
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.8);
}

.footer-logo {
  display: block;
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  color: #fff;
  margin-bottom: 15px;
}

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li {
  margin-bottom: 8px;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  max-width: 1200px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.6);
}

/* Mobile styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: 60px (header-top) + 48px (mobile-nav-buttons) */
  }

  body {
    padding-top: var(--header-offset);
    overflow-x: hidden;
  }

  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }

  .site-header {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }

  .header-top {
    min-height: 60px;
    height: 60px; /* Fixed height for mobile header-top */
    padding: 0 15px; /* Adjust padding for mobile header-top */
  }

  .header-container {
    padding: 0;
    justify-content: space-between;
    position: relative;
  }

  .hamburger-menu {
    display: flex;
    z-index: 11;
  }

  /* Mobile Logo Centering (Flexbox + Absolute Positioning for reliability) */
  .logo {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: auto;
    max-width: calc(100% - 90px); /* Account for hamburger and right space */
    font-size: 24px;
    z-index: 10;
  }
  .logo img {
    max-height: 56px !important; /* Mobile max height */
  }

  .desktop-nav-buttons {
    display: none;
  }

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: rgba(0, 0, 0, 0.05); /* Light background for separation */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px);
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    border-radius: 20px;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header + mobile buttons */
    left: 0;
    width: 80%; /* Menu width */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background-color: var(--primary-color);
    flex-direction: column;
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease-in-out;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
  }

  .main-nav.active {
    display: flex; /* Show menu when active */
    transform: translateX(0);
  }

  .nav-container {
    flex-direction: column;
    padding: 20px 0;
    align-items: flex-start;
    width: 100%;
    max-width: none;
  }

  .nav-link {
    width: 100%;
    padding: 12px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-link:last-child {
    border-bottom: none;
  }

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

  .overlay.active {
    display: block;
  }

  /* Hamburger menu animation */
  .hamburger-menu.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
  }
  .hamburger-menu.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
    padding: 0 15px;
  }

  .footer-col {
    text-align: center;
  }
  .footer-col h3 {
    text-align: center;
  }
  .footer-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}
/* Payment Methods 图标容器样式 */
.payment-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 5px;
}

.payment-icons img,
.payment-icon {
  max-height: 50px;
  height: auto;
  width: auto;
  display: block;
}

/* Game Providers 图标容器样式 */
.game-providers-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.game-providers-icons img,
.game-provider-icon {
  max-height: 50px;
  height: auto;
  width: auto;
  display: block;
}

/* Social Media 图标容器样式 */
.social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.social-media-icons img,
.social-media-icon {
  max-height: 50px;
  height: auto;
  width: auto;
  display: block;
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@media (max-width: 768px) {
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}
