:root {
  --header-offset: 110px; /* Desktop: Calculated as 70px (header-top) + 40px (main-nav) */
}
@media (max-width: 768px) {
  :root {
    --header-offset: 130px; /* Mobile: Calculated as 70px (header-top) + 60px (mobile-nav-buttons) */
  }
  .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;
  color: #333333;
  background-color: #FFFFFF;
  padding-top: var(--header-offset);
}

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

.header-top {
  background-color: #000000; /* Primary color */
  color: #FFFFFF;
  padding: 15px 0;
  min-height: 40px; /* Ensure minimum height for content */
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FCBC45; /* Stands out on black */
  text-decoration: none;
  text-transform: uppercase;
  display: inline-block;
}

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

.btn.login-btn {
  background-color: #FCBC45;
  color: #000000; /* Contrast on yellow */
}

.btn.register-btn {
  background-color: #FFFFFF;
  color: #000000; /* Contrast on white */
}

.main-nav {
  background-color: #333333; /* Dark grey, different from header-top */
  padding: 10px 0;
  display: flex;
  min-height: 20px; /* Ensure minimum height for content */
}

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

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

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

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

/* Footer Styles */
.site-footer {
  background-color: #000000;
  color: #FFFFFF;
  padding: 40px 20px;
  font-size: 14px;
}

.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: 180px;
}

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

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

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

.footer-bottom {
  max-width: 1200px;
  margin: 30px auto 0 auto;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #333333;
  color: #CCCCCC;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 0;
  }

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

  .logo {
    flex: 1;
    text-align: center;
    font-size: 24px;
    order: 2;
    display: block;
  }

  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1001;
    order: 1;
    position: relative;
  }

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

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

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

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

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

  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header + mobile buttons */
    left: 0;
    width: 80%;
    max-width: 300px;
    height: calc(100% - var(--header-offset));
    background-color: #222222; /* Slightly different dark for mobile menu */
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0,0,0,0.5);
    z-index: 9999;
    overflow-y: auto;
    padding-top: 20px;
  }

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

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

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

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

  .mobile-nav-buttons {
    display: flex;
    justify-content: center;
    width: 100%;
    background-color: #000000; /* Same as header-top */
    padding: 10px 15px;
    gap: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 998; /* Below main-nav but above content */
    min-height: 40px;
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    padding: 8px 15px;
    font-size: 14px;
  }

  .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: 9998;
    cursor: pointer;
  }

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

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