:root {
  --primary-color: #000000;
  --secondary-color: #FFFFFF;
  --login-btn-color: #FCBC45;
  --register-btn-color: #FFFFFF;
  --background-color: #FFFFFF;

  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 199px; /* Mobile: header-top (99px) + mobile-buttons-area (100px) */
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: var(--background-color);
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  overflow-x: hidden; /* Prevent horizontal scrolling on mobile */
}

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

ul {
  list-style: none;
}

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--primary-color); /* Fallback, specific sections will override */
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.header-top {
  background-color: var(--primary-color); /* Dark background for top bar */
  color: var(--secondary-color);
  padding: 10px 0;
  min-height: 60px; /* Explicit min-height for desktop offset calculation */
  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 from container edge */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--login-btn-color); /* Use a contrasting color for logo text */
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

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

.login-btn {
  background-color: var(--login-btn-color);
  color: var(--primary-color); /* Black text on yellow */
  border: 2px solid var(--login-btn-color);
}

.login-btn:hover {
  background-color: #e0a53b; /* Darken effect for hover */
  color: var(--primary-color);
}

.register-btn {
  background-color: var(--register-btn-color);
  color: var(--primary-color); /* Black text on white */
  border: 2px solid var(--login-btn-color); /* Border color for contrast */
}

.register-btn:hover {
  background-color: #f0f0f0;
  color: var(--primary-color);
}

.main-nav {
  background-color: #1a1a1a; /* Contrasting dark grey for main nav */
  color: var(--secondary-color);
  padding: 10px 0;
  min-height: 50px; /* Explicit min-height for desktop offset calculation */
  display: flex; /* Desktop default: flex */
  align-items: center;
  justify-content: center;
}

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

.nav-link {
  font-size: 16px;
  font-weight: bold;
  padding: 5px 0;
  position: relative;
  color: var(--secondary-color);
}

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

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 1001; /* Above mobile buttons */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu span:nth-child(3) { bottom: 0; }

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

.mobile-buttons-area {
  display: none; /* Hidden on desktop */
  background-color: #2a2a2a; /* Slightly lighter dark for mobile buttons area */
  padding: 15px 0;
  min-height: 100px; /* Explicit min-height for mobile offset calculation */
  align-items: center;
  justify-content: center;
  width: 100%;
}

.mobile-buttons-container {
  display: flex;
  gap: 12px;
  justify-content: center;
  width: 100%;
  padding: 0 15px;
}

.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;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* Footer styles */
.site-footer {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  padding: 40px 0 0;
  font-size: 14px;
}

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

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

.footer-col h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--login-btn-color);
}

.footer-col p {
  margin-bottom: 10px;
  line-height: 1.8;
}

.footer-col a {
  color: var(--secondary-color);
}

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

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--login-btn-color);
  text-transform: uppercase;
  display: block;
  margin-bottom: 15px;
}

.footer-nav ul {
  padding: 0;
}

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

.copyright-bar {
  background-color: #1a1a1a; /* Slightly different dark for copyright bar */
  padding: 20px 0;
  text-align: center;
  border-top: 1px solid #333;
}

.copyright-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.copyright-bar p {
  margin: 0;
  color: #888;
}

/* Mobile styles */
@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;
  }

  .header-top {
    padding: 0 15px;
    justify-content: space-between; /* Hamburger left, Logo center */
    min-height: 99px; /* Adjust for mobile offset */
  }
  
  .header-container {
    padding: 0; /* Remove container padding on mobile, use header-top padding */
    justify-content: space-between;
    flex-wrap: nowrap;
    width: 100%;
    max-width: none; /* Crucial for mobile container width */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    order: 2; /* Center logo */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1; /* Place hamburger first */
  }

  .desktop-nav-buttons {
    display: none; /* Hide desktop buttons on mobile */
    order: 3; /* Keep order for consistency, though hidden */
  }
  
  .mobile-buttons-area {
    display: flex; /* Show mobile buttons area */
    min-height: 100px; /* Adjust for mobile offset */
  }
  
  .mobile-buttons-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Crucial for mobile container width */
  }

  .main-nav {
    display: none; /* Hide menu by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header (header-top + mobile-buttons-area) */
    left: 0;
    width: 280px; /* Width of the mobile menu */
    height: calc(100% - var(--header-offset)); /* Take remaining height */
    background-color: #222; /* Darker background for mobile menu */
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    padding: 20px 0;
    overflow-y: auto; /* Enable scrolling for long menus */
    z-index: 1000;
    align-items: flex-start; /* Align menu items to start */
  }

  .main-nav.active {
    display: flex; /* Show menu when active */
    transform: translateX(0); /* Slide in */
  }
  
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 20px;
    gap: 15px;
    width: 100%;
    max-width: none; /* Crucial for mobile container width */
  }

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid #333; /* Separator for mobile links */
  }

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

  .footer-container {
    flex-direction: column;
    gap: 20px;
    padding: 0 15px 30px;
  }

  .footer-col {
    min-width: unset;
  }

  .copyright-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Crucial for mobile container width */
  }
}

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