:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --btn-register-bg: #C30808;
  --btn-login-bg: #C30808;
  --btn-text-color: #FFFF00;
  --header-offset: 110px; /* Desktop: header-top (70px) + main-nav (40px) */
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  background-color: var(--secondary-color);
  color: #333;
  overflow-x: hidden;
}

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

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to right, #005c2d, var(--primary-color)); /* Darker green to primary green gradient */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  min-height: 70px; /* Base height for header-top */
  transition: all 0.3s ease-in-out;
}

.site-header .header-top {
  background-color: #005c2d; /* Darker green */
  color: var(--secondary-color);
  padding: 15px 0;
}

.site-header .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 40px; /* Logo/buttons content height */
}

.site-header .logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  white-space: nowrap;
  padding: 0;
  margin: 0;
  order: 0; /* Desktop order */
}

.site-header .main-nav {
  background-color: var(--primary-color); /* Primary green */
  color: var(--secondary-color);
  padding: 10px 0;
  display: flex; /* Desktop default */
  min-height: 40px; /* Nav links content height */
}

.site-header .nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.site-header .nav-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
  padding: 5px 10px;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

.site-header .nav-link:hover,
.site-header .nav-link.active {
  color: var(--btn-text-color);
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border: none;
}

.btn-register {
  background-color: var(--btn-register-bg);
  color: var(--btn-text-color);
}

.btn-login {
  background-color: var(--btn-login-bg);
  color: var(--btn-text-color);
}

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

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

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

/* Hamburger Menu (Desktop Hidden) */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1001;
  padding: 5px;
  box-sizing: content-box;
}

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

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

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

/* Site Footer */
.site-footer {
  background-color: #014d25; /* Slightly darker green */
  color: var(--secondary-color);
  padding: 40px 0 20px;
  font-size: 14px;
}

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

.site-footer .footer-section {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
}

.site-footer .footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  margin-bottom: 15px;
  display: block;
}

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

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

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

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

.site-footer ul li a:hover {
  color: var(--btn-text-color);
}

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

.site-footer .footer-bottom p {
  margin: 0;
}

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

  .site-header .header-top {
    padding: 15px 0;
  }

  .site-header .header-container {
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    min-height: 40px;
  }

  .site-header .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Account for hamburger menu width */
  }

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

  .hamburger-menu.active span:nth-child(1) {
    transform: translateY(11px) 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: none;
  }

  .mobile-nav-buttons {
    display: flex !important;
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: rgba(0, 0, 0, 0.1); /* Subtle background for visibility */
  }

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

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

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

  .site-header .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    width: 100%;
  }

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

  .site-footer .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 15px;
  }

  .site-footer .footer-section {
    max-width: 100%;
    margin-bottom: 20px;
  }

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

@media (max-width: 480px) {
  .site-header .logo {
    font-size: 22px;
  }
  .mobile-nav-buttons .btn {
    font-size: 12px;
    padding: 7px 10px;
  }
}

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