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

/* Basic Reset & Body Padding */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  padding-top: var(--header-offset); /* Apply header offset to body */
  overflow-x: hidden; /* Prevent horizontal scroll on mobile */
  background-color: #FFFFFF; /* Overall background color */
  color: #333333; /* Default text color */
  direction: ltr; /* Text direction */
}

/* Prevent background scroll when menu is open */
body.no-scroll {
  overflow: hidden;
}

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column; /* Default to column, desktop will override for main-nav */
}

/* Header Top Section (Desktop: Logo Left, Buttons Right) */
.header-top {
  background-color: #000000; /* Primary color */
  width: 100%;
  padding: 10px 0; /* Vertical padding for header-top */
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #FCBC45; /* Contrast with black header-top */
  text-decoration: none;
  text-transform: uppercase; /* Logo text must be uppercase */
  padding: 5px 0; /* Ensure clickable area */
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 10px;
}

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

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

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

.btn-register {
  background-color: #FFFFFF; /* Custom color for Register */
  color: #000000; /* Contrast with button background */
}

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

/* Main Navigation (Desktop: Menu Centered) */
.main-nav {
  background-color: #1a1a1a; /* Dark gray, contrasts with header-top black */
  width: 100%;
  padding: 10px 0; /* Vertical padding for main-nav */
  display: flex; /* Desktop default: flex */
  flex-direction: row; /* Desktop default: row */
}

.main-nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center; /* Center menu items on desktop */
  align-items: center;
  padding: 0 20px; /* Horizontal padding for container content */
  flex-wrap: wrap; /* Allow items to wrap if screen is too narrow */
}

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

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
  background-color: #333333;
  border-radius: 4px;
}

/* Hamburger Menu (Mobile Only) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001; /* Above logo */
}

.hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #FFFFFF;
  margin: 5px 0;
  transition: all 0.3s ease;
}

.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Navigation Buttons Wrapper (Mobile Only) */
.mobile-nav-buttons-wrapper {
  display: none; /* Hidden on desktop */
  background-color: #000000; /* Same as header-top */
  padding: 10px 0;
  width: 100%;
}

.mobile-nav-buttons-wrapper .header-container {
  justify-content: center; /* Center buttons on mobile */
  gap: 10px;
}

/* Mobile Menu Overlay */
.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;
}

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

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

.site-footer .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}

.site-footer .footer-section {
  flex: 1;
  min-width: 250px;
  text-align: left;
}

.site-footer .footer-logo {
  font-size: 20px;
  font-weight: bold;
  color: #FCBC45; /* Contrast with black footer */
  text-decoration: none;
  text-transform: uppercase;
  margin-bottom: 15px;
  display: block;
}

.site-footer .footer-about p {
  font-size: 14px;
  line-height: 1.6;
}

.site-footer .footer-links h3 {
  font-size: 18px;
  margin-bottom: 20px;
  color: #FCBC45;
}

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

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

.site-footer .footer-nav a {
  color: #FFFFFF;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

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

/* Mobile Styles */
@media (max-width: 768px) {
  /* Mobile content overflow */
  .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 {
    width: 100%;
    max-width: none;
    padding: 0 15px; /* Smaller horizontal padding for mobile */
  }
  
  .site-header {
    flex-direction: column; /* Stack header elements */
  }

  .header-top {
    display: flex; /* Ensure flex for hamburger and logo */
    justify-content: space-between; /* Hamburger left, logo center, space right */
    align-items: center;
    padding: 10px 0; /* Adjust padding for mobile */
  }

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
  }

  .logo {
    flex: 1;
    text-align: center; /* Center the text logo */
    font-size: 20px; /* Adjust font size for mobile */
    padding: 5px 0;
  }

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

  .mobile-nav-buttons-wrapper {
    display: block; /* Show mobile buttons wrapper */
  }
  
  .mobile-nav-buttons-wrapper .header-container {
    padding: 0 15px; /* Smaller horizontal padding for mobile buttons */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below the fixed header content */
    left: 0;
    width: 80%; /* Menu takes 80% width */
    height: calc(100vh - var(--header-offset)); /* Full height minus header offset */
    background-color: rgba(0, 0, 0, 0.95); /* Darker background for menu */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start; /* Align menu items to left */
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    padding: 20px 0;
    overflow-y: auto; /* Allow scrolling for long menus */
  }

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

  .main-nav .nav-container {
    width: 100%;
    max-width: none; /* Do not limit max-width on mobile */
    flex-direction: column; /* Stack menu items vertically */
    align-items: flex-start;
    padding: 0 20px; /* Padding for mobile menu items */
  }

  .main-nav .nav-link {
    width: 100%; /* Full width for mobile menu items */
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Separator */
  }

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

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

  .site-footer .footer-section {
    width: 100%;
    min-width: unset;
    text-align: center;
  }
  
  .site-footer .footer-logo {
    margin: 0 auto 15px auto; /* Center logo on mobile */
  }

  .site-footer .footer-links h3 {
    margin-top: 30px;
  }
}
/* 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;
  }
}
