:root {
  --header-offset: 135px; /* Desktop: header-top (80px) + main-nav (55px) = 135px */
}
@media (max-width: 768px) {
  :root {
    --header-offset: 140px; /* Mobile: header-top (80px) + mobile-nav-buttons (60px) = 140px */
  }
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #333333;
  line-height: 1.6;
  padding-top: var(--header-offset); /* Apply header offset to body */
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

/* Fixed 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);
  display: flex; /* Flex container for desktop header parts */
  flex-direction: column; /* Stack header-top and main-nav vertically */
  background-color: transparent; /* Base, actual backgrounds are on child elements */
}

/* Header Top Section - Desktop */
.header-top {
  background-color: #000000; /* Primary color for top bar */
  width: 100%;
  min-height: 60px; /* Ensures minimum height for content */
  padding: 10px 0; /* Vertical padding */
  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; /* Left/right padding for content inside container */
}

.logo {
  color: #FFFFFF; /* White text for logo on black background */
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  padding: 5px 0; /* Add some padding for better click area/visual */
  white-space: nowrap; /* Prevent logo text from wrapping */
}

.desktop-nav-buttons {
  display: flex;
  gap: 12px; /* Spacing between buttons */
}

/* Main Navigation Section - Desktop */
.main-nav {
  background-color: #333333; /* Dark grey, distinct from header-top */
  width: 100%;
  min-height: 45px; /* Minimum height for navigation links */
  padding: 5px 0; /* Vertical padding */
  display: flex; /* Desktop: visible by default */
  justify-content: center; /* Center menu items horizontally */
  align-items: center;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: row; /* Desktop: horizontal */
  justify-content: center; /* Center items */
  align-items: center;
  padding: 0 20px; /* Left/right padding */
}

.nav-link {
  color: #FFFFFF; /* White links on dark grey background */
  text-decoration: none;
  padding: 10px 15px;
  font-size: 16px;
  white-space: nowrap;
  transition: background-color 0.3s ease;
}

.nav-link:hover {
  background-color: #555555; /* Slightly lighter grey on hover */
  border-radius: 4px;
}

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

.btn-login {
  background-color: #FCBC45; /* Login button color */
  color: #000000; /* Black text on yellow button */
}

.btn-login:hover {
  background-color: #e0a53b; /* Slightly darker yellow on hover */
}

.btn-register {
  background-color: #FFFFFF; /* Register button color */
  color: #000000; /* Black text on white button */
  border: 1px solid #FCBC45; /* Add a border for definition */
}

.btn-register:hover {
  background-color: #f0f0f0; /* Slightly darker white on hover */
  border-color: #e0a53b;
}

/* Hamburger menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 20px;
  position: relative;
  cursor: pointer;
  z-index: 1002; /* Above overlay */
  margin-right: 15px; /* Spacing from logo */
}

.hamburger-menu span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: #FFFFFF; /* White lines */
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 9px; }
.hamburger-menu span:nth-child(3) { top: 18px; }

.hamburger-menu.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; }
.hamburger-menu.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* Mobile navigation buttons (hidden on desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
}

/* Mobile menu overlay (hidden on desktop) */
.mobile-menu-overlay {
  display: none; /* Hidden on desktop */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent black overlay */
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

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

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

.footer-col {
  flex: 1;
  min-width: 250px; /* Minimum width for columns before wrapping */
}

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

.footer-col p, .footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav-list li a {
  color: #FFFFFF;
  text-decoration: none;
  padding: 5px 0;
  display: block;
  transition: color 0.3s ease;
}

.footer-nav-list li a:hover {
  color: #FCBC45; /* Accent color on hover */
}

.footer-bottom {
  border-top: 1px solid #333333; /* Dark grey separator */
  padding-top: 20px;
  text-align: center;
  color: #CCCCCC; /* Lighter grey for copyright text */
}

/* Mobile Styles */
@media (max-width: 768px) {
  /* Mobile content overflow rules */
  .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-top {
    min-height: 60px; /* Consistent height */
    padding: 10px 0;
  }
  .header-container {
    padding: 0 15px; /* Smaller padding for mobile */
    justify-content: space-between; /* Hamburger left, Logo center */
    flex-wrap: nowrap; /* Prevent wrapping */
  }

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

  .logo {
    flex: 1; /* Allow logo to take available space */
    text-align: center; /* Center text logo */
    font-size: 24px;
    padding: 0;
    margin-left: -45px; /* Adjust to visually center due to hamburger's width */
  }

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

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    width: 100%;
    background-color: #222222; /* Slightly lighter black than header-top */
    padding: 10px 15px;
    justify-content: center;
    gap: 10px;
    min-height: 40px;
    box-sizing: border-box; /* Include padding in height */
  }

  .mobile-nav-buttons .btn {
    flex: 1; /* Make buttons take equal space */
    max-width: 150px; /* Limit max width */
    font-size: 15px;
    padding: 8px 15px;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 280px; /* Width of the mobile menu */
    height: calc(100vh - var(--header-offset)); /* Full height below header */
    background-color: #000000; /* Dark background for mobile menu */
    flex-direction: column; /* Vertical menu items */
    padding: 20px 0;
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease, visibility 0s linear 0.3s; /* Transition for sliding, delay visibility hidden */
    overflow-y: auto; /* Enable scrolling for long menus */
    align-items: flex-start; /* Align menu items to the left */
    visibility: hidden; /* Hide element completely when not active */
  }

  .main-nav.active {
    display: flex; /* Show menu */
    transform: translateX(0); /* Slide in */
    transition: transform 0.3s ease; /* No delay on display for active state */
    visibility: visible; /* Make element visible */
  }

  .nav-container {
    flex-direction: column; /* Vertical links */
    padding: 0;
    width: 100%; /* Ensure container fills menu width */
    max-width: none; /* No max-width on mobile */
    align-items: flex-start; /* Align links to the left */
  }

  .nav-link {
    width: 100%; /* Full width for clickable area */
    padding: 12px 20px;
    border-bottom: 1px solid #1a1a1a; /* Separator for menu items */
  }

  .nav-link:hover {
    background-color: #1a1a1a;
  }
  
  /* Footer mobile adjustments */
  .footer-container {
    flex-direction: column;
    gap: 20px;
  }
  .footer-col {
    min-width: unset; /* Remove min-width constraint */
    flex: none; /* Disable flex growth */
    width: 100%;
    text-align: center; /* Center footer content */
  }
  .footer-nav-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Center list items */
  }
  .footer-nav-list li {
    width: 50%; /* Two items per row */
    box-sizing: border-box;
    padding: 5px 0;
  }
  .footer-nav-list li a {
    text-align: center;
  }
}

/* Body no-scroll for mobile menu */
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;
  }
}
