:root {
  --header-offset: 120px; /* Desktop: header-top (65px) + main-nav (55px) */
}
@media (max-width: 768px) {
  :root {
    --header-offset: 120px; /* Mobile: header-top (65px) + 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 {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensures content is not hidden by fixed header */
  background-color: #FFFFFF;
  color: #333333;
  line-height: 1.6;
  direction: ltr;
}

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

.header-top {
  background-color: #000000; /* Primary dark for top section */
  width: 100%;
  min-height: 65px;
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FCBC45; /* Using a vibrant accent color for the logo */
  text-decoration: none;
  white-space: nowrap;
  padding: 5px 0;
}

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

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

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

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

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

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

.main-nav {
  background-color: #1a1a1a; /* Contrasting dark for main navigation */
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 55px;
}

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

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

.nav-link:hover, .nav-link.active {
  color: #FCBC45;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1002; /* Above overlay */
  background: none;
  border: none;
  padding: 0;
}

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

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

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

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

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

.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: 998;
  transition: opacity 0.3s ease;
}

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

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

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

.footer-section,
.footer-col {
  flex: 1;
  min-width: 200px;
  margin-bottom: 20px;
}

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

.footer-section p {
  line-height: 1.8;
  color: #CCCCCC;
}

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

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

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

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

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  color: #CCCCCC;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .header-container {
    width: 100%;
    max-width: none;
    padding: 10px 15px;
    min-height: 65px;
    justify-content: space-between;
  }
  .header-top .header-container::after {
    content: '';
    display: block;
    width: 30px; /* Same width as hamburger for centering logo */
    order: 3;
  }
  .hamburger-menu {
    display: flex; /* Show hamburger */
    order: 1;
  }
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    order: 2;
    font-size: 24px; /* Adjust logo size for mobile */
  }
  .desktop-nav-buttons {
    display: none; /* Hide desktop buttons */
  }
  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header elements */
    left: 0;
    width: 80%;
    max-width: 300px; /* Limit width for mobile menu */
    height: calc(100% - var(--header-offset));
    background-color: #222222;
    flex-direction: column;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.5);
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
  }
  .main-nav.active {
    display: flex; /* Show when active */
    transform: translateX(0);
  }
  .nav-container {
    flex-direction: column;
    padding: 0;
    max-width: none;
    width: 100%;
    align-items: flex-start;
  }
  .nav-link {
    width: 100%;
    padding: 12px 20px;
    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;
    gap: 10px;
    padding: 10px 15px;
    background-color: #000000;
    min-height: 55px;
    position: fixed;
    top: 65px; /* Position below header-top */
    width: 100%;
    z-index: 999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  }

  .footer-container {
    flex-direction: column;
    gap: 20px;
  }
  .footer-section, .footer-col {
    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;
  }
}
