:root {
  --header-offset: 100px; /* Desktop: Calculated from header-top (60px) + main-nav (40px) */
}
@media (max-width: 768px) {
  :root {
    --header-offset: 100px; /* Mobile: Calculated from header-top (60px) + mobile-nav-buttons (40px) */
  }
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #1A1A1A; /* Dark background */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  z-index: 1000;
}

.header-top {
  width: 100%;
  min-height: 60px; /* Ensure sufficient height */
  display: flex;
  align-items: center;
  background-color: #DC143C; /* Crimson for header-top */
  padding: 10px 0;
}

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

.logo {
  color: #FFD700; /* Gold for logo */
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  text-transform: uppercase;
  display: block;
  padding: 5px 0;
}

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

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
}

.btn-login {
  background-color: #DC143C; /* Crimson for Login button */
  color: #FFFFFF;
  border: 2px solid #DC143C;
}

.btn-login:hover {
  background-color: #FF4500;
  transform: translateY(-2px);
}

.btn-register {
  background-color: #FFD700; /* Gold for Register button */
  color: #1A1A1A;
  border: 2px solid #FFD700;
}

.btn-register:hover {
  background-color: #FFEC8B;
  transform: translateY(-2px);
}

.main-nav {
  width: 100%;
  min-height: 40px; /* Ensure sufficient height */
  background-color: #8B7300; /* Darker Gold for main-nav, contrasting with header-top */
  display: flex;
  align-items: center;
  padding: 5px 0;
}

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

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

.nav-link:hover {
  color: #FFD700; /* Gold on hover */
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #FFFFFF;
  margin: 5px 0;
  transition: 0.4s;
}

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

.mobile-menu-overlay {
  display: none; /* Hidden by default */
}

/* Footer Styles */
.site-footer {
  background-color: #1A1A1A;
  color: #FFFFFF;
  padding: 40px 20px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer-col {
  flex: 1;
  min-width: 200px;
}

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

.footer-col p {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

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

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

.footer-nav a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

/* Mobile Styles */
@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
    max-width: none;
  }

  .nav-container {
    padding: 0 15px;
    max-width: none;
  }

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

  .hamburger-menu {
    display: block;
    order: -1; /* Move to the left */
    color: #FFFFFF;
  }

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

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

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

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding: 0 20px;
  }

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

  .mobile-nav-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background-color: #1A1A1A; /* Dark background for mobile buttons */
    padding: 10px 15px;
    min-height: 40px; /* Ensure sufficient height */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 999;
  }

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

  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 998;
    display: none; /* Hidden by default */
  }

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

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

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

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

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

  .footer-col {
    min-width: unset;
  }

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