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

@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: header-top (60px) + mobile-buttons-area (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;
  line-height: 1.6;
  color: #333333;
  background-color: #FFFFFF;
  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: transparent; /* Base background, specific sections will override */
}

.header-top {
  background-color: #000000; /* Primary color */
  padding: 10px 0;
  min-height: 60px; /* For offset calculation */
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #FCBC45; /* Gold for contrast */
  text-decoration: none;
  white-space: nowrap;
}

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

.btn {
  padding: 8px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
  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: #e0a53b;
}

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

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

.main-nav {
  background-color: #333333; /* Dark grey, different from header-top */
  min-height: 50px; /* For offset calculation */
  display: flex;
  align-items: center;
}

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

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

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

.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

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

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

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

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

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

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

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

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

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

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

.footer-col p,
.footer-col li {
  margin-bottom: 8px;
}

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

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

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

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  border-top: 1px solid #333333;
  padding-top: 20px;
  font-size: 13px;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .site-header {
    flex-direction: column; /* Stack header-top and mobile-buttons-area */
  }

  .header-top {
    padding: 0;
    min-height: 60px; /* Ensure consistent height */
  }

  .header-container {
    padding: 0 15px;
    height: 60px; /* Match header-top height */
    justify-content: space-between; /* Hamburger left, Logo center, empty space right */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger */
    order: 0;
    margin-right: auto; /* Push logo to center */
    color: #FFFFFF;
  }

  .logo {
    flex: 1;
    display: flex !important; /* Required for image logo centering, text logo also benefits */
    justify-content: center !important;
    align-items: center !important;
    order: 1;
    margin-left: -30px; /* Offset hamburger width to truly center logo */
  }

  .desktop-nav-buttons {
    display: none; /* Hide desktop buttons */
  }

  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 70%;
    max-width: 300px; /* Limit mobile menu width */
    height: 100%;
    background-color: #222222;
    overflow-y: auto;
    transition: transform 0.3s ease-in-out;
    transform: translateX(-100%);
    flex-direction: column;
    align-items: flex-start;
    padding-top: 60px; /* Space for header-top, if menu slides under it */
    z-index: 1000; /* Below hamburger, above overlay */
  }

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

  .nav-container {
    width: 100%;
    max-width: none; /* Remove max-width for mobile */
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
  }

  .nav-link {
    padding: 15px 20px;
    width: 100%;
    border-bottom: 1px solid #444;
  }

  .mobile-buttons-area {
    display: flex; /* Show mobile buttons */
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: #000000; /* Same as header-top for continuity */
    min-height: 50px; /* For offset calculation */
    width: 100%;
  }

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

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

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

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

  .footer-col ul {
    margin-bottom: 20px;
  }
}

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