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

/* General styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Apply header offset to body */
  line-height: 1.6;
  color: #333333;
  overflow-x: hidden; /* Prevent horizontal scroll for body */
}
body.no-scroll {
  overflow: hidden;
}

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

/* Header Top */
.header-top {
  background-color: #000000; /* Primary color */
  padding: 10px 0; /* Vertical padding for logo/buttons */
}
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px; /* Horizontal padding for logo/buttons */
}

/* Logo */
.logo {
  color: #FFFFFF; /* White for contrast on black header-top */
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  padding: 5px 0;
  display: block;
  line-height: 1;
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 12px;
}
.btn {
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-login {
  background-color: #FCBC45; /* Login color */
  color: #000000; /* Text color for contrast */
  border: 1px solid #FCBC45;
}
.btn-login:hover {
  background-color: #e0a53b;
  border-color: #e0a53b;
}
.btn-register {
  background-color: #FFFFFF; /* Register color */
  color: #000000; /* Text color for contrast */
  border: 1px solid #FFFFFF;
}
.btn-register:hover {
  background-color: #f0f0f0;
  border-color: #f0f0f0;
}

/* Main Navigation (Desktop) */
.main-nav {
  background-color: #333333; /* Dark grey, contrasting with black header-top */
  width: 100%;
  display: flex; /* Default desktop display */
  padding: 5px 0;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row; /* Desktop horizontal */
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  gap: 25px;
}
.nav-link {
  color: #FFFFFF; /* White for contrast on dark grey main-nav */
  text-decoration: none;
  font-weight: bold;
  padding: 10px 0;
  white-space: nowrap;
  transition: color 0.3s ease;
}
.nav-link:hover {
  color: #FCBC45; /* Highlight color */
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001;
}
.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFFFFF; /* White lines on black header-top */
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}
.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu span:nth-child(3) { bottom: 0; }
.hamburger-menu.active span:nth-child(1) { transform: translateY(10.5px) rotate(45deg); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; }
.hamburger-menu.active span:nth-child(3) { transform: translateY(-10.5px) rotate(-45deg); }

/* Mobile Navigation Buttons Wrapper (Hidden on Desktop) */
.mobile-nav-buttons-wrapper {
  display: none; /* Hidden on desktop */
}

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

/* Footer */
.site-footer {
  background-color: #000000; /* Primary color */
  color: #FFFFFF; /* White text on black footer */
  padding: 40px 20px;
  text-align: center;
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 30px;
  text-align: left;
}
.footer-col {
  flex: 1;
  min-width: 200px;
  padding: 10px 0;
}
.footer-logo {
  color: #FFFFFF;
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}
.site-footer p {
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}
.site-footer h3 {
  color: #FCBC45; /* Highlight color for footer headings */
  font-size: 18px;
  margin-bottom: 15px;
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer ul li {
  margin-bottom: 8px;
}
.site-footer ul li a {
  color: #FFFFFF;
  text-decoration: none;
  font-size: 15px;
  transition: color 0.3s ease;
}
.site-footer ul li a:hover {
  color: #FCBC45;
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
  /* Header adjustments */
  .header-container {
    padding: 0 15px; /* Smaller padding for mobile */
    width: 100%;
    max-width: none; /* Important: no max-width on mobile */
    justify-content: space-between;
  }
  .logo {
    flex: 1 !important; /* Allows logo to take available space for centering */
    display: flex !important; /* Use flex for centering child img or text */
    justify-content: center !important; /* Center logo text */
    align-items: center !important;
    font-size: 24px;
    padding: 0;
  }
  .logo img { /* Specific rule for image logo centering (if an image is used) */
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }
  .desktop-nav-buttons {
    display: none; /* Hide desktop buttons */
  }
  .hamburger-menu {
    display: block; /* Show hamburger menu */
    order: -1; /* Place it to the left */
    margin-right: auto; /* Push logo to center */
    padding-left: 0;
  }
  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical layout for mobile menu */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header + mobile buttons */
    left: 0;
    width: 80%; /* Menu takes 80% width */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background-color: #222222; /* Darker background for mobile menu */
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease-in-out;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    overflow-y: auto; /* Enable scrolling for long menus */
    z-index: 999; /* Below overlay, above content */
  }
  .main-nav.active {
    display: flex; /* Show menu when active */
    transform: translateX(0); /* Slide into view */
  }
  .nav-container {
    flex-direction: column; /* Vertical links */
    align-items: flex-start; /* Align links to the left */
    padding: 20px 15px;
    width: 100%;
    max-width: none; /* Important: no max-width on mobile */
    gap: 15px;
  }
  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  /* Mobile Buttons Area */
  .mobile-nav-buttons-wrapper {
    display: block; /* Show mobile buttons */
    padding: 10px 0;
  }
  .mobile-nav-buttons-wrapper .header-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: none;
    padding: 0 15px;
  }

  /* 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.5); /* Semi-transparent overlay */
    z-index: 998; /* Below menu, above content */
  }
  .mobile-menu-overlay.active {
    display: block; /* Show when active */
  }

  /* Footer adjustments */
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-col {
    min-width: unset;
    width: 100%;
    padding: 15px 0;
  }
  .footer-col:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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