:root {
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: header-top (60px) + mobile-nav-buttons-wrapper (50px) */
  }
  .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: #FFFFFF;
  background-color: #FFFFFF;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
}

/* Site Header - Fixed Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  min-height: 110px; /* Desktop: 60px (header-top) + 50px (main-nav) */
  display: flex;
  flex-direction: column;
}

/* Header Top Section */
.header-top {
  background-color: #000000; /* Primary color for header top */
  padding: 15px 0;
  min-height: 30px;
  display: flex;
  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 {
  color: #FFFFFF;
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  padding: 5px 0;
  display: block;
}

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

.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, color 0.3s ease;
  white-space: nowrap;
}

.btn-login {
  background-color: #FCBC45; /* Login button color */
  color: #000000;
}

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

.btn-register {
  background-color: #FFFFFF; /* Register button color */
  color: #000000;
}

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

/* Main Navigation */
.main-nav {
  background-color: #1a1a1a; /* Dark grey for navigation, contrasts with header top */
  padding: 10px 0;
  display: flex; /* Desktop: visible */
  justify-content: center;
  align-items: center;
  flex-grow: 1;
}

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

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

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

/* Hamburger Menu (Mobile Only) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1002;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  margin-bottom: 5px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-menu span:last-child {
  margin-bottom: 0;
}

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

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

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

/* Mobile Navigation Buttons (Mobile Only) */
.mobile-nav-buttons-wrapper {
  display: none; /* Hidden on desktop */
  background-color: #000000; /* Same as header-top for consistency */
  padding: 10px 0;
  min-height: 30px;
}

.mobile-nav-buttons-container {
  width: 100%;
  max-width: none; /* Override desktop max-width */
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 0 15px;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  backdrop-filter: blur(5px);
}

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

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

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

.footer-column p {
  color: #CCCCCC;
}

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

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

.footer-column ul li a {
  color: #CCCCCC;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

/* Media Queries for Mobile */
@media (max-width: 768px) {
  .site-header {
    min-height: 110px; /* 60px (header-top) + 50px (mobile-nav-buttons-wrapper) */
  }
  
  .header-container {
    padding: 0 15px;
    justify-content: space-between;
    position: relative; /* For absolute positioning of logo if needed */
    width: 100%;
    max-width: none; /* Mobile: occupy full width */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1;
  }

  .logo {
    order: 2;
    flex: 1;
    text-align: center;
    font-size: 20px;
  }
  
  .desktop-nav-buttons {
    display: none; /* Hide desktop buttons on mobile */
  }

  .main-nav {
    display: none; /* Hide main nav by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header */
    left: 0;
    width: 80%;
    max-width: 300px;
    height: calc(100% - var(--header-offset));
    background-color: #1a1a1a; /* Same as desktop nav background */
    transform: translateX(-100%); /* Initially off-screen */
    transition: transform 0.3s ease-out;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    padding: 20px 0;
    align-items: flex-start;
  }

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

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

  .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-wrapper {
    display: block; /* Show mobile buttons wrapper on mobile */
    background-color: #000000;
    padding: 10px 0;
  }

  .mobile-nav-buttons-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Mobile: occupy full width */
  }

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

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

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

  .footer-column ul {
    padding: 0;
  }

  .footer-column ul li {
    display: inline-block;
    margin: 0 10px 10px 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;
  }
}
