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

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #333333;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

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

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

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FFFFFF; /* Secondary color for logo text */
  text-decoration: none;
  padding: 5px 0;
  display: inline-block;
}

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

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

.login-btn {
  background-color: #FCBC45; /* Login specific color */
  color: #000000; /* Primary color for text */
}

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

.register-btn {
  background-color: #FFFFFF; /* Register specific color */
  color: #000000; /* Primary color for text */
  border: 1px solid #FCBC45; /* Add a subtle border for contrast */
}

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

.main-nav {
  background-color: #333333; /* Dark grey for contrast with header-top */
  padding: 10px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50px; /* Fixed height for main-nav */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap; /* Allow nav links to wrap on smaller screens */
}

.nav-link {
  color: #FFFFFF; /* Secondary color 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 {
  background-color: rgba(255, 255, 255, 0.1);
  color: #FCBC45; /* Highlight color on hover */
  border-radius: 4px;
}

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

.hamburger-icon {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-icon::before {
  top: -8px;
}

.hamburger-icon::after {
  top: 8px;
}

/* Hamburger active state */
.hamburger-menu.active .hamburger-icon {
  background-color: transparent;
}

.hamburger-menu.active .hamburger-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.hamburger-menu.active .hamburger-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
  justify-content: center;
  gap: 12px;
  padding: 10px 20px;
  background-color: #222222; /* Slightly different dark background */
  min-height: 50px; /* Fixed height for mobile buttons */
  align-items: center;
}

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

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

/* Footer Styles */
.site-footer {
  background-color: #000000; /* Primary color */
  color: #FFFFFF; /* Secondary color for footer text */
  padding: 40px 20px;
  font-size: 14px;
  line-height: 1.6;
}

.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: 180px;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #FFFFFF;
}

.site-footer h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #FCBC45; /* Highlight color for footer headings */
}

.footer-nav {
  display: flex;
  flex-direction: column;
}

.footer-nav a {
  color: #FFFFFF;
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

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

/* Mobile styles */
@media (max-width: 768px) {
  .site-header {
    min-height: auto; /* Allow header to adjust height */
  }

  .header-top {
    padding: 10px 0;
    min-height: 60px;
  }

  .header-container {
    padding: 0 15px;
    width: 100%; /* Important for mobile container */
    max-width: none; /* Important for mobile container */
    justify-content: space-between; /* Hamburger left, logo right initially */
  }

  .logo {
    flex: 1 !important; /* For text logo centering */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    order: 2; /* Logo in the middle */
    padding: 0; /* Remove padding from logo itself */
  }

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

  .hamburger-menu {
    display: block; /* Show hamburger */
    order: 1; /* Hamburger on the left */
  }

  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header */
    left: 0;
    width: 250px;
    height: calc(100vh - var(--header-offset)); /* Full height below header */
    background-color: #222222; /* Dark background for mobile menu */
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Enable scrolling for long menus */
    min-height: auto; /* Allow menu to adapt height */
  }

  .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%; /* Important for mobile container */
    max-width: none; /* Important for mobile container */
  }

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

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

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    background-color: #000000; /* Match header-top background */
    padding: 10px 15px;
    min-height: 50px;
    justify-content: center;
    order: 3; /* Buttons below logo */
  }

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

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

  .footer-col {
    min-width: unset;
    width: 100%;
  }
  
  /* Mobile content overflow prevention */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}

/* No scroll for body when mobile 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;
  }
}
