:root {
  --header-offset: 120px; /* Desktop: Header + button area total height not exceeding this value */
}
@media (max-width: 768px) {
  :root {
    --header-offset: 200px; /* Mobile: Marquee + Header + button area total height not exceeding this value */
  }
}

/* Mobile content overflow prevention */
@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;
  }
}

/* Base styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Apply header offset */
  line-height: 1.6;
  color: #333;
  background-color: #f4f4f4;
  overflow-x: hidden; /* Ensure no horizontal scroll on body */
}
a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Site Header - Fixed & Suspended */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  min-height: auto; /* Ensure content adapts */
  background-color: transparent; /* Base for stacking */
}

/* Header Top - Desktop */
.header-top {
  background-color: #0A2240; /* Primary Dark Blue */
  padding: 15px 0;
}
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}
.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FFD700; /* Secondary Gold */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block; /* Ensure logo is visible */
  white-space: nowrap;
}
.desktop-nav-buttons {
  display: flex; /* Show on desktop */
  gap: 12px;
}
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  line-height: 1;
}
.btn-primary {
  background-color: #FFD700; /* Secondary Gold */
  color: #0A2240; /* Primary Dark Blue */
}
.btn-primary:hover {
  background-color: #e6c200; /* Darker Gold */
}
.btn-secondary {
  background-color: #0A2240; /* Primary Dark Blue */
  color: #FFD700; /* Secondary Gold */
  border: 1px solid #FFD700;
}
.btn-secondary:hover {
  background-color: #1A3B5F; /* Slightly lighter blue */
}
.header-right-placeholder {
  display: none; /* Hidden on desktop */
}

/* Main Navigation - Desktop */
.main-nav {
  background-color: #1B3F66; /* Slightly lighter Dark Blue, contrasts with header-top */
  width: 100%;
  display: flex; /* Desktop default: flex */
  padding: 10px 0;
}
.main-nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row; /* Desktop default: row */
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap; /* Allow wrapping on smaller desktop screens */
}
.nav-link {
  color: #fff;
  padding: 8px 15px;
  font-size: 16px;
  font-weight: 500;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  color: #FFD700; /* Secondary Gold */
  background-color: rgba(255, 215, 0, 0.1);
  border-radius: 3px;
}

/* Hamburger Menu (Hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1001; /* Above mobile buttons */
  position: relative;
}
.hamburger-menu .bar {
  width: 100%;
  height: 3px;
  background-color: #FFD700; /* Secondary Gold */
  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 (Hidden on desktop) */
.mobile-buttons-area {
  display: none; /* Hidden on desktop */
  background-color: #0A2240; /* Match header-top */
  padding: 10px 20px;
  justify-content: center;
  gap: 12px;
  width: 100%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 999; /* Below hamburger, above content */
}

/* Mobile Menu Overlay (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: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mobile-menu-overlay.active {
  opacity: 1;
  display: block;
}

/* Footer Styles */
.site-footer {
  background-color: #0A2240; /* Primary Dark Blue */
  color: #fff;
  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-column {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
}
.footer-column h3 {
  color: #FFD700; /* Secondary Gold */
  font-size: 18px;
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 5px;
}
.footer-column h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background-color: #FFD700;
}
.footer-column p {
  margin-bottom: 15px;
  color: #ccc;
}
.footer-column .logo-footer {
  font-size: 24px;
  font-weight: bold;
  color: #FFD700; /* Secondary Gold */
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 20px;
  display: inline-block;
}
.footer-nav li a {
  color: #ccc;
  padding: 5px 0;
  display: block;
  transition: color 0.3s ease;
}
.footer-nav li a:hover {
  color: #FFD700; /* Secondary Gold */
}
.copyright {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #aaa;
}

/* Mobile Specific Styles */
@media (max-width: 768px) {
  /* Header Top */
  .header-top {
    padding: 10px 0;
    display: flex;
    align-items: center;
    justify-content: space-between; /* To push hamburger left and placeholder right */
  }
  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none;
    position: relative; /* For absolute logo centering */
    min-height: 50px; /* Ensure space for logo */
    display: flex; /* Make header-container a flex container */
    align-items: center;
    justify-content: space-between; /* To push hamburger left and placeholder right */
  }
  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    order: 0; /* Leftmost */
  }
  .logo {
    position: absolute !important; /* Force absolute positioning for centering */
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important; /* For potential image logo centering */
    align-items: center !important;
    justify-content: center !important;
    max-width: calc(100% - 100px); /* Leave space for hamburger and placeholder */
    font-size: 24px;
  }
  .header-right-placeholder {
    display: block; /* Show on mobile to balance hamburger */
    width: 30px; /* Match hamburger width */
    height: 25px; /* Match hamburger height */
    order: 2; /* Rightmost */
  }
  .desktop-nav-buttons {
    display: none; /* Hide desktop buttons on mobile */
  }

  /* Mobile Buttons Area */
  .mobile-buttons-area {
    display: flex; /* Show mobile buttons */
    justify-content: center; /* Center buttons */
  }

  /* Main Navigation - Mobile */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Start below the header + mobile buttons */
    left: 0;
    width: 75%; /* Slide-in width */
    height: calc(100vh - var(--header-offset)); /* Full height below header */
    background-color: #0A2240; /* Primary Dark Blue */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Enable scrolling for long menus */
    z-index: 1000; /* Same as header, above overlay */
    padding: 20px 0;
  }
  .main-nav.active {
    display: flex; /* Show when active */
    transform: translateX(0); /* Slide into view */
  }
  .main-nav .nav-container {
    flex-direction: column;
    padding: 0 15px;
    align-items: flex-start;
    max-width: none; /* No max-width on mobile */
    width: 100%;
  }
  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  /* Mobile Overlay */
  .mobile-menu-overlay.active {
    display: block;
  }

  /* Footer */
  .footer-container {
    flex-direction: column;
    gap: 20px;
  }
  .footer-column {
    max-width: 100%;
    min-width: unset;
  }
  .footer-column h3 {
    text-align: center;
  }
  .footer-column h3::after {
    left: 50%;
    transform: translateX(-50%);
  }
  .footer-column p, .footer-nav li a {
    text-align: center;
  }
  .footer-column .logo-footer {
    display: block;
    text-align: center;
  }
}

/* Body no-scroll for mobile menu */
body.no-scroll {
  overflow: 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;
  }
}
