:root {
  --primary-color: #000000;
  --secondary-color: #FFFFFF;
  --login-btn-bg: #FCBC45;
  --register-btn-bg: #FFFFFF;
  --header-top-bg: #111111; /* Dark grey, distinct from main-nav-bg */
  --main-nav-bg: #000000; /* Primary black */
  --text-color-on-dark: #FFFFFF;
  --text-color-on-light: #000000;
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  background-color: var(--secondary-color); /* General page background */
  color: #333333; /* Default text color for body content */
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll on desktop too */
}

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

/* 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; /* Stacks header-top and main-nav vertically */
}

.header-top {
  background-color: var(--header-top-bg);
  width: 100%;
  padding: 10px 0; /* Provides base height for header-top */
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px; /* Padding for logo and buttons from container edges */
  min-height: 40px; /* Base height for logo/buttons */
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-color-on-dark);
  text-transform: uppercase; /* Enforce uppercase for logo text */
  display: block; /* Ensure logo is visible */
}

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

.btn {
  padding: 8px 16px;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none; /* Remove underline for buttons */
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

.btn-login {
  background-color: var(--login-btn-bg);
  color: var(--text-color-on-light); /* Black text on gold/orange button */
}

.btn-login:hover {
  background-color: #d89f3c; /* Slightly darker gold */
}

.btn-register {
  background-color: var(--register-btn-bg);
  color: var(--text-color-on-light); /* Black text on white button */
  border: 1px solid #ccc; /* Add a subtle border for white button */
}

.btn-register:hover {
  background-color: #f0f0f0; /* Slightly grey for hover */
}

/* Main Navigation (Desktop) */
.main-nav {
  background-color: var(--main-nav-bg);
  width: 100%;
  display: flex; /* Desktop: visible */
  padding: 10px 0; /* Provides base height for main-nav */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center; /* Center nav items */
  align-items: center;
  padding: 0 20px;
  min-height: 30px; /* Base height for nav links */
}

.nav-link {
  color: var(--text-color-on-dark);
  padding: 8px 15px;
  font-size: 16px;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--login-btn-bg); /* Highlight color for active/hover */
  background-color: rgba(255, 255, 255, 0.1); /* Subtle background for hover */
  border-radius: 4px;
}

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

/* Footer */
.site-footer {
  background-color: var(--primary-color);
  color: var(--text-color-on-dark);
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.8;
}

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

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

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

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

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

.footer-nav a {
  color: var(--text-color-on-dark);
  transition: color 0.3s ease;
}

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

.copyright {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

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

  body {
    overflow-x: hidden; /* Ensure no horizontal scroll */
  }
  
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

  /* Header adjustments for mobile */
  .site-header {
    flex-direction: column; /* Stack elements */
    align-items: stretch;
  }

  .header-top {
    padding: 10px 0; /* Keep padding for height */
  }

  .header-container {
    width: 100%; /* Must be 100% */
    max-width: none; /* Must not have max-width */
    padding: 0 15px; /* Smaller padding for mobile */
    justify-content: space-between; /* Hamburger left, Logo center, space for potential right element */
    position: relative; /* For logo centering */
    min-height: 40px; /* Ensure height */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger menu */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1001; /* Above logo and buttons */
    position: relative;
    order: -1; /* Place at the beginning */
  }

  .hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-color-on-dark);
    transition: all 0.3s ease;
  }

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

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

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

  .logo {
    flex: 1; /* Allows logo to take available space for centering */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px; /* Smaller font size for mobile */
    text-align: center; /* Fallback for text logo */
    order: 0; /* Center position */
    padding: 0 10px; /* Prevent logo from touching hamburger */
  }

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

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    background-color: var(--header-top-bg); /* Same background as header-top */
    width: 100%;
    justify-content: center; /* Center buttons */
    gap: 10px;
    padding: 10px 15px; /* Padding for button area */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 999; /* Below hamburger menu, above main content */
    min-height: 30px; /* Ensure height for buttons */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header + mobile buttons */
    left: 0;
    width: 80%; /* Menu takes 80% width */
    max-width: 300px; /* Optional: max width for side menu */
    height: calc(100vh - var(--header-offset)); /* Fill remaining viewport height */
    background-color: var(--main-nav-bg);
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    overflow-y: auto; /* Enable scrolling for long menus */
    z-index: 1000;
  }

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

  .nav-container {
    width: 100%; /* Must be 100% */
    max-width: none; /* Must not have max-width */
    flex-direction: column;
    align-items: flex-start; /* Align menu items to the left */
    padding: 20px 15px; /* Padding inside the menu */
  }

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .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.5); /* Semi-transparent overlay */
    z-index: 998; /* Below menu, above content */
    transition: opacity 0.3s ease;
    opacity: 0;
    pointer-events: none; /* Allow clicking through when hidden */
  }

  .mobile-menu-overlay.active {
    display: block; /* Show overlay when active */
    opacity: 1;
    pointer-events: auto; /* Enable clicks when visible */
  }

  body.no-scroll {
    overflow: hidden;
  }

  /* Footer adjustments for mobile */
  .footer-container {
    flex-direction: column;
    gap: 20px;
  }

  .footer-section {
    min-width: unset;
    width: 100%;
  }

  .footer-section h3 {
    text-align: center;
  }

  .footer-nav {
    text-align: center;
  }

  .footer-nav li {
    display: inline-block; /* For better spacing */
    margin: 0 8px 8px;
  }
}
/* 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;
  }
}
