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

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

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #000000; /* Primary background for the entire fixed header */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  display: flex;
  flex-direction: column; /* Stack header-top and main-nav vertically */
}

.header-top {
  background-color: #000000; /* Dark background for top section */
  padding: 10px 0;
  color: #FFFFFF;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  min-height: 40px;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FFFFFF;
  text-decoration: none;
  padding: 5px 0;
  display: block;
}

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

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

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

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

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

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

.main-nav {
  background-color: #1a1a1a; /* Darker grey for main navigation */
  padding: 10px 0;
  display: flex; /* Desktop default: visible */
  flex-direction: row; /* Desktop default: horizontal */
  justify-content: center;
  align-items: center;
  width: 100%;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 30px;
  gap: 25px;
  min-height: 30px;
}

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

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

.hamburger-menu, .mobile-nav-buttons, .mobile-menu-overlay {
  display: none;
}

/* Footer styles */
.site-footer {
  background-color: #FFFFFF; /* White background for footer */
  color: #000000;
  padding: 40px 20px;
  border-top: 1px solid #e0e0e0;
}

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

.footer-column {
  flex: 1;
  min-width: 250px;
}

.footer-column h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: #000000;
}

.footer-column p {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 10px;
}

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

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

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

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

.copyright-section {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
  font-size: 13px;
  color: #555555;
}

@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    align-items: center;
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
    justify-content: space-between;
    min-height: 40px;
  }

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

  .hamburger-icon {
    display: block;
    width: 100%;
    height: 3px;
    background: #FFFFFF;
    border-radius: 3px;
    transition: all 0.3s ease;
  }

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

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

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

  .logo {
    flex: 1;
    text-align: center;
    padding: 5px 0;
  }

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

  .mobile-nav-buttons {
    display: block;
    width: 100%;
    background-color: #000000; /* Same as header-top */
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 995; /* Below hamburger menu, above overlay */
  }

  .mobile-buttons-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 0 15px;
    min-height: 35px;
  }

  .main-nav {
    display: none; /* Mobile default: hidden */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header */
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-offset));
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background-color: rgba(0, 0, 0, 0.95); /* Semi-transparent dark background */
    transform: translateX(-100%); /* Off-screen to the left */
    transition: transform 0.3s ease-out;
    z-index: 990;
    overflow-y: auto;
    padding: 20px 0;
  }

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

  .nav-container {
    width: 100%;
    max-width: none;
    flex-direction: column;
    padding: 0 15px;
    gap: 15px;
  }

  .nav-link {
    font-size: 20px;
    padding: 10px 0;
    width: 100%;
    text-align: center;
  }

  .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 980;
  }

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

  body.no-scroll {
    overflow: hidden;
  }

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

  .footer-column {
    min-width: unset;
    width: 100%;
  }
  
  .footer-column h3 {
    text-align: center;
  }

  .footer-nav {
    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;
  }
}
