:root {
  --header-offset: 120px; /* Desktop: Total height of header + button area */
}
@media (max-width: 768px) {
  :root {
    --header-offset: 200px; /* Mobile: Total height of marquee/header/button area */
  }
}

/* Global styles */
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #CCCCCC;
  background-color: #0D0D0D; /* Slightly darker than #1A1A1A for body background */
  line-height: 1.6;
}

/* Utility classes */
.no-scroll {
  overflow: hidden;
}

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

.header-top {
  background-color: #1A1A1A; /* Auxiliary dark */
  min-height: 60px;
  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: 0 20px; /* Desktop padding */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FFD700; /* Primary gold, contrasts with #1A1A1A */
  text-decoration: none;
  text-transform: uppercase;
  padding: 10px 0;
}

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

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

.btn-login {
  background-color: #FFD700; /* Primary gold */
  color: #1A1A1A; /* Auxiliary dark */
}

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

.btn-register {
  background-color: #1A1A1A; /* Auxiliary dark */
  color: #FFD700; /* Primary gold */
  border: 2px solid #FFD700;
}

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

.main-nav {
  background-color: #FFD700; /* Primary gold, contrasts with #1A1A1A */
  min-height: 60px;
  display: flex; /* Desktop default: flex */
  align-items: center;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center; /* Center nav links on desktop */
  align-items: center;
  padding: 0 20px; /* Desktop padding */
}

.nav-link {
  color: #1A1A1A; /* Auxiliary dark, contrasts with #FFD700 */
  text-decoration: none;
  padding: 15px 20px;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  background-color: rgba(0, 0, 0, 0.1);
  color: #000;
}

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

/* Site Footer */
.site-footer {
  background-color: #1A1A1A; /* Auxiliary dark */
  color: #CCCCCC;
  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;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col {
  flex: 1 1 200px; /* Allows columns to grow and shrink */
}

.footer-col h3 {
  color: #FFD700; /* Primary gold */
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-col p {
  line-height: 1.6;
}

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

.footer-nav li a {
  color: #CCCCCC;
  text-decoration: none;
  display: block;
  padding: 5px 0;
  transition: color 0.3s ease;
}

.footer-nav li a:hover {
  color: #FFD700; /* Primary gold */
}

.footer-bottom {
  max-width: 1200px;
  margin: 20px auto 0;
  text-align: center;
  color: #999999;
}

/* Mobile styles */
@media (max-width: 768px) {
  .site-header {
    display: block; /* Allows for block-level flow of header-top and mobile-buttons-area */
  }

  .header-top {
    padding: 10px 0;
    min-height: unset;
  }

  .header-container {
    padding: 0 15px; /* Mobile padding */
    width: 100%;
    max-width: none; /* Important: no max-width on mobile */
    justify-content: space-between;
  }

  .logo {
    flex-grow: 1; /* Allows logo to take up available space */
    text-align: center; /* Centers the text within its flex item space */
    order: 2; /* Puts logo in the middle visually */
    font-size: 24px;
    padding: 0;
  }

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

  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    order: 1; /* Puts hamburger first */
    z-index: 1002; /* Above mobile-buttons-area and nav */
  }

  .hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: #FFD700; /* Primary gold */
    transition: all 0.3s ease;
    border-radius: 2px;
  }

  .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: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: #1A1A1A; /* Auxiliary dark */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 998; /* Below hamburger and main nav */
    min-height: 45px;
  }

  .mobile-buttons-area .btn {
    padding: 8px 15px;
    font-size: 14px;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 75%; /* Slide-in width */
    height: 100%;
    overflow-y: auto;
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease-in-out;
    z-index: 1001; /* Above overlay */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    padding-top: 80px; /* Space for fixed header content */
    min-height: unset;
  }

  .main-nav.active {
    display: flex; /* Display when active */
    transform: translateX(0); /* Slide in */
  }

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Important: no max-width on mobile */
  }

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  .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.6);
    z-index: 999;
    transition: opacity 0.3s ease;
    opacity: 0;
    visibility: hidden;
  }

  .mobile-menu-overlay.active {
    display: block; /* Show when active */
    opacity: 1;
    visibility: visible;
  }

  .footer-container {
    flex-direction: column;
    gap: 20px;
  }

  .footer-col {
    text-align: center;
  }

  .footer-col h3 {
    margin-top: 20px;
  }

  .footer-nav li a {
    padding: 3px 0;
  }
}

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