:root {
  --header-offset: 120px; /* Desktop: Header + button area total height not exceeding this */
  --primary-color: #1A202C;
  --secondary-color: #FFD700;
  --text-on-dark: #FFD700;
  --text-on-light: #1A202C;
}
@media (max-width: 768px) {
  :root {
    --header-offset: 200px; /* Mobile: Marquee/Header/button area total height not exceeding this */
  }
}

/* Base Styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--primary-color);
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll on body */
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
}
a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--primary-color);
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-decoration: none; /* Remove underline */
  color: var(--text-on-light); /* Dark text on light button */
  background-color: var(--secondary-color); /* Gold button */
  border: 2px solid var(--secondary-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.btn:hover {
  background-color: #E6C200; /* Slightly darker gold on hover */
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}
.btn-register {
  background-color: var(--secondary-color);
  color: var(--text-on-light);
}
.btn-login {
  background-color: transparent;
  border-color: var(--secondary-color);
  color: var(--secondary-color);
}
.btn-login:hover {
  background-color: var(--secondary-color);
  color: var(--text-on-light);
}
.btn-download {
  background-color: #e74c3c; /* Example red for download */
  color: white;
  border-color: #e74c3c;
}
.btn-download:hover {
  background-color: #c0392b;
  border-color: #c0392b;
}


/* Header Styles (Desktop First) */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-top {
  background-color: var(--primary-color); /* Dark background */
  padding: 15px 0;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px; /* Padding for logo and buttons */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--text-on-dark); /* Gold text on dark background */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block; /* Ensure logo is visible */
}

.desktop-nav-buttons {
  display: flex;
  gap: 10px; /* Spacing between buttons */
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1001; /* Above mobile-nav-buttons */
  flex-direction: column;
  justify-content: space-between;
}
.hamburger-menu span {
  display: block;
  height: 4px;
  width: 100%;
  background: var(--secondary-color);
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}

/* Main Navigation (Desktop First) */
.main-nav {
  background-color: var(--secondary-color); /* Gold background */
  padding: 10px 0;
  display: flex; /* Desktop default: flex */
  flex-direction: row; /* Desktop default: row */
  position: static; /* Desktop default: static */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  gap: 30px; /* Spacing between menu items */
}

.nav-link {
  color: var(--text-on-light); /* Dark text on gold background */
  font-weight: bold;
  font-size: 16px;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
}
.nav-link:hover {
  color: var(--primary-color); /* Darker on hover */
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}
.nav-link:hover::after {
  width: 100%;
}

/* Mobile Nav Buttons (Hidden on Desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop, shown on mobile */
}

/* Mobile Menu Overlay (Hidden on Desktop) */
.mobile-menu-overlay {
  display: none; /* Hidden on desktop, shown on mobile */
}


/* Footer Styles */
.site-footer {
  background-color: var(--primary-color); /* Dark footer background */
  color: var(--text-on-dark); /* Gold text */
  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-col {
  flex: 1;
  min-width: 200px;
  margin-bottom: 20px;
}

.footer-col h3 {
  color: var(--secondary-color); /* Gold headings */
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-on-dark);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
  display: block;
}

.footer-description {
  margin-top: 10px;
  line-height: 1.8;
}

.footer-nav li {
  margin-bottom: 8px;
}
.footer-nav a {
  color: var(--text-on-dark);
  transition: color 0.3s ease;
}
.footer-nav a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.footer-bottom {
  max-width: 1200px;
  margin: 30px auto 0;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-on-dark);
}

/* Mobile Styles */
@media (max-width: 768px) {
  /* Mobile Content Overflow Protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }

  /* Container mobile adjustments */
  .header-container, .nav-container, .footer-container {
    width: 100%;
    max-width: none; /* Important: no max-width on mobile */
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Header Mobile Layout */
  .site-header {
    flex-direction: column; /* Stack header elements */
  }

  .header-top {
    display: flex;
    justify-content: space-between; /* Space out hamburger and logo */
    align-items: center;
    padding: 10px 0;
  }

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

  .hamburger-menu {
    display: flex; /* Show hamburger menu */
    order: 1; /* Place it first */
  }
  .hamburger-menu.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
  }
  .hamburger-menu.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
  }

  .logo {
    order: 2; /* Place logo second */
    flex: 1 !important; /* For centering */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px; /* Adjust font size for mobile */
    max-width: calc(100% - 80px); /* Ensure logo doesn't overlap hamburger */
    margin: 0 auto; /* Ensure centering */
  }

  /* Mobile Buttons - Independent area below header-top */
  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: var(--primary-color); /* Same as header-top */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }
  .mobile-nav-buttons .btn {
    flex: 1;
    max-width: 150px;
    font-size: 14px;
    padding: 8px 15px;
  }
  
  /* Main Nav Mobile Layout (Hidden by default, slides in) */
  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column; /* Stack menu items vertically */
    position: fixed;
    top: 0; /* Starts at the very top of the viewport */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px;
    height: 100vh;
    background-color: var(--primary-color); /* Dark background for mobile menu */
    /* padding-top will be set by JS dynamically */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Start off-screen to the left */
    transition: transform 0.3s ease-in-out;
    overflow-y: auto; /* Enable scrolling for long menus */
  }
  .main-nav.active {
    display: flex; /* Show menu */
    transform: translateX(0); /* Slide into view */
  }

  .nav-container {
    flex-direction: column; /* Stack menu items */
    align-items: flex-start; /* Align items to the left */
    padding: 20px 0;
    gap: 15px;
  }
  .nav-link {
    width: 100%;
    padding: 10px 20px;
    color: var(--text-on-dark); /* Gold text on dark menu */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-link:last-child {
    border-bottom: none;
  }
  .nav-link::after {
    background-color: var(--secondary-color); /* Gold underline */
  }

  /* Mobile Overlay */
  .mobile-menu-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    z-index: 999;
  }
  .mobile-menu-overlay.active {
    display: block;
  }

  /* Footer Mobile Layout */
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
  .footer-col {
    min-width: unset;
    flex: none;
  }
  .footer-col h3 {
    margin-top: 20px;
  }
  .footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  .footer-nav li {
    flex: 0 0 auto;
    margin-bottom: 0;
  }
  .footer-nav a {
    padding: 5px 10px;
    border: 1px solid var(--secondary-color);
    border-radius: 5px;
    white-space: nowrap;
  }
}
/* 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;
  }
}
