:root {
  --primary-color: #000000;
  --secondary-color: #FFFFFF;
  --login-btn-color: #FCBC45;
  --register-btn-color: #FFFFFF;
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

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

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

body.no-scroll {
  overflow: hidden; /* Prevent background scrolling when mobile menu is open */
}

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

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); /* Stronger shadow for floating effect */
  display: flex;
  flex-direction: column;
  background-color: var(--primary-color); /* Fallback background for header */
}

.header-top {
  background-color: var(--primary-color); /* Black background for top bar */
  padding: 15px 0; /* Vertical padding */
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 25px; /* Horizontal padding, adjusted slightly */
  min-height: 30px; /* Ensure minimum height for content */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* White text for logo on black background */
  text-transform: uppercase;
  display: block; /* Ensure logo is visible */
}

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

.btn {
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  text-decoration: none; /* Remove underline */
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Add button shadow */
}

.login-btn {
  background-color: var(--login-btn-color); /* FCBC45 */
  color: var(--primary-color); /* Black text */
  border: 1px solid var(--login-btn-color);
}
.login-btn:hover {
  background-color: #e0a73b; /* Slightly darker yellow */
  border-color: #e0a73b;
}

.register-btn {
  background-color: var(--register-btn-color); /* White */
  color: var(--primary-color); /* Black text */
  border: 1px solid var(--register-btn-color);
}
.register-btn:hover {
  background-color: #f0f0f0; /* Slightly darker white */
  border-color: #f0f0f0;
}

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

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color); /* White lines */
  margin-bottom: 5px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger-menu span:last-child {
  margin-bottom: 0;
}

/* Main Navigation */
.main-nav {
  background-color: var(--secondary-color); /* White background for nav bar */
  padding: 10px 0; /* Vertical padding */
  display: flex; /* Desktop: show flex */
  flex-direction: row; /* Desktop: horizontal */
  justify-content: center; /* Center menu items */
  align-items: center;
  min-height: 30px; /* Ensure minimum height for content */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 25px; /* Horizontal padding */
  flex-wrap: wrap; /* Allow wrapping on smaller desktop screens */
  gap: 25px; /* Space between links, adjusted */
}

.nav-link {
  color: var(--primary-color); /* Black text */
  font-weight: bold;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
}
.nav-link:hover {
  color: var(--login-btn-color); /* Highlight color on hover */
}

/* Mobile Button Area (hidden on desktop) */
.mobile-button-area {
  display: none; /* Hidden on desktop */
  background-color: var(--primary-color); /* Same as header-top */
  padding: 10px 0;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}
.mobile-button-container {
  width: 100%;
  max-width: none; /* Important for mobile */
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 0 15px;
}

/* Mobile 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.6); /* Darker overlay */
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
  display: block; /* Ensure it's block when active */
}

/* Footer Styles */
.site-footer {
  background-color: var(--primary-color); /* Black background */
  color: var(--secondary-color); /* White text */
  padding: 40px 0;
  text-align: center;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0 25px; /* Horizontal padding */
  gap: 30px; /* Space between sections */
}

.footer-brand {
  flex: 1 1 300px; /* Allows it to grow and shrink */
  text-align: left;
}

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

.footer-brand p {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7); /* Lighter text for readability */
}

.footer-nav {
  flex: 1 1 200px; /* Allows it to grow and shrink */
  text-align: left;
}

.footer-nav h3 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--secondary-color);
  font-weight: bold;
}

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

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

.footer-nav a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  transition: color 0.3s ease;
}
.footer-nav a:hover {
  color: var(--login-btn-color); /* Highlight color on hover */
}

/* Mobile Styles */
@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
    width: 100%; /* Ensure full width */
    max-width: none; /* Remove max-width restriction */
    justify-content: space-between; /* Hamburger left, logo center */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px; /* Adjust font size for mobile */
  }
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

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

  .hamburger-menu {
    display: block; /* Show hamburger menu */
    order: -1; /* Place it to the left */
  }
  .hamburger-menu.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger-menu.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .mobile-button-area {
    display: block; /* Show mobile button area */
  }
  .mobile-button-container {
    width: 100%;
    max-width: none; /* Important for mobile */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 280px; /* Sidebar width */
    height: calc(100vh - var(--header-offset)); /* Full height below header */
    background-color: var(--secondary-color); /* White background for menu */
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Allow scrolling for many menu items */
  }
  .main-nav.active {
    display: flex; /* Show menu when active */
    transform: translateX(0); /* Slide into view */
  }

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0; /* Remove container padding for mobile menu */
    max-width: none; /* Remove max-width */
    width: 100%;
    gap: 15px; /* Space between links */
  }

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  .footer-container {
    flex-direction: column;
    align-items: center;
    padding: 0 15px;
  }

  .footer-brand,
  .footer-nav {
    text-align: center;
    flex: 1 1 100%;
  }

  .footer-logo {
    margin-bottom: 10px;
  }

  .footer-nav h3 {
    margin-top: 30px;
    margin-bottom: 15px;
  }
  .footer-nav ul {
    margin-bottom: 20px;
  }

  /* Mobile image overflow prevention */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: 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;
  }
}
