:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --button-bg-color: #C30808;
  --button-text-color: #FFFF00;
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}
@media (max-width: 768px) {
  :root {
    --header-offset: 90px; /* Mobile: header-top (50px) + mobile-nav-buttons (40px) */
  }
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333333;
  line-height: 1.6;
  padding-top: var(--header-offset); /* Apply offset to body */
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

/* Header styles */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  background-color: var(--secondary-color); /* Fallback, main parts have specific colors */
}

.header-top {
  background-color: var(--primary-color); /* Dark green for top bar */
  width: 100%;
  height: 60px; /* Fixed height for desktop top bar */
  display: flex;
  align-items: center;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px; /* Desktop padding */
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%; /* Ensure container takes full width within max-width */
}

.logo {
  color: var(--secondary-color); /* White logo text on dark green background */
  text-decoration: none;
  font-size: 24px;
  font-weight: bold;
  display: block; /* Ensure logo is visible */
  white-space: nowrap;
}

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

.btn {
  background-color: var(--button-bg-color);
  color: var(--button-text-color);
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap; /* Prevent breaking on desktop */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn:hover {
  background-color: #A30606; /* Slightly darker red on hover */
  transform: translateY(-1px);
}

.main-nav {
  background-color: #F0F0F0; /* Light gray for main navigation bar */
  width: 100%;
  display: flex; /* Desktop default: visible and horizontal */
  height: 50px; /* Fixed height for desktop main nav */
  align-items: center;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px; /* Desktop padding */
  display: flex;
  justify-content: center; /* Center nav links on desktop */
  align-items: center;
  width: 100%; /* Ensure container takes full width within max-width */
}

.nav-link {
  color: var(--primary-color); /* Dark green text on light gray background */
  text-decoration: none;
  padding: 10px 15px;
  font-weight: bold;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
  border-radius: 4px;
}

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

.hamburger-menu {
  display: none; /* Hidden on desktop */
  cursor: pointer;
  width: 30px;
  height: 20px;
  position: relative;
  z-index: 1001; /* Above logo and buttons on mobile */
  order: 0; /* Place to the left on mobile */
}

.hamburger-menu span {
  display: block;
  height: 3px;
  background-color: var(--secondary-color); /* White lines on dark green header */
  border-radius: 3px;
  position: absolute;
  left: 0;
  width: 100%;
  transition: all 0.3s ease;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 8px; }
.hamburger-menu span:nth-child(3) { top: 16px; }

.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); }

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

.mobile-menu-overlay {
  display: none; /* Hidden by default */
}

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

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}

.footer-col {
  flex: 1;
  min-width: 200px;
  margin-bottom: 20px;
}

.footer-col.about-col {
  flex: 2; /* Make about column wider */
}

.footer-logo {
  color: var(--secondary-color);
  font-size: 22px;
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 15px;
}

.site-footer h4 {
  color: var(--secondary-color);
  font-size: 16px;
  margin-top: 0;
  margin-bottom: 15px;
}

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

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

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

.footer-nav a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: rgba(255, 255, 255, 0.7); /* Lighter white on hover */
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 20px;
  margin-top: 30px;
  text-align: center;
}

.copyright {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

/* Mobile specific styles */
@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;
  }

  .site-header {
    min-height: auto; /* Allow height to adjust for mobile header + buttons */
  }

  .header-top {
    height: 50px; /* Smaller height for mobile top bar */
    padding: 0 15px; /* Adjust padding for mobile */
  }

  .header-container {
    padding: 0; /* Remove padding from header-container, applied to header-top */
    width: 100%; /* Full width for container */
    max-width: none; /* No max-width on mobile */
    position: relative; /* For logo absolute positioning if needed */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
  }

  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important; /* Center logo */
    align-items: center !important;
    font-size: 20px; /* Smaller font size for mobile logo */
    order: 1; /* Place in middle */
    max-width: calc(100% - 60px); /* Account for hamburger width */
  }

  .desktop-nav-buttons {
    display: none; /* Hide desktop buttons on mobile */
  }

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Padding for the button bar */
    overflow: hidden; /* Prevent buttons from overflowing */
    gap: 10px;
    flex-wrap: nowrap; /* Keep buttons on one line */
    background-color: var(--primary-color); /* Match header-top color */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Ensure two buttons fit with gap */
    box-sizing: border-box;
    padding: 8px 12px; /* Smaller padding for mobile buttons */
    font-size: 13px; /* Smaller font size for mobile buttons */
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center; /* Center text within button */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below header and mobile buttons */
    left: 0;
    width: 250px; /* Width of the side menu */
    height: calc(100vh - var(--header-offset)); /* Full height below header */
    background-color: #333333; /* Dark background for mobile menu */
    flex-direction: column;
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Enable scrolling for long menus */
    box-shadow: 2px 0 5px rgba(0,0,0,0.5);
    z-index: 1002; /* Above overlay */
    padding: 20px 0; /* Padding inside the mobile menu */
  }

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

  .nav-container {
    flex-direction: column; /* Stack nav links vertically */
    padding: 0; /* Remove padding, handled by nav-link */
    max-width: none; /* No max-width on mobile */
  }

  .nav-link {
    color: var(--secondary-color); /* White text on dark mobile menu */
    width: 100%;
    padding: 12px 20px; /* Larger touch area */
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

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

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

  .footer-container {
    flex-direction: column; /* Stack footer columns vertically */
    padding: 0 15px;
  }

  .footer-col {
    min-width: auto; /* Allow columns to shrink */
    text-align: center;
  }

  .footer-nav {
    text-align: 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;
  }
}
