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

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #333;
  line-height: 1.6;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

/* Shared styles for content images on mobile */
@media (max-width: 768px) {
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
}

/* 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; /* Background set by children */
}

.header-top {
  background-color: #002060; /* Primary dark blue */
  width: 100%;
  padding: 10px 0; /* Vertical padding for header-top content */
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px; /* Horizontal padding for desktop */
  min-height: 40px; /* Minimum height for content */
}

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

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

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

.login-btn {
  background-color: #FFD700; /* Gold */
  color: #002060; /* Dark blue text */
  border: 1px solid #FFD700;
}

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

.register-btn {
  background-color: #002060; /* Dark blue */
  color: #FFD700; /* Gold text */
  border: 1px solid #FFD700;
}

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

.main-nav {
  background-color: #FFD700; /* Secondary gold */
  width: 100%;
  display: flex; /* Desktop default: flex */
  padding: 10px 0; /* Vertical padding for main-nav content */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row; /* Desktop default: row */
  justify-content: center;
  align-items: center;
  padding: 0 30px; /* Horizontal padding for desktop */
  min-height: 30px; /* Minimum height for content */
  flex-wrap: wrap; /* Allow wrapping on smaller desktop screens */
}

.nav-link {
  color: #002060; /* Dark blue text on gold background */
  text-decoration: none;
  padding: 8px 15px;
  font-weight: bold;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background-color: rgba(0, 32, 96, 0.1); /* Light dark blue overlay on hover */
  border-radius: 3px;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001; /* Above logo on mobile */
}

.hamburger-menu .icon-bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #FFD700; /* Gold bars */
  margin: 5px 0;
  transition: all 0.3s ease;
}

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

.mobile-menu-overlay {
  display: none; /* Hidden on desktop */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* Footer styles */
.site-footer {
  background-color: #002060; /* Primary dark blue */
  color: #FFFFFF; /* White text */
  padding: 40px 20px 20px;
  font-size: 14px;
}

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

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

.site-footer h3 {
  color: #FFD700; /* Gold for footer headings */
  font-size: 16px;
  margin-bottom: 15px;
}

.site-footer .footer-nav a {
  display: block;
  color: #FFFFFF; /* White text */
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

.site-footer .footer-nav a:hover {
  color: #FFD700; /* Gold on hover */
}

.site-footer .copyright {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile styles */
@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
    min-height: 40px; /* Adjust min-height for mobile header-top */
  }
  .header-top {
    padding: 10px 0; /* Adjust vertical padding for mobile header-top */
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .hamburger-menu {
    display: block;
  }
  .desktop-nav-buttons {
    display: none;
  }
  .header-container .logo {
    flex: 1; /* Allow logo to take available space */
    text-align: center; /* Center text logo */
  }
  .main-nav {
    display: none; /* Mobile default: hidden */
    flex-direction: column; /* Mobile: column layout */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and buttons */
    left: 0;
    width: 80%; /* Menu width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: #002060; /* Dark blue for mobile menu */
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
  }
  .main-nav.active {
    display: flex; /* Mobile active: show menu */
    transform: translateX(0); /* Slide in */
  }
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    max-width: none; /* No max-width on mobile */
    width: 100%;
  }
  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #FFFFFF; /* White text on dark blue mobile menu */
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  .mobile-nav-buttons {
    display: flex; /* Show on mobile */
    justify-content: center;
    gap: 10px;
    width: 100%;
    background-color: #002060; /* Dark blue background */
    padding: 10px 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    min-height: 40px; /* Minimum height for buttons */
  }
  .mobile-nav-buttons .btn {
    flex: 1;
    max-width: 150px;
    text-align: center;
    padding: 8px 15px;
    font-size: 14px;
  }

  .site-footer .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .site-footer .footer-col {
    min-width: unset;
    width: 100%;
  }
  .site-footer h3 {
    margin-top: 20px;
  }
  .site-footer .footer-nav a {
    margin-bottom: 5px;
  }
  .site-footer .copyright {
    padding-top: 15px;
  }
}
/* 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;
  }
}
