:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #000000; /* Black */
  --header-offset: 120px; /* Desktop: header-top (70px) + main-nav (50px) */
}

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

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

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--secondary-color); /* Fallback, specific sections will override */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  display: flex; /* Ensure flex behavior for its direct children */
  flex-direction: column; /* Stack sections vertically */
}

.header-top {
  background-color: var(--secondary-color); /* Dark background for top section */
  min-height: 70px; /* Desktop height */
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 0; /* Add some vertical padding */
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  display: block; /* Ensure logo is always displayed */
  line-height: 1; /* Adjust line height to match min-height of header-top */
}

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

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

.btn-login {
  background-color: var(--primary-color); /* Gold button */
  color: var(--secondary-color); /* Black text */
}

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

.btn-register {
  background-color: var(--secondary-color); /* Black button */
  color: var(--primary-color); /* Gold text */
  border: 1px solid var(--primary-color); /* Gold border for contrast */
}

.btn-register:hover {
  background-color: #222; /* Slightly lighter black on hover */
}

.main-nav {
  background-color: var(--primary-color); /* Gold background for nav section */
  min-height: 50px; /* Desktop height */
  display: flex; /* Desktop default: visible and horizontal */
  flex-direction: row;
  align-items: center;
  width: 100%;
  padding: 0; /* No padding here, use nav-container padding */
}

.main-nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center; /* Center nav links horizontally */
  align-items: center;
  padding: 10px 20px; /* Padding for nav links container */
}

.nav-link {
  color: var(--secondary-color);
  text-decoration: none;
  padding: 8px 15px;
  font-weight: bold;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap; /* Prevent menu items from wrapping */
}

.nav-link:hover {
  background-color: rgba(0, 0, 0, 0.1); /* Subtle hover effect */
  border-radius: 3px;
}

/* Hamburger menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1001; /* Above logo and buttons */
  flex-shrink: 0; /* Prevent shrinking */
  /* Removed margin-right as grid handles spacing */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--primary-color);
  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 navigation buttons (hidden on desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
  background-color: #333; /* Slightly lighter black for mobile buttons area */
  min-height: 60px; /* Mobile height */
  width: 100%;
  padding: 10px 0;
}

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

/* 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);
  z-index: 999;
}

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

/* Footer styles */
.site-footer {
  background-color: var(--secondary-color);
  color: #ccc;
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.8;
}

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

.site-footer .footer-col {
  flex: 1;
  min-width: 250px;
  margin-bottom: 20px;
}

.site-footer h3 {
  color: var(--primary-color);
  font-size: 18px;
  margin-bottom: 15px;
}

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

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

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

.site-footer .footer-nav a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-footer .footer-nav a:hover {
  color: var(--primary-color);
}

.site-footer .footer-bottom {
  border-top: 1px solid #333;
  padding-top: 20px;
  margin-top: 30px;
  text-align: center;
  color: #888;
}

/* Mobile specific 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%;
  }

  .header-top {
    min-height: 70px; /* Mobile height */
    padding: 0;
  }

  .header-container {
    padding: 0 15px; /* Smaller mobile padding */
    display: grid; /* Use grid for better control */
    grid-template-columns: auto 1fr auto; /* Hamburger | Logo | (empty space for alignment) */
    align-items: center;
  }

  .hamburger-menu {
    grid-column: 1; /* First column */
    display: block; /* Show hamburger menu on mobile */
  }

  .logo {
    grid-column: 2; /* Second column, takes remaining space */
    text-align: center; /* Center the text logo */
    display: block; /* Ensure it's not inline */
    font-size: 24px; /* Adjust font size for mobile */
  }

  .desktop-nav-buttons {
    grid-column: 3; /* Third column, but display: none */
    display: none; /* Hide desktop buttons on mobile */
  }

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons on mobile */
    order: 2; /* Place after header-top */
    justify-content: center; /* Center buttons */
    background-color: #333; /* Darker background for mobile buttons */
    padding: 10px 0; /* Vertical padding */
  }

  .mobile-nav-buttons .nav-container {
    padding: 0 15px;
    justify-content: center;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical layout for mobile menu */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header (header-top + mobile-nav-buttons) */
    left: 0;
    width: 80%; /* Menu width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--secondary-color); /* Dark background for mobile menu */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease-in-out;
    z-index: 1000; /* Ensure menu is above content, below overlay */
    overflow-y: auto; /* Allow scrolling for long menus */
    padding: 20px 0; /* Add padding for menu items */
  }

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

  .main-nav .nav-container {
    flex-direction: column; /* Stack nav links vertically */
    padding: 0; /* No horizontal padding for nav-container in mobile menu */
    width: 100%; /* Occupy full width of mobile menu */
    max-width: none; /* No max-width on mobile */
  }

  .nav-link {
    width: 100%; /* Full width for each link */
    padding: 15px 20px; /* Larger padding for mobile links */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Separator */
    color: var(--primary-color); /* Gold text for mobile menu links */
    text-align: left;
  }

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

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

  .site-footer .footer-col {
    min-width: unset;
    width: 100%;
    text-align: center;
  }
}
/* 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;
  }
}
