:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --btn-register-bg: #C30808;
  --btn-login-bg: #C30808;
  --btn-text-color: #FFFF00;
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}
@media (max-width: 768px) {
  :root {
    --header-offset: 100px; /* Mobile: header-top (50px) + mobile-nav-buttons (50px) */
  }
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  background-color: var(--secondary-color);
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
a:hover { text-decoration: none; }

/* 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(--secondary-color); /* Fallback */
}

.header-top {
  background-color: var(--secondary-color); /* White background for top bar */
  padding: 10px 0;
  min-height: 40px; /* 40px + 10px*2 padding = 60px total height */
  display: flex;
  align-items: center;
}
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 30px;
  box-sizing: border-box;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color); /* Green logo text on white background */
  display: block;
  line-height: 1;
}

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

.btn {
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-register {
  background-color: var(--btn-register-bg);
  color: var(--btn-text-color);
  border-color: var(--btn-register-bg);
}
.btn-register:hover {
  background-color: #A60707;
  border-color: #A60707;
}

.btn-login {
  background-color: var(--btn-login-bg);
  color: var(--btn-text-color);
  border-color: var(--btn-login-bg);
}
.btn-login:hover {
  background-color: #A60707;
  border-color: #A60707;
}

.main-nav {
  background-color: var(--primary-color); /* Green background for main nav */
  padding: 10px 0;
  min-height: 30px; /* 30px + 10px*2 padding = 50px total height */
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
}
.nav-link {
  color: var(--secondary-color); /* White text on green background */
  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.15);
  border-radius: 4px;
}

/* Mobile specific elements, hidden on desktop */
.hamburger-menu, .mobile-nav-buttons, .mobile-menu-overlay {
  display: none;
}

/* Footer */
.site-footer {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  padding: 40px 0 20px;
  text-align: center;
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 0 30px;
  box-sizing: border-box;
  text-align: left;
}
.footer-col {
  flex: 1;
  min-width: 250px;
  margin-bottom: 20px;
  padding: 0 15px;
}
.footer-col h3 {
  color: var(--btn-text-color); /* Yellow for footer headings */
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
}
.footer-col p {
  font-size: 14px;
  line-height: 1.8;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col ul li {
  margin-bottom: 10px;
}
.footer-col ul li a {
  color: var(--secondary-color);
  font-size: 14px;
  transition: color 0.3s ease;
}
.footer-col ul li a:hover {
  color: var(--btn-text-color);
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 30px;
  padding-top: 20px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

/* Mobile Styles */
@media (max-width: 768px) {
  /* Mobile 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;
  }

  /* Header Top for Mobile */
  .header-top {
    padding: 5px 0;
    min-height: 40px; /* 40px + 5px*2 padding = 50px total height */
  }
  .header-container {
    padding: 0 15px;
    justify-content: space-between;
    width: 100%;
    max-width: none;
    position: relative;
  }

  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 25px;
    height: 20px;
    cursor: pointer;
    position: relative;
    z-index: 1001;
  }
  .hamburger-menu span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transition: all 0.3s ease-in-out;
  }
  .hamburger-menu.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .hamburger-menu.active span:nth-child(2) { opacity: 0; }
  .hamburger-menu.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    padding-left: 10px; /* Small padding to avoid touching hamburger */
  }
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

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

  /* Mobile Buttons */
  .mobile-nav-buttons {
    display: flex !important;
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding: 5px 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--primary-color);
    min-height: 40px; /* 40px + 5px*2 padding = 50px total height */
    align-items: center;
    z-index: 999; /* Below hamburger, above content */
  }
  .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;
    line-height: 1.2;
  }

  /* Main Navigation for Mobile */
  .main-nav {
    display: none;
    flex-direction: column;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 75%;
    height: calc(100% - var(--header-offset));
    background-color: var(--primary-color);
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px 0;
  }
  .main-nav.active {
    display: flex;
    transform: translateX(0);
  }
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 20px;
    max-width: none;
    width: 100%;
  }
  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
    color: var(--secondary-color);
  }
  .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: 998;
    opacity: 0;
    transition: opacity 0.3s ease-out;
  }
  .mobile-menu-overlay.active {
    display: block;
    opacity: 1;
  }

  /* Footer for Mobile */
  .footer-container {
    flex-direction: column;
    padding: 0 15px;
    max-width: none;
  }
  .footer-col {
    min-width: 100%;
    padding: 0;
    text-align: center;
  }
  .footer-col h3 { margin-top: 20px; }
  .footer-col ul li a { display: block; padding: 5px 0; }
  .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;
  }
}
