:root {
  --primary-color: #26A9E0;
  --auxiliary-color: #FFFFFF;
  --login-button-color: #EA7C07;
  --text-color: #000000;
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

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

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content doesn't get hidden by fixed header */
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--auxiliary-color); /* Default background */
  overflow-x: hidden; /* Prevent horizontal scroll for body */
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

a:hover {
  text-decoration: underline;
}

.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(--auxiliary-color); /* Default background for entire header */
}

.header-top {
  background-color: var(--primary-color); /* Top bar with primary color */
  padding: 10px 0;
  color: var(--auxiliary-color);
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--auxiliary-color);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 250px; /* Limit logo width */
}

.desktop-nav-buttons {
  display: flex;
  gap: 10px;
  margin-left: auto; /* Push buttons to the right */
}

.btn {
  padding: 10px 15px;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  text-align: center;
}

.btn-login {
  background-color: var(--login-button-color); /* Specific color for login */
  color: var(--auxiliary-color);
  border: 2px solid var(--login-button-color);
}

.btn-login:hover {
  background-color: #D36C06; /* Slightly darker orange */
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-register {
  background-color: var(--auxiliary-color);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-register:hover {
  background-color: var(--primary-color);
  color: var(--auxiliary-color);
  transform: translateY(-2px);
  text-decoration: none;
}

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

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

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

.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: none; /* Hidden on desktop, shown on mobile */
  background-color: #f8f8f8; /* Light grey background for mobile buttons */
  padding: 10px 15px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden; /* Ensure buttons don't overflow */
  border-bottom: 1px solid #eee;
}

.main-nav {
  background-color: var(--auxiliary-color); /* Menu bar with auxiliary color */
  padding: 10px 0;
  width: 100%;
  display: flex; /* Desktop default: flex */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center; /* Center menu items on desktop */
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap; /* Allow wrapping if many items */
}

.nav-link {
  color: var(--text-color);
  font-weight: bold;
  padding: 8px 15px;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap; /* Prevent menu items from wrapping */
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color);
  background-color: rgba(var(--primary-color), 0.1); /* Light background on hover/active */
  border-radius: 5px;
  text-decoration: none;
}

/* Footer Styles */
.site-footer {
  background-color: #333333; /* Dark background for footer */
  color: #cccccc;
  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: 250px;
  max-width: 30%; /* Adjust for 3 columns */
}

.footer-logo {
  font-size: 20px;
  font-weight: bold;
  color: var(--auxiliary-color);
  margin-bottom: 15px;
  display: block;
}

.footer-logo:hover {
  text-decoration: none;
}

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

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

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

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

.footer-nav a {
  color: #cccccc;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #555555;
  color: #aaaaaa;
}

/* Mobile specific styles */
@media (max-width: 768px) {
  .header-container, .nav-container, .footer-container {
    width: 100%;
    max-width: none; /* Remove max-width on mobile */
    padding: 0 15px; /* Adjust padding for mobile */
    box-sizing: border-box;
  }

  .site-header {
    overflow-x: hidden; /* Prevent header content from causing horizontal scroll */
  }

  .header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px; /* Adjust padding */
    min-height: 40px;
  }

  .header-top .header-container {
    padding: 0; /* Reset container padding for specific header-top padding */
  }

  .logo {
    flex: 1 !important; /* Take available space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
    max-width: calc(100% - 80px); /* Adjust max-width to leave space for hamburger */
    order: 2; /* Center 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 */
  }

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    order: 1; /* Place hamburger on the left */
    margin-right: auto; /* Push hamburger to the left */
    margin-left: 0;
  }

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    padding: 10px 15px; /* Ensure padding matches container */
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    background-color: #f8f8f8; /* A slightly lighter background for the buttons bar */
    border-bottom: 1px solid #eee;
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Max width for two buttons with 10px gap */
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header (top bar + mobile buttons) */
    left: 0;
    width: 100%;
    height: calc(100% - var(--header-offset)); /* Take remaining height */
    background-color: var(--auxiliary-color);
    overflow-y: auto;
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease-in-out;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 999; /* Below hamburger menu, above content */
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start; /* Align menu items to the left */
    padding: 20px 15px; /* Adjust padding for mobile menu */
  }

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    white-space: normal; /* Allow wrapping for long menu items */
  }

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

  .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: 998; /* Below menu, above content */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
  }

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

  .footer-col {
    flex: 1 1 100%; /* Stack columns on mobile */
    max-width: 100%;
  }

  /* Prevent content images from overflowing on mobile */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}

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