:root {
  --primary-color: #DAA520;
  --secondary-color: #1A1A1A;
  --text-light: #FFFFFF;
  --text-dark: #1A1A1A;
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

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

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--text-light); /* Default text color for the page body if dark background */
  background-color: #333;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  background-color: var(--secondary-color); /* Default, sections override */
}

.header-top {
  background-color: var(--secondary-color); /* Dark background for top bar */
  min-height: 60px; /* Desktop height */
  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; /* Desktop padding */
  box-sizing: border-box;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color); /* Gold color for logo */
  text-decoration: none;
  display: block; /* Ensure logo is always visible */
  padding: 10px 0; /* Adjust padding for visual height */
  line-height: 1; /* Prevent extra line height from adding to height */
}

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

.btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--primary-color); /* Gold button */
  color: var(--text-dark); /* Dark text on gold button */
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap; /* Prevent breaking on desktop */
  cursor: pointer;
}

.btn:hover {
  background-color: #e0b43e; /* Slightly darker gold on hover */
  transform: translateY(-2px);
}

.main-nav {
  background-color: var(--primary-color); /* Gold background for main nav */
  width: 100%;
  display: flex; /* Show on desktop */
  min-height: 50px; /* Desktop height */
  align-items: center;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center; /* Center nav links on desktop */
  align-items: center;
  padding: 10px 20px;
  box-sizing: border-box;
}

.nav-link {
  color: var(--text-dark); /* Dark text on gold nav */
  text-decoration: none;
  padding: 8px 15px;
  font-weight: bold;
  transition: color 0.3s ease, background-color 0.3s ease;
  border-radius: 3px;
  white-space: nowrap; /* Prevent breaking */
}

.nav-link:hover {
  background-color: rgba(0, 0, 0, 0.1); /* Subtle hover effect */
  color: var(--text-dark);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 20px;
  position: relative;
  cursor: pointer;
  z-index: 1001; /* Above logo on mobile */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--primary-color); /* Gold 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: 8px; }
.hamburger-menu span:nth-child(3) { top: 16px; }

.hamburger-menu.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 8px;
  background-color: var(--text-light); /* White X */
}
.hamburger-menu.active span:nth-child(2) { opacity: 0; }
.hamburger-menu.active span:nth-child(3) {
  transform: rotate(-45deg);
  top: 8px;
  background-color: var(--text-light); /* White X */
}

.mobile-nav-buttons {
  display: none; /* Hidden on desktop, shown on mobile */
}

.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: 998; /* Below menu, above content */
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

/* Footer styles */
.site-footer {
  background-color: var(--secondary-color); /* Dark footer */
  color: var(--text-light);
  padding: 40px 20px 20px;
  text-align: center;
}

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

.footer-col {
  flex: 1;
  min-width: 250px;
  max-width: 30%;
}

.footer-col h3 {
  color: var(--primary-color); /* Gold heading */
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-col p {
  font-size: 14px;
  line-height: 1.6;
  color: #bbb;
}

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

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

.footer-nav a {
  color: #bbb;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--primary-color); /* Gold hover */
}

.footer-bottom {
  border-top: 1px solid #333;
  margin-top: 40px;
  padding-top: 20px;
  font-size: 13px;
  color: #999;
}

/* Mobile specific styles */
@media (max-width: 768px) {
  .header-container {
    padding: 0 15px; /* Smaller padding on mobile */
    min-height: 60px;
    justify-content: space-between; /* Hamburger left, Logo center, empty right */
    position: relative; /* For logo centering if needed */
  }

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

  .logo {
    order: 2; /* Position center */
    flex: 1 !important; /* Allows it to take space and center */
    display: flex !important; /* Override block from desktop */
    justify-content: center !important;
    align-items: center !important;
    padding: 10px 0; /* Reset padding */
    max-width: calc(100% - 100px); /* Leave space for hamburger */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%;
    max-width: 100%; /* Ensure it doesn't overflow */
    box-sizing: border-box;
    padding: 10px 15px; /* Padding for mobile buttons */
    overflow: hidden; /* Prevent overflow */
    gap: 10px;
    flex-wrap: nowrap; /* Keep buttons on one line */
    background-color: #2A2A2A; /* Slightly lighter dark for button bar */
    min-height: 55px; /* Explicit min-height */
    align-items: center;
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0; /* Allow shrinking */
    max-width: calc(50% - 5px); /* Max width for two buttons with gap */
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    overflow-wrap: break-word; /* Allow text wrapping */
    text-align: center;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical menu */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header + mobile buttons */
    left: 0;
    width: 280px; /* Sidebar width */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background-color: var(--secondary-color); /* Dark background for mobile menu */
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Scrollable if content is long */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    z-index: 999; /* Below overlay, above content */
  }

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

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

  .nav-link {
    width: 100%;
    padding: 12px 20px;
    color: var(--text-light); /* Light text on dark mobile menu */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

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

  .footer-col {
    max-width: 100%;
    min-width: unset;
  }
  
  /* Mobile content overflow protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}

/* Ensure contrast for all elements */
.site-header, .site-footer {
  color: var(--text-light); /* Default text color for header/footer */
}
.logo, .nav-link, .btn {
  /* Specific colors set above to ensure contrast */
}
.footer-col h3 {
  color: var(--primary-color);
}
.footer-nav a {
  color: #bbb; /* Lighter grey for footer links */
}

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