: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 (60px) + main-nav (50px) */
}

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

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

.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(--secondary-color); /* Main header background */
}

.header-top {
  background-color: var(--primary-color); /* Top bar background */
  width: 100%;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
}

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

.btn {
  padding: 10px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease;
  white-space: nowrap;
  display: inline-block;
  box-sizing: border-box;
  color: var(--btn-text-color);
}

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

.btn-register:hover {
  background-color: #E03030;
}

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

.btn-login:hover {
  background-color: #E03030;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 1001; /* Above mobile-nav-buttons */
}

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

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

.main-nav {
  background-color: var(--secondary-color); /* Nav bar background */
  width: 100%;
  display: flex; /* Desktop default: flex */
  box-sizing: border-box;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 50px; /* Desktop main-nav height */
  flex-wrap: nowrap;
  overflow-x: auto; /* Allow horizontal scroll for many links on desktop if needed */
}

.nav-link {
  color: var(--primary-color);
  text-decoration: none;
  padding: 10px 15px;
  white-space: nowrap;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-link:hover {
  background-color: rgba(1, 116, 57, 0.1);
  border-radius: 4px;
}

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

.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;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.mobile-menu-overlay.active {
  opacity: 1;
  display: block;
}

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

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

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

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

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

.site-footer p,
.site-footer li {
  margin-bottom: 10px;
  color: var(--secondary-color);
}

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

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

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

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

.copyright {
  margin: 0;
  color: var(--secondary-color);
}

/* Mobile media queries */
@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 {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }

  .header-container {
    height: 50px; /* Mobile header-top height */
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Important for mobile */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
    height: 100%;
  }

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

  .hamburger-menu {
    display: block;
    order: -1; /* Move to left */
    margin-right: auto; /* Push logo to center */
  }

  .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: flex !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Added padding to container */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--secondary-color); /* Same as main-nav for consistency */
    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); /* 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;
  }

  .main-nav {
    display: none; /* Default hidden */
    position: fixed;
    top: var(--header-offset); /* Position below header and mobile buttons */
    left: 0;
    width: 80%; /* Sidebar width */
    max-width: 300px; /* Max width for sidebar */
    height: calc(100vh - var(--header-offset));
    background-color: var(--primary-color); /* Sidebar background */
    flex-direction: column;
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease, display 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    z-index: 1000;
  }

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

  .nav-container {
    flex-direction: column;
    padding: 20px 0;
    height: auto;
    width: 100%;
    max-width: none; /* Important for mobile */
  }

  .nav-link {
    padding: 15px 20px;
    width: 100%;
    text-align: left;
    color: var(--secondary-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

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

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

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

  .footer-logo {
    margin-bottom: 10px;
  }

  .site-footer h3 {
    margin-bottom: 10px;
  }
}
.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;
  }
}
