:root {
  --header-offset: 120px; /* Desktop: header-top (65px) + main-nav (55px) */
}

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

/* General Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333;
  padding-top: var(--header-offset); /* Fixed header offset */
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

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

/* Header Top Section (Desktop: Logo + Buttons) */
.header-top {
  background-color: #1A1A1A; /* Dark grey */
  min-height: 65px;
  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;
}

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

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

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

.btn-register {
  background-color: #C30808;
  color: #FFFF00;
}

.btn-login {
  background-color: #C30808;
  color: #FFFF00;
}

.btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* Main Navigation Section (Desktop: Menu Links) */
.main-nav {
  background-color: #017439; /* Primary Green */
  min-height: 55px;
  display: flex;
  align-items: center;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
}

.nav-link {
  color: #FFFFFF;
  text-decoration: none;
  padding: 15px 20px;
  display: block;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none;
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #FFFFFF;
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}

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

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

/* Footer Styles */
.site-footer {
  background-color: #1A1A1A; /* Dark grey, consistent with header-top */
  color: #FFFFFF;
  padding-top: 20px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 40px 20px;
  gap: 20px;
}

.footer-section {
  flex: 1;
  min-width: 250px;
  margin-bottom: 20px;
}

.footer-section h3 {
  color: #FFFFFF;
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-section p {
  font-size: 14px;
  margin-bottom: 10px;
}

.footer-section a {
  color: #FFFFFF;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: #017439; /* Primary green on hover */
}

.footer-nav a {
  display: block;
  margin-bottom: 8px;
}

.footer-bottom {
  text-align: center;
  padding: 20px;
  border-top: 1px solid #333;
  font-size: 13px;
}

/* Mobile Styles */
@media (max-width: 768px) {
  /* Mobile Content Overflow Prevention */
  .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 {
    width: 100%;
    max-width: none;
    padding: 0 15px;
    min-height: 60px; /* Ensure sufficient height for hamburger + logo */
    position: relative;
  }

  .hamburger-menu {
    display: flex;
    z-index: 1001; /* Above logo when active */
  }

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

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

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

  .logo {
    flex: 1 !important; /* Allow logo to take space for centering */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 80px); /* Adjust max-width to not overlap hamburger */
  }

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

  .mobile-nav-buttons {
    display: flex !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: #1A1A1A; /* Consistent with header-top */
    justify-content: center;
    align-items: center;
    min-height: 55px;
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* 50% minus half of gap */
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none;
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Below header-top and mobile-nav-buttons */
    left: 0;
    width: 70%; /* Adjust width as needed */
    height: calc(100% - var(--header-offset));
    background-color: #017439;
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease-in-out;
    z-index: 999;
    overflow-y: auto;
  }

  .main-nav.active {
    display: flex; /* Must set display to show */
    transform: translateX(0); /* Slide in */
  }

  .nav-container {
    width: 100%;
    max-width: none;
    flex-direction: column;
    padding: 20px 15px;
    align-items: flex-start; /* Align links to left */
  }

  .nav-link {
    width: 100%;
    text-align: left;
    padding: 12px 15px;
  }

  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
    transition: opacity 0.3s ease;
  }

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

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

  .footer-section {
    min-width: unset;
    width: 100%;
  }
}
/* 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;
  }
}
