:root {
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}
@media (max-width: 768px) {
  :root {
    --header-offset: 120px; /* Mobile: header-top (60px) + 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 */
  background-color: #FFFFFF;
  color: #333333;
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

/* Shared Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  background-color: #000000; /* Default background for header, overridden by header-top */
}

.header-top {
  background-color: #000000; /* Primary color */
  width: 100%;
  min-height: 60px;
  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: 10px 20px;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FCBC45; /* Contrasting color for logo on black background */
  text-decoration: none;
  text-transform: uppercase;
  display: inline-block;
  padding: 5px 0;
}

.desktop-nav-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn {
  padding: 8px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
  cursor: pointer;
}

.btn-login {
  background-color: #FCBC45; /* Login button color */
  color: #000000; /* Text color for login button */
  border: 1px solid #FCBC45;
}

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

.btn-register {
  background-color: #FFFFFF; /* Register button color */
  color: #000000; /* Text color for register button */
  border: 1px solid #FFFFFF;
}

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

.main-nav {
  background-color: #333333; /* Dark gray, contrasting with black header-top */
  width: 100%;
  min-height: 50px;
  display: flex; /* Desktop default: flex */
  align-items: center;
}

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

.nav-link {
  color: #FFFFFF;
  text-decoration: none;
  font-weight: bold;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: #FCBC45;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  padding: 0;
  box-sizing: border-box;
  z-index: 1001;
}

.hamburger-menu .bar {
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}

.hamburger-menu.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

.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;
}

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

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

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

.footer-col h3 {
  color: #FCBC45;
  font-size: 18px;
  margin-bottom: 15px;
}

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

.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: #FCBC45;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.site-footer .footer-nav a:hover {
  color: #FFFFFF;
}

/* 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-container {
    padding: 10px 15px;
    max-width: none; /* Ensure container takes full width */
  }

  .logo {
    flex: 1 !important; /* Take up remaining space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
  }

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

  .hamburger-menu {
    display: flex; /* Show hamburger menu on mobile */
    order: -1; /* Place it to the left */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical layout */
    position: fixed;
    top: var(--header-offset); /* Start below the header */
    left: 0;
    width: 80%; /* Menu width */
    height: calc(100vh - var(--header-offset)); /* Full height minus header */
    background-color: #222222;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
    transform: translateX(-100%); /* Off-screen to the left */
    transition: transform 0.3s ease-out;
    overflow-y: auto;
  }

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

  .nav-container {
    flex-direction: column;
    gap: 15px;
    padding: 0;
    max-width: none; /* Ensure container takes full width */
    align-items: flex-start;
  }

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons below header-top */
    background-color: #1a1a1a; /* Darker background for button section */
    padding: 10px 15px;
    justify-content: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    min-height: 60px;
  }

  .site-footer {
    padding: 30px 15px;
  }

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

  .footer-col {
    min-width: unset;
    width: 100%;
    margin-bottom: 0;
  }
}

/* Utility to prevent scrolling */
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;
  }
}
