:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --register-btn-color: #C30808;
  --login-btn-color: #C30808;
  --btn-text-color: #FFFF00;
  --background-color: #FFFFFF;
  --text-color: #333333; /* Default text color for contrast */
  --header-offset: 105px; /* Desktop: header-top (60px) + main-nav (45px) */
}

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

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  background-color: var(--background-color);
  color: var(--text-color);
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

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

.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); /* Fallback, specific sections will override */
}

.header-top {
  background-color: var(--primary-color); /* Dark green for top bar */
  min-height: 60px; /* Desktop header-top height */
  display: flex;
  align-items: center;
  padding: 10px 0; /* Vertical padding */
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* White logo text on dark green background */
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-decoration: none; /* Remove underline */
}

.btn-register {
  background-color: var(--register-btn-color); /* Red */
  color: var(--btn-text-color); /* Yellow */
}

.btn-login {
  background-color: var(--login-btn-color); /* Red */
  color: var(--btn-text-color); /* Yellow */
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.main-nav {
  background-color: var(--secondary-color); /* White for main nav bar */
  min-height: 45px; /* Desktop main-nav height */
  display: flex; /* Desktop default: flex */
  align-items: center;
  padding: 0;
}

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

.nav-link {
  color: var(--primary-color); /* Green text for nav links */
  padding: 10px 15px;
  font-weight: bold;
  font-size: 16px;
  white-space: nowrap;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.nav-link:hover {
  background-color: rgba(1, 116, 57, 0.1); /* Light green hover effect */
  border-radius: 3px;
}

/* Hamburger menu - hidden on desktop */
.hamburger-menu {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001;
}

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

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

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

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

/* Mobile menu overlay - hidden on desktop */
.mobile-menu-overlay {
  display: none; /* Hidden on desktop */
}

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

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

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

.footer-col h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--btn-text-color); /* Yellow for footer headings */
}

.footer-col .footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 15px;
}

.footer-col p {
  line-height: 1.6;
  margin: 0;
}

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

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

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

.footer-nav a:hover {
  color: var(--btn-text-color); /* Yellow hover */
}

/* --- Mobile Specific Styles --- */
@media (max-width: 768px) {
  .site-header {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Ensure shadow is visible on mobile too */
  }

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

  .header-container {
    padding: 0 15px; /* Smaller side padding for mobile */
    width: 100%; /* Occupy full width */
    max-width: none; /* Remove max-width constraint */
    justify-content: space-between; /* Space out hamburger and logo */
  }

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    order: 1; /* Place hamburger menu first */
  }

  .logo {
    order: 2; /* Place logo second */
    flex: 1; /* Allow logo to take available space for centering */
    text-align: center; /* Center text logo */
    font-size: 24px; /* Adjust font size for mobile */
  }

  .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 mobile button bar */
    overflow: hidden; /* Prevent overflow */
    gap: 10px;
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
    background-color: var(--background-color); /* White background for mobile buttons */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  }

  .mobile-nav-buttons .btn {
    flex: 1; min-width: 0;
    max-width: calc(50% - 5px); /* Max width for two buttons 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; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical menu */
    position: fixed;
    top: var(--header-offset); /* Start below fixed header and mobile buttons */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Max width for menu */
    height: calc(100vh - var(--header-offset)); /* Full height below header */
    background-color: var(--primary-color); /* Green menu background */
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    overflow-y: auto; /* Allow scrolling for long menus */
    z-index: 9999; /* Ensure menu is above other content */
  }

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

  .nav-container {
    flex-direction: column; /* Stack links vertically */
    align-items: flex-start; /* Align links to the left */
    padding: 20px 15px; /* Padding for mobile menu links */
    width: 100%; /* Occupy full width */
    max-width: none; /* Remove max-width constraint */
  }

  .nav-link {
    width: 100%; /* Full width for each link */
    padding: 12px 0;
    color: var(--secondary-color); /* White text on green menu */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Separator */
    font-size: 18px;
  }

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

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

  .mobile-menu-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black overlay */
    z-index: 9998; /* Below menu, above content */
  }

  .mobile-menu-overlay.active {
    display: block; /* Show overlay when active */
  }

  .site-footer {
    padding: 30px 15px;
  }

  .footer-container {
    flex-direction: column; /* Stack footer columns vertically */
    gap: 20px;
  }

  .footer-col {
    min-width: unset; /* Remove min-width constraint */
    flex-basis: auto; /* Adjust flex basis */
  }

  /* Mobile content 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;
  }
}

/* Utility class to prevent body scrolling */
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;
  }
}
