:root {
  --header-offset: 90px; /* Desktop: Approx 50px (header-top) + 40px (main-nav) */
}

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

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

/* Header Styles */
.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; /* Primary color for overall header */
}

.header-top {
  background-color: #000000; /* Primary color for top section */
  padding: 15px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #FCBC45; /* Contrast with black background */
  text-decoration: none;
  text-transform: uppercase;
}

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

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

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

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

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

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

.main-nav {
  background-color: #1a1a1a; /* Darker grey, different from header-top for distinction */
  padding: 10px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-container {
  max-width: 1200px;
  width: 100%;
  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: 500;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

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

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

.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  position: absolute;
  left: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-icon {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger-icon::before {
  top: -10px;
}

.hamburger-icon::after {
  top: 10px;
}

.hamburger-menu.active .hamburger-icon {
  background-color: transparent;
}

.hamburger-menu.active .hamburger-icon::before {
  transform: translateY(10px) rotate(45deg);
}

.hamburger-menu.active .hamburger-icon::after {
  transform: translateY(-10px) rotate(-45deg);
}

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

.mobile-menu-overlay {
  display: none; /* Hidden on desktop */
}

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

.site-footer h3 {
  color: #FCBC45; /* Contrast with black background */
  font-size: 18px;
  margin-bottom: 15px;
}

.site-footer p {
  font-size: 14px;
  line-height: 1.8;
  margin: 0;
}

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

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

.site-footer ul li a {
  color: #FFFFFF;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

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

/* 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: 0 15px;
    width: 100%;
    max-width: none;
    justify-content: space-between;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

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

  .hamburger-menu {
    display: block;
  }

  .mobile-nav-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: #000000; /* Matches header-top background */
    width: 100%;
    order: 3; /* Position below header-top */
  }

  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 100%;
    height: calc(100% - var(--header-offset));
    background-color: rgba(0, 0, 0, 0.95); /* Dark semi-transparent background for menu */
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 999;
  }

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

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

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

  .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: 998; /* Below menu, above page content */
  }

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

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

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

  .site-footer ul {
    padding-top: 10px;
  }
}

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