:root {
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
  --color-primary: #000000;
  --color-secondary: #FFFFFF;
  --color-login-btn: #FCBC45;
  --color-register-text: #FFFFFF;
  --color-background: #FFFFFF;
  --color-header-top-bg: var(--color-primary); /* #000000 */
  --color-main-nav-bg: #1a1a1a; /* Slightly lighter black for contrast */
  --color-text-light: #FFFFFF;
  --color-text-dark: #000000;
}

@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: header-top (60px) + mobile-buttons-area (50px) */
  }
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  background-color: var(--color-background);
  color: var(--color-text-dark); /* Default body text color */
}

/* Fixed Header */
.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; /* For desktop, header-top and main-nav stack vertically */
  flex-direction: column;
}

/* Header Top Area (Desktop & Mobile) */
.header-top {
  background-color: var(--color-header-top-bg); /* #000000 */
  padding: 10px 0;
  height: 40px; /* Content height for header-top, total 60px with padding */
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--color-text-light); /* White text for dark background */
  text-decoration: none;
  display: block; /* Ensure logo is visible */
  flex-shrink: 0; /* Prevent logo from shrinking */
}

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

/* Main Navigation Area (Desktop) */
.main-nav {
  background-color: var(--color-main-nav-bg); /* #1a1a1a */
  padding: 10px 0;
  height: 30px; /* Content height for nav links, total 50px with padding */
  display: flex; /* Default: visible on desktop */
  align-items: center;
  justify-content: center; /* Center the nav-container */
}

.nav-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center; /* Center nav links on desktop */
  align-items: center;
  padding: 0 20px; /* Desktop side padding */
  gap: 25px; /* Spacing between nav links */
}

.nav-link {
  color: var(--color-text-light); /* White text for dark background */
  text-decoration: none;
  font-size: 16px;
  padding: 5px 0;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--color-login-btn); /* Highlight color on hover */
}

/* Buttons */
.btn {
  padding: 8px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap; /* Prevent button text from wrapping */
  border: none;
}

.btn-login {
  background-color: var(--color-login-btn); /* #FCBC45 */
  color: var(--color-text-dark); /* Black text for light background */
}

.btn-login:hover {
  background-color: #e5a83a; /* A darker shade of FCBC45 */
}

.btn-register {
  background-color: var(--color-primary); /* #000000 */
  color: var(--color-register-text); /* #FFFFFF */
  border: 1px solid var(--color-register-text); /* White border for contrast */
}

.btn-register:hover {
  background-color: var(--color-secondary); /* #FFFFFF */
  color: var(--color-text-dark); /* #000000 */
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1001; /* Above logo and mobile buttons */
  position: relative;
  margin-right: 15px; /* Spacing from logo */
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--color-text-light);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Mobile Buttons Area (Hidden on Desktop) */
.mobile-buttons-area {
  display: none; /* Hidden on desktop */
  background-color: var(--color-main-nav-bg); /* Use same as main-nav for consistency */
  padding: 10px 0;
  height: 30px; /* Content height for buttons, total 50px with padding */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.mobile-buttons-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center; /* Center buttons on mobile */
  gap: 12px;
  padding: 0 15px;
}

/* Mobile Menu Overlay (Hidden on Desktop) */
.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: var(--color-primary); /* #000000 */
  color: var(--color-text-light); /* #FFFFFF */
  padding: 40px 20px 20px;
  font-size: 14px;
}

.site-footer a {
  color: var(--color-text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-footer a:hover {
  color: var(--color-login-btn);
}

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

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

.footer-section h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--color-login-btn); /* Highlight footer headings */
}

.footer-section p, .footer-section ul {
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 1.8;
}

.footer-nav li a {
  display: block;
  padding: 2px 0;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
}

/* Mobile styles */
@media (max-width: 768px) {
  .header-container {
    padding: 0 15px; /* Smaller padding for mobile */
  }

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

  .hamburger-menu {
    display: flex; /* Show hamburger menu on mobile */
    order: 0; /* Place hamburger on the left */
    margin-right: auto; /* Push logo to center */
  }

  .logo {
    flex: 1; /* Allow logo to take available space */
    text-align: center; /* Center text logo */
    font-size: 20px;
    order: 1; /* Place logo in the middle */
    margin: 0; /* Remove any default margins that might interfere */
  }

  /* If the logo were an image, this would be used as per prompt: */
  /* .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  } */

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below the header-top and mobile-buttons-area */
    left: 0;
    width: 250px; /* Sidebar width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--color-main-nav-bg);
    transform: translateX(-100%); /* Off-screen initially */
    transition: transform 0.3s ease;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    overflow-y: auto; /* Enable scrolling for long menus */
    align-items: flex-start; /* Align menu items to the left */
    justify-content: flex-start;
    z-index: 1000; /* Ensure it's above content but below overlay */
  }

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

  .nav-container {
    flex-direction: column; /* Stack nav links vertically */
    align-items: flex-start;
    padding: 0 20px;
    gap: 15px;
    width: 100%; /* Ensure container takes full width of sidebar */
    max-width: none; /* No max-width on mobile */
  }

  .nav-link {
    width: 100%; /* Full width for clickable area */
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* Separator */
  }
  .nav-link:last-child {
      border-bottom: none;
  }

  .mobile-buttons-area {
    display: flex; /* Show mobile buttons area */
  }
  .mobile-buttons-container {
      padding: 0 15px;
      max-width: none; /* No max-width on mobile */
  }

  /* Hamburger menu active state (X icon) */
  .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);
  }

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

  .footer-section {
    min-width: unset;
    text-align: center;
  }
  .footer-nav {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 10px 20px;
  }
  .footer-nav li {
      flex: 0 0 auto; /* Allow items to wrap naturally */
  }
  .footer-nav li a {
      padding: 0;
  }
}

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