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

/* Global styles for desktop (default) */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #FFFFFF; /* Default text color for dark scheme */
  background-color: #FFFFFF; /* General page background */
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  overflow-x: hidden; /* Prevent horizontal scroll on desktop */
}

body.no-scroll {
  overflow: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

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

.header-top {
  background-color: #000000; /* Primary color */
  min-height: 70px; /* Desktop height */
  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; /* Padding for logo and buttons */
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #FFFFFF;
  text-transform: uppercase;
}

.desktop-nav-buttons {
  display: flex; /* Always visible on desktop */
  gap: 12px;
}

.btn {
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
  text-decoration: none; /* Remove underline */
  display: inline-block;
  text-align: center;
}

.btn-login {
  background-color: #FCBC45; /* Login color */
  color: #000000; /* Text color for login button */
  border: 1px solid #FCBC45;
}

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

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

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

.main-nav {
  background-color: #1a1a1a; /* Dark grey, contrasting with header-top */
  min-height: 50px; /* Desktop height */
  display: flex; /* Desktop default: flex */
  align-items: center;
  width: 100%;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: row; /* Desktop default: row */
  justify-content: center; /* Centered menu items */
  align-items: center;
  padding: 10px 20px;
}

.nav-link {
  color: #FFFFFF;
  padding: 8px 15px;
  white-space: nowrap;
  transition: color 0.3s ease, background-color 0.3s ease;
}

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

/* Mobile specific elements (hidden by default on desktop) */
.hamburger-menu,
.mobile-nav-buttons,
.mobile-menu-overlay {
  display: none;
}

/* Footer styles */
.site-footer {
  background-color: #000000; /* Primary color */
  color: #FFFFFF;
  padding: 40px 20px 20px;
  text-align: center;
}

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

.footer-section {
  flex: 1;
  min-width: 200px;
  margin-bottom: 20px;
}

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

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

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

.footer-section ul li a {
  color: #FFFFFF;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: #FCBC45;
}

.footer-bottom {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #333333;
  font-size: 14px;
}

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

  .header-container, .nav-container {
    width: 100%; /* Must be 100% on mobile */
    max-width: none; /* Must not be restricted on mobile */
    padding: 0 15px; /* Smaller padding for mobile */
  }

  .header-top {
    min-height: 60px; /* Mobile height */
    position: relative;
    justify-content: flex-start; /* Align hamburger to start */
  }

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

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

  .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 {
    font-size: 20px;
    position: absolute; /* Position absolute for true center */
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 70px); /* Adjust width to not overlap hamburger */
    text-align: center; /* For text logo */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

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

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    justify-content: center;
    align-items: center;
    gap: 10px;
    background-color: #000000; /* Same as header-top for consistency */
    padding: 10px 15px;
    min-height: 60px; /* Mobile height */
    width: 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Add shadow for distinction */
  }

  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column; /* Vertical layout */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header (header-top + mobile-nav-buttons) */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px;
    height: calc(100% - var(--header-offset)); /* Fill remaining viewport height */
    background-color: #1a1a1a; /* Same as desktop main-nav */
    overflow-y: auto;
    transition: transform 0.3s ease-in-out;
    transform: translateX(-100%); /* Off-screen by default */
    z-index: 999; /* Below hamburger, above overlay */
  }

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

  .nav-link {
    padding: 15px 20px;
    width: 100%;
    border-bottom: 1px solid #333333;
  }
  .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.7);
    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-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-section {
    min-width: auto;
    width: 100%;
  }
}
/* 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;
  }
}
