:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --header-top-bg: #00502a; /* Darker green for header top */
  --main-nav-bg: #017439; /* Primary green for main nav */
  --footer-bg: #1a1a1a;
  --btn-register-bg: #C30808;
  --btn-login-bg: #C30808;
  --btn-text-color: #FFFF00;

  --header-offset: 110px; /* Desktop: header-top (~70px) + main-nav (~40px) */
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Apply header offset to body */
  background-color: var(--secondary-color);
  color: #333;
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

/* Fixed Header */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  min-height: auto; /* Ensure content fits */
}

/* Header Top Section (Desktop) */
.header-top {
  background-color: var(--header-top-bg);
  padding: 15px 0; /* Adjusted padding for desktop */
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px; /* Padding for desktop container */
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 40px;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  white-space: nowrap;
  padding: 0;
}

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

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  color: var(--btn-text-color);
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  line-height: 1.2;
}

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

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

/* Main Navigation Section (Desktop) */
.main-nav {
  background-color: var(--main-nav-bg);
  padding: 10px 0;
  display: flex;
  flex-direction: row;
  position: static;
  width: 100%;
  box-sizing: border-box;
}

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

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

.nav-link:hover {
  color: #ffcc00;
}

/* Mobile specific styles */
.hamburger-menu, .mobile-nav-buttons, .mobile-menu-overlay {
  display: none; /* Hidden by default on desktop */
}

/* Footer */
.site-footer {
  background-color: var(--footer-bg);
  color: #ccc;
  padding: 40px 20px;
  font-size: 14px;
}

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

.footer-col {
  flex: 1;
  min-width: 200px;
}

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

.footer-col h3 {
  color: var(--secondary-color);
  margin-bottom: 20px;
  font-size: 18px;
}

.footer-col p {
  line-height: 1.6;
}

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

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

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

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

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

  .site-header {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }

  /* Header Top Section (Mobile) */
  .header-top {
    padding: 10px 0;
  }

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

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

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

  /* Hamburger menu animation */
  .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);
  }

  /* Logo positioning for mobile */
  .logo {
    flex: 1;
    text-align: center;
    font-size: 24px;
    margin: 0 auto;
  }

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

  /* Mobile Nav Buttons Section */
  .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: var(--header-top-bg);
    z-index: 999;
    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;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    line-height: 1.2;
  }

  /* Main Navigation Section (Mobile) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background-color: var(--main-nav-bg);
    padding-top: 80px; /* Space for fixed header content */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    box-sizing: border-box;
  }

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

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

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

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

  /* Mobile menu overlay */
  .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: 990;
  }

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

  /* Footer Mobile */
  .footer-container {
    flex-direction: column;
    gap: 20px;
  }

  .footer-col {
    min-width: unset;
    flex: unset;
  }

  .footer-logo {
    margin-bottom: 10px;
  }

  .footer-col h3 {
    margin-bottom: 15px;
  }

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

/* Prevent body scroll when mobile 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;
  }
}
