:root {
  --primary-color: #26A9E0;
  --accent-color: #FFFFFF;
  --login-button-color: #EA7C07;
  --background-color: #FFFFFF;
  --text-color: #000000;
  --header-top-bg: #1a7bb0; /* Darker shade of primary */
  --main-nav-bg: var(--primary-color);
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

/* Basic Reset & Body Styles */
body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: var(--background-color);
  overflow-x: hidden; /* Prevent horizontal scroll for desktop */
}

/* Shared Container Styles */
.header-container, .nav-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Site Header - Fixed Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  background-color: var(--background-color); /* Base background, individual sections will override */
}

.header-top {
  background-color: var(--header-top-bg);
  min-height: 60px;
  display: flex;
  align-items: center;
  padding: 10px 0; /* Adjust padding to ensure min-height is actual content height */
}

.header-top .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--accent-color);
  text-decoration: none;
  white-space: nowrap; /* Ensure logo stays on one line */
  padding: 5px 0;
}

.desktop-nav-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  box-sizing: border-box;
  color: var(--accent-color);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-register {
  background-color: var(--login-button-color);
}

.btn-register:hover {
  background-color: #d16b06; /* Slightly darker orange */
}

.btn-download {
  background-color: var(--primary-color);
}

.btn-download:hover {
  background-color: #1a7bb0; /* Slightly darker blue */
}

/* Main Navigation */
.main-nav {
  background-color: var(--main-nav-bg);
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 0;
}

.main-nav .nav-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 25px;
}

.nav-link {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: bold;
  padding: 10px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: #d4eaf7; /* Lighter shade of white for hover */
}

/* Hamburger Menu (Desktop - hidden) */
.hamburger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 20px;
  position: relative;
  z-index: 1001;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--accent-color);
  margin-bottom: 6px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-menu span:last-child {
  margin-bottom: 0;
}

/* Mobile Specific Button Container (Desktop - hidden) */
.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
}

/* Mobile Menu Overlay (Desktop - hidden) */
.mobile-menu-overlay {
  display: none; /* Hidden by default on desktop */
}

/* Site Footer */
.site-footer {
  background-color: #333;
  color: #fff;
  padding: 40px 0 20px 0;
  font-size: 14px;
}

.site-footer h3 {
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
}

.site-footer p {
  margin-bottom: 10px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}

.footer-col {
  flex: 1;
  min-width: 250px;
}

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

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

.footer-nav a, .legal-nav a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover, .legal-nav a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #444;
}

.footer-bottom p {
  margin: 0;
  color: #aaa;
}

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

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

  /* Header Mobile Layout */
  .header-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
  }

  .hamburger-menu {
    display: flex; /* Show hamburger */
    order: 0; /* Left side */
    align-items: center;
    justify-content: center;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    order: 1; /* Center */
    font-size: 24px;
  }

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

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

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

  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Below fixed header and mobile buttons */
    left: 0;
    height: calc(100% - var(--header-offset));
    width: 280px; /* Width of the mobile menu */
    background-color: var(--background-color);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    transform: translateX(-100%); /* Off-screen to the left */
    transition: transform 0.3s ease-out;
    z-index: 1000; /* Below overlay */
    padding: 20px 0;
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 15px;
    width: 100%;
    max-width: none;
    gap: 0; /* Remove gap for vertical links */
  }

  .nav-link {
    width: 100%;
    padding: 12px 0;
    color: var(--text-color);
    border-bottom: 1px solid #eee;
  }

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

  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999; /* Below main nav but above content */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
  }

  .mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .hamburger-menu.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

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

  .hamburger-menu.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .footer-container {
    flex-direction: column;
    gap: 20px;
  }

  .footer-col {
    min-width: unset;
    width: 100%;
  }

  .footer-bottom {
    margin-top: 20px;
  }
}

/* Body no-scroll for mobile menu */
body.no-scroll {
  overflow: hidden;
}
/* 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;
  }
}
