:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --button-register-bg: #C30808;
  --button-login-bg: #C30808;
  --button-text-color: #FFFF00;
  --header-top-bg: #017439;
  --main-nav-bg: #005f2e;
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

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

html {
  scroll-behavior: smooth;
}

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

/* General Link Styles */
a {
  text-decoration: none;
  color: var(--primary-color);
}

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

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

.btn-login {
  background-color: var(--button-login-bg);
  color: var(--button-text-color);
  margin-left: 10px;
}

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

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background-color: var(--header-top-bg);
  box-sizing: border-box;
}

.header-top {
  background-color: var(--header-top-bg);
  padding: 10px 0;
  min-height: 60px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--button-text-color);
  text-decoration: none;
  padding: 5px 0;
}

.desktop-nav-buttons {
  display: flex;
  align-items: center;
}

/* Main Navigation (Desktop) */
.main-nav {
  background-color: var(--main-nav-bg);
  padding: 10px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50px;
  box-sizing: border-box;
}

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

.nav-link {
  color: var(--secondary-color);
  font-weight: bold;
  padding: 8px 15px;
  margin: 0 5px;
  border-radius: 3px;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--button-text-color);
  text-decoration: none;
}

/* Mobile Specific Styles */
.hamburger-menu {
  display: none; /* Hidden on desktop, shown on mobile */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.hamburger-icon::before, .hamburger-icon::after {
  content: '';
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--secondary-color);
  position: absolute;
  left: 0;
  transition: transform 0.3s ease, top 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: rotate(45deg);
  top: 0;
}

.hamburger-menu.active .hamburger-icon::after {
  transform: rotate(-45deg);
  top: 0;
}

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

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  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 */
.site-footer {
  background-color: var(--header-top-bg);
  color: var(--secondary-color);
  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;
  padding-bottom: 30px;
}

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

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

.footer-col h3 {
  font-size: 18px;
  color: var(--button-text-color);
  margin-bottom: 15px;
}

.footer-col p {
  line-height: 1.6;
  color: var(--secondary-color);
}

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

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

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

.footer-nav a:hover {
  color: var(--button-text-color);
  text-decoration: none;
}

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

/* Mobile Media Queries */
@media (max-width: 768px) {
  .header-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

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

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

  .hamburger-menu {
    display: block;
    order: -1; /* Place hamburger to the left */
    margin-right: auto;
  }

  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below header-top and mobile-nav-buttons */
    left: 0;
    width: 80%;
    max-width: 300px;
    height: calc(100% - var(--header-offset));
    background-color: var(--main-nav-bg);
    padding: 20px 0;
    transform: translateX(-100%); /* Off-screen to the left */
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
  }

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

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

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

  .nav-link:last-child {
    border-bottom: 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;
    justify-content: center;
    background-color: var(--header-top-bg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  }

  .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;
  }

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

  .footer-col {
    min-width: unset;
    width: 100%;
  }

  /* Mobile content overflow protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: 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;
  }
}
