:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --button-register-bg: #C30808;
  --button-login-bg: #C30808;
  --button-text-color: #000000; /* Adjusted for WCAG AA contrast with #C30808 background */
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  padding-top: var(--header-offset); /* Apply header offset here */
  overflow-x: hidden;
}

.no-scroll {
  overflow: hidden;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  background-color: var(--secondary-color); /* Default background, individual sections will override */
}

.header-top {
  background-color: #00502A; /* Darker green for top bar */
  color: var(--secondary-color);
  padding: 10px 0;
  min-height: 40px; /* Base height for header-top */
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  padding: 0;
  display: block;
  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.3s ease;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
  border: none;
  box-sizing: border-box;
}

.btn-register, .btn-login {
  background-color: var(--button-register-bg);
  color: var(--button-text-color);
}

.btn-register:hover, .btn-login:hover {
  background-color: #A00707;
  transform: translateY(-2px);
}

.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
}

.main-nav {
  background-color: var(--primary-color);
  padding: 10px 0;
  min-height: 30px;
  display: flex; /* Desktop default: visible, horizontal */
  align-items: center;
  position: static; /* Desktop default */
  flex-direction: row; /* Desktop default */
}

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

.nav-link {
  color: var(--secondary-color);
  text-decoration: none;
  padding: 8px 15px;
  font-weight: bold;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.hamburger-menu {
  display: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  padding: 5px;
  z-index: 1001;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
  transition: all 0.3s ease;
  border-radius: 2px;
}

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

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

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

.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;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Footer Styles */
.site-footer {
  background-color: #222;
  color: #f0f0f0;
  padding: 40px 20px 20px;
  font-size: 14px;
}

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

.footer-column {
  flex: 1;
  min-width: 250px;
  max-width: calc(33% - 20px);
}

.footer-column h3 {
  color: var(--primary-color);
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-column p {
  margin-bottom: 15px;
}

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

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

.footer-nav a {
  color: #f0f0f0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #444;
}

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

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

  .header-top {
    padding: 10px 0;
    min-height: 40px;
  }

  .header-container {
    padding: 0 15px;
    max-width: none;
    width: 100%;
    position: relative; /* For absolute positioning of logo */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    order: 1;
    position: relative;
    z-index: 1001;
  }

  .logo {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: block !important;
    max-width: calc(100% - 100px); /* Leave space for hamburger */
    text-align: center;
    font-size: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .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: #00502A;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }

  .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; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical menu on mobile */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header + mobile buttons */
    left: 0;
    width: 280px;
    height: calc(100% - var(--header-offset));
    background-color: var(--primary-color);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Slide out to the left initially */
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 20px 0;
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 15px;
    max-width: none;
    width: 100%;
  }

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

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

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

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