:root {
  --header-offset: 122px;
  --color-primary: #11A84E;
  --color-secondary: #22C768;
  --color-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --color-card-bg: #11271B;
  --color-background: #08160F;
  --color-text-main: #F2FFF6;
  --color-text-secondary: #A7D9B8;
  --color-border: #2E7A4E;
  --color-glow: #57E38D;
  --color-gold: #F2C14E;
  --color-divider: #1E3A2A;
  --color-deep-green: #0A4B2C;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--color-text-main);
  background-color: var(--color-background);
  padding-top: var(--header-offset);
  overflow-x: hidden; /* Prevents horizontal scroll from body */
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  background-color: var(--color-background); /* Fallback, specific sections will override */
  box-sizing: border-box;
}

.header-top {
  box-sizing: border-box;
  height: 68px;
  display: flex;
  align-items: center;
  background-color: var(--color-deep-green); /* Distinct background color */
  color: var(--color-text-main);
  overflow: hidden;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--color-text-main);
  text-decoration: none;
  white-space: nowrap;
  display: flex; /* For potential image logo alignment */
  align-items: center;
  height: 100%;
}

.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--color-text-main);
  background: var(--color-button-gradient);
  border: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

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

.main-nav {
  box-sizing: border-box;
  height: 52px;
  display: flex; /* Desktop default: visible and horizontal */
  align-items: center;
  background-color: var(--color-primary); /* Distinct background color */
  overflow: hidden;
}

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

.nav-link {
  color: var(--color-text-main);
  text-decoration: none;
  padding: 10px 15px;
  white-space: nowrap;
  font-size: 15px;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.nav-link:hover {
  color: var(--color-gold);
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
}

/* Hamburger menu (desktop hidden) */
.hamburger-menu {
  display: none;
}

.overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.overlay.active {
  display: block;
  opacity: 1;
}

/* Footer styles */
.site-footer {
  background-color: var(--color-card-bg);
  color: var(--color-text-secondary);
  padding: 40px 0 20px;
  font-size: 14px;
  line-height: 1.6;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.footer-col {
  padding: 10px 0;
}

.footer-logo {
  font-size: 22px;
  font-weight: bold;
  color: var(--color-text-main);
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-description {
  color: var(--color-text-secondary);
  margin-top: 0;
}

.footer-title {
  font-size: 18px;
  color: var(--color-text-main);
  margin-top: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--color-divider);
  padding-bottom: 10px;
}

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

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

.footer-nav a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  border-top: 1px solid var(--color-divider);
  padding-top: 20px;
  text-align: center;
  color: var(--color-text-secondary);
}

.copyright {
  margin: 0;
}

/* Mobile styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px;
  }

  .header-top {
    height: 60px;
  }

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

  .logo {
    flex: 1 !important; /* For centering */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 100px); /* Adjust width to not overlap hamburger/buttons */
    text-align: center;
  }

  .logo img {
    max-height: 56px !important;
    max-width: 100%;
  }

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

  .hamburger-menu {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    position: relative;
    width: 40px; /* Fixed width for hamburger */
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    order: -1; /* Place to the left */
  }

  .hamburger-icon {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-text-main);
    position: relative;
    transition: background-color 0.3s ease;
  }

  .hamburger-icon::before, .hamburger-icon::after {
    content: '';
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-text-main);
    position: absolute;
    transition: transform 0.3s ease;
  }

  .hamburger-icon::before {
    top: -8px;
  }

  .hamburger-icon::after {
    top: 8px;
  }

  .hamburger-menu.active .hamburger-icon {
    background-color: transparent;
  }

  .hamburger-menu.active .hamburger-icon::before {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger-menu.active .hamburger-icon::after {
    transform: translateY(-8px) rotate(-45deg);
  }

  .mobile-nav-buttons {
    display: flex !important; /* Always visible on mobile */
    min-height: 48px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--color-card-bg); /* Distinct background for mobile buttons */
    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); /* Account for gap */
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Ensure long words break */
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: calc(var(--header-offset)); /* Below fixed header and mobile buttons */
    left: 0;
    width: 280px; /* Fixed width for mobile menu */
    height: calc(100% - var(--header-offset));
    flex-direction: column;
    background-color: var(--color-card-bg); /* Menu background */
    transform: translateX(-100%); /* Off-screen to the left */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    padding: 20px 0;
    overflow-y: auto;
  }

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

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

  .nav-link {
    padding: 12px 20px;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    border-bottom: 1px solid var(--color-divider);
  }

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

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

  .footer-col {
    padding: 20px 0;
  }

  .footer-nav {
    text-align: center;
  }

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

/* No scroll for body when menu is open */
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;
  }
}
