:root {
  --primary-color: #000000;
  --secondary-color: #FFFFFF;
  --login-bg-color: #FCBC45;
  --register-text-color: #FFFFFF;
  --header-offset: 104px; /* Desktop: header-top (60px) + main-nav (44px) */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 116px; /* Mobile: header-top (60px) + mobile-buttons-area (56px) */
  }
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}

body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  padding-top: var(--header-offset); /* Apply header offset to body */
  background-color: var(--secondary-color); /* Default page background */
  color: var(--primary-color); /* Default text color */
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

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

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background-color: transparent; /* Background set by child elements */
}

.header-top {
  background-color: var(--primary-color); /* Dark background for header top */
  padding: 15px 0;
  color: var(--secondary-color);
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color);
  text-transform: uppercase;
  flex-shrink: 0;
}

.desktop-nav-buttons {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.btn {
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.3s ease, color 0.3s ease;
  border: none;
  display: inline-block;
  text-align: center;
}

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

.btn-login:hover {
  background-color: #E3A83F; /* Darkened #FCBC45 */
  filter: brightness(0.9);
}

.btn-register {
  background-color: var(--primary-color);
  color: var(--register-text-color);
  border: 1px solid var(--register-text-color);
}

.btn-register:hover {
  background-color: #333333; /* Slightly lighter #000000 */
  filter: brightness(1.2);
}

.main-nav {
  background-color: var(--secondary-color); /* Lighter background for main nav */
  padding: 10px 0;
  display: flex; /* Desktop default: show */
  flex-direction: row; /* Desktop default: horizontal */
  justify-content: center;
  align-items: center;
  color: var(--primary-color);
  position: static; /* Desktop default: static */
}

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

.nav-link {
  padding: 10px 15px;
  font-weight: bold;
  color: var(--primary-color);
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active-link {
  color: var(--login-bg-color);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001;
}

.hamburger-menu .bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
  margin: 5px 0;
  transition: all 0.3s ease;
}

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

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

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

.mobile-buttons-area {
  display: none; /* Hidden on desktop */
}

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

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

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

.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: 250px;
}

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

.copyright {
  margin-top: 20px;
  font-size: 13px;
  color: #cccccc;
}

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

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

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

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

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

/* Mobile specific styles */
@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
  }
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

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

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    order: -1;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below the fixed header */
    left: 0;
    width: 80%;
    height: calc(100% - var(--header-offset));
    background-color: var(--primary-color);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Start off-screen to the left */
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 999;
  }

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

  .mobile-buttons-area {
    display: flex; /* Show mobile buttons area */
    width: 100%;
    padding: 10px 15px;
    background-color: var(--primary-color); /* Same as header-top */
    justify-content: center;
    gap: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    z-index: 999; /* Below hamburger menu */
  }

  .site-header {
    flex-direction: column; /* Stack header elements */
  }

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

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

  .footer-logo,
  .copyright {
    text-align: center;
  }
}

/* Ensure no-scroll class works for body */
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;
  }
}
