:root {
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

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

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #333333;
  background-color: #FFFFFF;
  padding-top: var(--header-offset);
}

/* General container styles */
.header-container, .nav-container, .mobile-buttons-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

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

/* Header Top Section (Desktop: Logo Left, Buttons Right) */
.header-top {
  background-color: #000000; /* Primary color */
  padding: 15px 0;
}

.header-top .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-header .logo {
  color: #FFFFFF;
  text-decoration: none;
  font-size: 24px;
  font-weight: bold;
  white-space: nowrap;
}

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

/* Main Navigation (Desktop: Centered below header-top) */
.main-nav {
  background-color: #333333; /* Dark gray, contrasts with header-top */
  padding: 10px 0;
  display: flex; /* Desktop default: visible, horizontal */
}

.main-nav .nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.main-nav .nav-link {
  color: #FFFFFF;
  text-decoration: none;
  font-size: 16px;
  padding: 5px 10px;
  transition: color 0.3s ease;
}

.main-nav .nav-link:hover {
  color: #FCBC45;
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 20px;
  position: relative;
  z-index: 1001;
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #FFFFFF;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu span:nth-child(1) {
  top: 0;
}

.hamburger-menu span:nth-child(2) {
  top: 8px;
}

.hamburger-menu span:nth-child(3) {
  top: 16px;
}

.hamburger-menu.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 8px;
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: rotate(-45deg);
  top: 8px;
}

/* Mobile Buttons Area (Hidden on Desktop) */
.mobile-buttons-area {
  display: none; /* Hidden on desktop */
  background-color: #000000; /* Same as header-top for consistency */
  padding: 10px 0;
}

.mobile-buttons-area .mobile-buttons-container {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

.btn.login-btn {
  background-color: #FCBC45;
  color: #000000; /* Contrasting text color */
}

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

.btn.register-btn {
  background-color: #FFFFFF;
  color: #000000; /* Contrasting text color */
  border: 1px solid #FCBC45;
}

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

/* Mobile Menu Overlay (Hidden on Desktop) */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
}

/* Site Footer */
.site-footer {
  background-color: #000000; /* Primary color */
  color: #FFFFFF;
  padding: 40px 0;
  font-size: 14px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.footer-col h3 {
  color: #FCBC45;
  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: #FFFFFF;
  text-decoration: none;
  margin-bottom: 8px;
  display: block;
  transition: color 0.3s ease;
}

.footer-nav li a:hover {
  color: #FCBC45;
}

.copyright {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #333333;
}

.copyright p {
  margin: 0;
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
  .header-container, .nav-container, .mobile-buttons-container, .footer-container {
    width: 100%;
    max-width: none;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Header Top Mobile */
  .header-top .header-container {
    justify-content: space-between;
  }

  .hamburger-menu {
    display: block;
  }

  .site-header .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
  }

  .desktop-nav-buttons {
    display: none;
  }

  .mobile-buttons-area {
    display: block;
  }

  /* Main Navigation Mobile (Hidden by default, full screen when active) */
  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 100%;
    height: calc(100% - var(--header-offset));
    background-color: #000000; /* Dark background for mobile menu */
    transform: translateX(-100%); /* Off-screen to the left */
    transition: transform 0.3s ease;
    overflow-y: auto;
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    padding-top: 20px;
    padding-bottom: 20px;
    align-items: flex-start;
  }

  .main-nav .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid #333333;
  }

  .mobile-menu-overlay.active {
    display: block;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-nav li a {
    display: inline-block;
    margin: 0 5px 8px;
  }
}

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