:root {
  --header-offset: 155px; /* Desktop: 85px (header-top) + 70px (main-nav) */
}

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

/* Base Styles */
body {
  margin: 0;
  font-family: 'Roboto', Arial, sans-serif;
  color: #FFFFFF; /* Default text color, overridden by specific elements */
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  overflow-x: hidden; /* Prevent horizontal scroll on mobile */
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #000000; /* Primary background for header */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  min-height: 155px; /* Minimum height for desktop header */
}

.header-top {
  background-color: #000000; /* Distinct background for top area */
  width: 100%;
  padding: 20px 0; /* Adjusted padding to achieve ~85px height with content */
  min-height: 45px; /* Base height for content */
  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;
}

.logo {
  font-size: 2.2em;
  font-weight: bold;
  color: #FCBC45; /* Golden yellow for logo text */
  text-decoration: none;
  text-transform: uppercase;
  padding: 0;
  margin: 0;
  white-space: nowrap;
}

.desktop-nav-buttons {
  display: flex;
  gap: 12px;
}

.btn {
  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;
  display: inline-block;
  text-align: center;
  cursor: pointer;
}

.btn-login {
  background-color: #333333; /* Dark grey background */
  color: #FCBC45; /* Golden yellow text */
  border: 1px solid #FCBC45;
}

.btn-login:hover {
  background-color: #FCBC45;
  color: #000000;
}

.btn-register {
  background-color: #DAA520; /* Goldenrod background */
  color: #FFFFFF; /* White text */
  border: 1px solid #DAA520;
}

.btn-register:hover {
  background-color: #FFD700;
  color: #000000;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001;
  width: 40px; /* Ensure clickable area */
  height: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.main-nav {
  background-color: #1a1a1a; /* Dark grey, contrasting with header-top */
  width: 100%;
  padding: 15px 0; /* Adjusted padding to achieve ~70px height with content */
  min-height: 40px; /* Base height for content */
  display: flex; /* Desktop default: flex */
  flex-direction: row; /* Desktop default: row */
  justify-content: center;
  align-items: center;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  padding: 0 20px;
}

.nav-link {
  color: #FFFFFF; /* White text for nav links */
  text-decoration: none;
  font-weight: bold;
  padding: 8px 15px;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: #FCBC45; /* Golden yellow on hover/active */
}

.mobile-nav-buttons {
  display: none; /* 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.7);
  z-index: 999;
  cursor: pointer;
}

/* Footer Styles */
.site-footer {
  background-color: #000000; /* Primary background for footer */
  color: #FFFFFF;
  padding: 40px 20px 20px;
  text-align: center;
  font-size: 0.9em;
}

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

.footer-section {
  flex: 1;
  min-width: 200px;
  padding: 10px;
}

.footer-section h3 {
  color: #FCBC45; /* Golden yellow for footer headings */
  font-size: 1.2em;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.footer-section p {
  margin-bottom: 10px;
  line-height: 1.6;
  color: #CCCCCC;
}

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

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

.footer-section ul li a {
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: #FCBC45;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #333333;
  text-align: center;
  color: #AAAAAA;
}

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

  .site-header {
    min-height: auto; /* Allow height to adjust based on content */
  }

  .header-top {
    padding: 25px 0; /* Adjusted padding to achieve ~100px height with content */
    min-height: 50px; /* Base height for content */
    position: relative;
  }

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Ensure full width on mobile */
    justify-content: space-between;
  }

  .logo {
    flex: 1;
    text-align: center;
    font-size: 1.8em;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: fit-content;
    white-space: nowrap;
  }

  .desktop-nav-buttons {
    display: none;
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    order: -1; /* Place hamburger first */
    color: #FFFFFF;
    position: relative;
    z-index: 1002; /* Higher z-index than overlay and menu */
    margin-right: auto; /* Push to 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);
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical layout */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header */
    left: 0;
    width: 280px;
    height: calc(100vh - var(--header-offset)); /* Full height below header */
    background-color: #1a1a1a; /* Same as desktop nav background */
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    overflow-y: auto;
    align-items: flex-start; /* Align menu items to the left */
    min-height: auto;
  }

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

  .nav-container {
    flex-direction: column;
    gap: 0;
    padding: 0;
    width: 100%;
    max-width: none; /* Ensure full width on mobile */
  }

  .nav-link {
    width: 100%;
    padding: 12px 20px;
    border-bottom: 1px solid #333333;
    text-align: left;
  }

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

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    justify-content: center;
    gap: 12px;
    background-color: #000000; /* Same as header-top */
    padding: 20px 15px; /* Adjusted padding to achieve ~99px height with content */
    min-height: 59px; /* Base height for content */
    width: 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 1000;
  }

  .mobile-menu-overlay.active {
    display: block; /* Show overlay when menu is active */
  }

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

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

  .footer-section ul {
    padding: 0;
  }

  .footer-section ul li {
    margin-bottom: 5px;
  }

  .footer-section ul li a {
    display: block;
    padding: 5px 0;
  }
}
/* 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;
  }
}
