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

/* Global styles */
html {
  box-sizing: border-box;
}
*,
*::before,
*::after {
  box-sizing: inherit;
}
body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #f0f0f0; /* Light text for dark backgrounds */
  background-color: #1a1a1a; /* Overall dark background */
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
}
body.no-scroll {
  overflow: hidden;
}
a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Site Header - Fixed Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  background-color: #1a1a1a; /* Default background for fixed header */
  display: flex;
  flex-direction: column;
}

/* Header Top Section (Desktop: Logo left, Buttons right; Mobile: Hamburger left, Logo center) */
.header-top {
  background-color: #8B0000; /* Secondary color (Dark Red) */
  min-height: 60px; /* Fixed height for header-top */
  display: flex;
  align-items: center;
  position: relative; /* For mobile logo centering */
}
.header-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo Styling */
.logo {
  font-size: 24px;
  font-weight: bold;
  color: #FFD700; /* Primary color (Gold) */
  text-transform: uppercase;
  padding: 5px 0;
  text-decoration: none;
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 12px;
}
.btn {
  padding: 8px 16px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn-login {
  background-color: #FFD700; /* Primary color (Gold) */
  color: #333333; /* Dark text for contrast */
}
.btn-login:hover {
  background-color: #e6c200;
  transform: translateY(-2px);
}
.btn-register {
  background-color: #8B0000; /* Secondary color (Dark Red) */
  color: #FFD700; /* Gold text for contrast */
  border: 1px solid #FFD700;
}
.btn-register:hover {
  background-color: #6a0000;
  transform: translateY(-2px);
}

/* Main Navigation (Desktop: Centered links; Mobile: Hidden by default, slide-out) */
.main-nav {
  background-color: #333333; /* Dark gray for main nav */
  min-height: 50px; /* Fixed height for main-nav */
  display: flex; /* Desktop default: visible, horizontal */
  align-items: center;
  z-index: 1002; /* Above hamburger and overlay on mobile */
}
.nav-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: center; /* Center navigation links */
  align-items: center;
  gap: 25px; /* Spacing between nav links */
}
.nav-link {
  color: #FFD700; /* Primary color (Gold) */
  font-weight: bold;
  padding: 5px 0;
  position: relative;
  text-decoration: none;
}
.nav-link:hover {
  color: #ffffff;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 2px;
  background-color: #FFD700;
  transition: width 0.3s ease;
}
.nav-link:hover::after {
  width: 100%;
}

/* Hamburger Menu (Mobile Only) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: absolute; /* Position relative to header-top */
  left: 10px;
  z-index: 1001; /* Above logo on mobile */
}
.hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #FFD700; /* Gold bars */
  margin: 5px auto;
  transition: all 0.3s ease;
}
.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger-menu.active .bar:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Navigation Buttons (visible only on mobile, below header-top) */
.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
  background-color: #444444; /* Slightly lighter dark gray for mobile buttons */
  min-height: 50px;
  padding: 10px 20px;
  justify-content: center;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

/* Footer Styling */
.site-footer {
  background-color: #1a1a1a; /* Overall dark background */
  color: #f0f0f0;
  padding: 40px 20px 20px;
  border-top: 1px solid #333333;
  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;
}
.footer-column {
  flex: 1;
  min-width: 200px;
}
.footer-heading {
  font-size: 18px;
  color: #FFD700; /* Primary color (Gold) */
  margin-bottom: 15px;
}
.footer-column p {
  line-height: 1.6;
  color: #cccccc;
}
.footer-nav-list li {
  margin-bottom: 8px;
}
.footer-nav-list a {
  color: #cccccc;
  transition: color 0.3s ease;
  text-decoration: none;
}
.footer-nav-list a:hover {
  color: #FFD700; /* Primary color (Gold) */
}
.footer-bottom {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #333333;
  color: #999999;
}

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

  .header-container,
  .nav-container {
    width: 100%; /* Fill entire width */
    max-width: none; /* No max-width on mobile */
    padding: 0 15px; /* Smaller padding */
  }

  /* Header Top Mobile Layout */
  .header-top {
    justify-content: center; /* Center logo by default */
    padding-right: 60px; /* Space for hamburger */
  }
  .hamburger-menu {
    display: block; /* Show hamburger menu */
  }
  .logo {
    flex: 1; /* Allow logo to take available space */
    text-align: center; /* Center text logo */
    font-size: 20px;
    padding: 0; /* Remove padding */
  }
  .desktop-nav-buttons {
    display: none; /* Hide desktop buttons */
  }
  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
  }

  /* Main Navigation Mobile Layout (slide-out menu) */
  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column; /* Vertical links */
    position: fixed;
    top: 0;
    left: 0;
    width: 280px; /* Width of the slide-out menu */
    height: 100%;
    background-color: #222222; /* Darker background for menu */
    padding-top: 70px; /* Space for top bar content */
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    overflow-y: auto; /* Enable scrolling for long menus */
  }
  .main-nav.active {
    display: flex; /* MUST set display for it to show */
    transform: translateX(0); /* Slide in */
  }
  .main-nav .nav-container {
    flex-direction: column;
    padding: 0 15px;
    gap: 15px;
    align-items: flex-start; /* Align links to the left */
  }
  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid #444444; /* Separator */
    font-size: 16px;
  }
  .nav-link:last-child {
    border-bottom: none;
  }
  .nav-link::after {
    display: none; /* Remove underline animation for mobile */
  }

  /* Footer Mobile Layout */
  .footer-container {
    flex-direction: column;
    gap: 20px;
  }
  .footer-column {
    min-width: unset;
    width: 100%;
  }
  .footer-heading {
    text-align: center;
  }
  .footer-nav-list {
    text-align: center;
  }
}
/* 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;
  }
}
