:root {
  --primary-color: #017439;
  --auxiliary-color: #FFFFFF;
  --button-bg-color: #A80707;
  --button-text-color: #FFFF00;
  --header-offset: 120px; /* Desktop: header-top (70px) + main-nav (50px) */
}

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

body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.header-top {
  background-color: #000000; /* Black for header-top background */
  padding: 10px 0;
  min-height: 50px;
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--auxiliary-color); /* White for logo text */
  text-decoration: none;
  white-space: nowrap;
  padding-right: 20px;
}

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

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  box-sizing: border-box;
}

.nav-link {
  color: #000000; /* Black for nav links on white background */
  text-decoration: none;
  padding: 8px 15px;
  margin: 0 5px;
  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: 4px;
}

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

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  white-space: nowrap;
  cursor: pointer;
  border: none;
}

.btn-register, .btn-login {
  background-color: var(--button-bg-color); /* Darker Red */
  color: var(--button-text-color); /* Yellow */
  box-shadow: 0 4px 10px rgba(168, 7, 7, 0.4);
}

.btn-register:hover, .btn-login:hover {
  background-color: #d80a0a; /* Slightly lighter red on hover */
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(168, 7, 7, 0.6);
}

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  padding: 5px;
  position: relative;
  z-index: 1001;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--auxiliary-color); /* White for hamburger icon */
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile specific styles */
.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
  background-color: #000000; /* Black for mobile buttons background */
  padding: 10px 15px;
  box-sizing: border-box;
  justify-content: center; /* Center buttons when only one */
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

.site-footer {
  background-color: #000000; /* Black for footer background */
  color: var(--auxiliary-color); /* White for footer text */
  padding: 40px 20px 20px;
  text-align: center;
  font-size: 14px;
}

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

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

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

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

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

.footer-col ul li a {
  color: var(--auxiliary-color); /* White for footer links */
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-col ul li a:hover {
  color: var(--primary-color);
}

.footer-col p {
  margin-bottom: 8px;
}

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

/* Mobile responsive styles */
@media (max-width: 768px) {
  .header-container,
  .nav-container {
    width: 100%;
    max-width: none;
    padding: 0 15px; /* Smaller padding for mobile */
  }

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

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

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    padding-right: 0;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    flex-wrap: nowrap;
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Max width for two buttons with 10px 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; /* Hidden by default, shown with JS */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 70%;
    height: calc(100% - var(--header-offset));
    background-color: var(--auxiliary-color); /* White background for mobile menu */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease;
    overflow-y: auto;
    align-items: flex-start;
    padding-top: 20px;
  }

  .main-nav.active {
    display: flex; /* Ensure it's displayed when active */
    transform: translateX(0); /* Slide in */
  }

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    margin: 0;
    border-bottom: 1px solid #eee;
    text-align: left;
    color: #000000; /* Black for nav links on white background */
  }

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

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

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

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

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