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

@media (max-width: 768px) {
  :root {
    --header-offset: 115px; /* 移动端：header-top (60px) + mobile-nav-buttons (45px) */
  }
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333;
  background-color: #FFFFFF;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

.page-content img {
  max-width: 100% !important;
  height: auto !important;
  display: block;
}

.page-content {
  overflow-x: hidden;
  max-width: 100%;
}

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

/* Header Top Bar (Desktop) */
.header-top {
  background-color: #005c2e; /* Darker green for contrast */
  padding: 10px 0;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #FFFFFF;
  text-decoration: none;
  padding: 5px 0;
  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;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
  border: none;
}

.btn-register {
  background-color: #C30808; /* Red */
  color: #FFFF00; /* Yellow */
}

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

.btn-login {
  background-color: #C30808; /* Red */
  color: #FFFF00; /* Yellow */
}

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

/* Main Navigation (Desktop) */
.main-nav {
  background-color: #017439; /* Primary green */
  padding: 0;
  display: flex;
  flex-direction: row;
  justify-content: center;
}

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

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

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

/* Hamburger Menu (Mobile) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger-menu .bar {
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  transition: all 0.3s ease;
}

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

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

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

/* Mobile Navigation Buttons (Hidden on desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop, shown by media query */
}

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

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

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

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

.footer-col:last-child {
  padding-right: 0;
}

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

.footer-col p {
  margin: 0;
}

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

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-link {
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #e0e0e0;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  margin: 0;
  color: #e0e0e0;
}

/* --- Mobile Styles --- */
@media (max-width: 768px) {
  .site-header {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }

  .header-top {
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
    min-height: 40px;
    justify-content: space-between;
  }

  .hamburger-menu {
    display: flex;
    order: 1;
  }

  .logo {
    order: 2;
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
    padding: 0;
  }

  .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: #005c2e; /* Match header-top background */
    justify-content: center;
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px);
    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: 0;
    left: 0;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background-color: #017439;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    padding-top: var(--header-offset); /* Ensure menu starts below header content */
  }

  .main-nav.active {
    display: flex;
    transform: translateX(0);
  }

  .main-nav .nav-container {
    width: 100%;
    max-width: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    min-height: auto;
  }

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

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

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

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

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

  .footer-col {
    min-width: unset;
    width: 100%;
    padding-right: 0;
    text-align: center;
  }

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

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

  .footer-bottom {
    padding: 15px;
  }
}

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