:root {
  --header-offset: 104px; /* Desktop: header-top (60px) + main-nav (44px) */
}
@media (max-width: 768px) {
  :root {
    --header-offset: 130px; /* Mobile: header-top (70px) + mobile-buttons-area (60px) */
  }
}

/* General Styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333;
  background-color: #FFFFFF;
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  min-height: var(--header-offset);
  background-color: #000000; /* Fallback for the whole header */
}

.header-top {
  background-color: #000000; /* Primary color for top section */
  color: #FFFFFF;
  padding: 15px 0;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  color: #FFFFFF;
  white-space: nowrap;
}

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

.btn {
  display: inline-block;
  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;
  cursor: pointer;
}

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

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

.btn-register {
  background-color: #FFFFFF; /* Custom color for Register */
  color: #000000;
  border: 1px solid #FCBC45;
}

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

.hamburger-menu {
  display: none; /* Hidden on desktop */
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  padding: 0;
  z-index: 1001;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  transition: all 0.3s ease-in-out;
}

.main-nav {
  background-color: #FFFFFF; /* Auxiliary color for main navigation */
  color: #000000;
  padding: 10px 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 25px;
}

.nav-link {
  text-decoration: none;
  color: #000000;
  font-weight: bold;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: #FCBC45;
}

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

.mobile-menu-overlay {
  display: none; /* Hidden by default */
}

/* Footer Styles */
.site-footer {
  background-color: #000000; /* Primary color for footer */
  color: #FFFFFF;
  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-column {
  flex: 1 1 200px;
  min-width: 150px;
}

.footer-column h3 {
  font-size: 18px;
  margin-top: 0;
  margin-bottom: 15px;
  color: #FCBC45;
}

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

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

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

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

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

.footer-bottom p {
  margin: 0;
}

/* Responsive Styles */
@media (max-width: 768px) {
  /* 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;
  }

  .site-header {
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
    justify-content: space-between;
    position: relative; /* For proper stacking context */
  }

  .hamburger-menu {
    display: flex;
    position: relative;
    z-index: 1002; /* Ensure it's clickable and above logo */
  }

  .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; /* Allow logo to take available space */
    text-align: center; /* Center the text content */
    color: #FFFFFF; /* Ensure visibility */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 100px); /* Adjust width to not overlap hamburger */
    z-index: 1001;
  }

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

  .mobile-buttons-area {
    display: block;
    background-color: #000000; /* Primary color */
    padding: 10px 0;
    text-align: center;
    z-index: 990; /* Below hamburger/menu */
  }

  .mobile-buttons-area .header-container {
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: none;
    padding: 0 15px;
  }

  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 280px; /* Width of the mobile menu */
    height: 100vh; /* Full viewport height */
    background-color: #000000; /* Dark background for mobile menu */
    flex-direction: column;
    padding-top: 80px; /* Space for fixed header content */
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease-out;
    z-index: 1000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 20px;
    gap: 15px;
    max-width: none; /* Remove max-width for mobile nav container */
    width: 100%;
  }

  .main-nav .nav-link {
    color: #FFFFFF; /* White links on dark background */
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

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

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

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

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

  .footer-column {
    flex: 1 1 100%;
    margin-bottom: 20px;
  }

  .footer-column:last-child {
    margin-bottom: 0;
  }

  .footer-nav ul {
    padding: 0;
  }
}

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