:root {
  --primary-color: #017439;
  --auxiliary-color: #FFFFFF;
  --register-btn-color: #C30808;
  --login-btn-color: #C30808;
  --btn-font-color: #FFFF00;
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}
@media (max-width: 768px) {
  :root {
    --header-offset: 100px; /* Mobile: header-top (50px) + mobile-nav-buttons (50px) */
  }
}

/* General Body Styling for header offset and overflow */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Apply header offset */
  overflow-x: hidden; /* Prevent horizontal scroll */
  color: #333333;
  background-color: var(--auxiliary-color); /* Page background */
}

/* Header Styling */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  min-height: 110px; /* For desktop */
}

.header-top {
  background-color: #015C2E; /* Darker green for header top */
  color: var(--auxiliary-color);
  padding: 10px 0; /* Adjust vertical padding */
  display: flex;
  align-items: center;
  min-height: 60px; /* Desktop height */
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--btn-font-color); /* Yellow for logo */
  text-decoration: none;
  padding: 5px 0;
  display: block; /* Ensure it's not hidden */
}

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

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--auxiliary-color);
  transition: all 0.3s ease;
}

.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(-11px) rotate(-45deg);
}

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

.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;
  white-space: nowrap;
  text-align: center;
  box-sizing: border-box;
}

.btn-register {
  background-color: var(--register-btn-color); /* Red */
  color: var(--btn-font-color); /* Yellow */
  border: 1px solid var(--register-btn-color);
}

.btn-register:hover {
  background-color: #A60707; /* Darker red on hover */
  transform: translateY(-2px);
}

.btn-login {
  background-color: var(--login-btn-color); /* Red */
  color: var(--btn-font-color); /* Yellow */
  border: 1px solid var(--login-btn-color);
}

.btn-login:hover {
  background-color: #A60707; /* Darker red on hover */
  transform: translateY(-2px);
}

/* Mobile Nav Buttons (Desktop hidden) */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
}

.main-nav {
  background-color: var(--auxiliary-color); /* White for main nav */
  padding: 10px 0;
  min-height: 50px; /* Desktop height */
  display: flex; /* Desktop default */
  flex-direction: row; /* Desktop default */
  align-items: center;
  justify-content: center;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row; /* Desktop default */
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 0 20px;
  flex-wrap: wrap; /* Allow wrapping for many links on desktop if needed */
}

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

.nav-link:hover {
  color: var(--auxiliary-color);
  background-color: var(--primary-color);
  border-radius: 3px;
}

/* Mobile Menu Overlay */
.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);
  z-index: 999;
}
.mobile-menu-overlay.active {
  display: block;
}

/* Footer Styling */
.site-footer {
  background-color: var(--primary-color); /* Primary green for footer */
  color: var(--auxiliary-color);
  padding: 40px 20px;
  text-align: center;
}

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

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

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--btn-font-color); /* Yellow for footer logo */
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-col h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--auxiliary-color);
}

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

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

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

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

.copyright {
  font-size: 14px;
  margin-top: 20px;
  text-align: left;
  color: var(--auxiliary-color);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .site-header {
    min-height: 100px; /* Mobile header height */
  }

  .header-top {
    padding: 5px 0;
    min-height: 50px; /* Mobile header-top height */
  }

  .header-container {
    padding: 0 15px; /* Smaller padding on mobile */
    justify-content: space-between; /* Hamburger left, Logo center, space right */
    position: relative; /* For absolute logo centering if needed */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    order: 1; /* Place on the left */
  }

  .logo {
    order: 2; /* Center the logo */
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px; /* Smaller font size for mobile logo */
  }
  .logo img { /* If logo is an image */
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

  .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; /* Vertical padding for the row, horizontal for content */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: #016A35; /* Slightly different background for mobile buttons section */
    justify-content: center; /* Center buttons if less than 2 */
  }

  .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 */
    font-size: 13px; /* Smaller font size */
    white-space: normal;
    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: 0; /* Align with top, will be offset by body padding */
    left: 0;
    width: 280px; /* Sidebar width */
    height: 100%;
    background-color: #016A35; /* Darker background for mobile menu */
    padding-top: var(--header-offset); /* Push menu content down below fixed header */
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease-in-out;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    align-items: flex-start;
    justify-content: flex-start;
    overflow-y: auto; /* Enable scrolling for long menus */
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 15px;
    width: 100%; /* Occupy full width of sidebar */
    max-width: none; /* Remove max-width for mobile container */
  }

  .nav-link {
    width: 100%; /* Full width for menu items */
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--auxiliary-color); /* White for mobile nav links */
  }

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

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

  .footer-container {
    flex-direction: column;
    text-align: center;
  }

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

  .footer-col h3 {
    margin-top: 20px;
  }

  .footer-logo {
    margin: 0 auto 15px auto;
  }

  .copyright {
    text-align: center;
  }

  /* Page content images and 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;
  }
}

/* Ensure body does not scroll when menu is open */
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;
  }
}
