:root {
  --primary-color: #000000;
  --secondary-color: #FFFFFF;
  --login-btn-color: #FCBC45;
  --register-btn-color: #FFFFFF;
  --header-top-bg: var(--primary-color);
  --main-nav-bg: #333333; /* Dark gray for contrast with header-top */
  --footer-bg: var(--primary-color);
  --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) */
  }
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  background-color: #FFFFFF;
  color: #333333;
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  background-color: var(--header-top-bg); /* Default desktop header-top bg */
  transition: background-color 0.3s ease;
}

.header-top {
  background-color: var(--header-top-bg);
  min-height: 60px;
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  text-transform: uppercase;
  display: block; /* Ensure logo is visible by default */
}

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

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

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

.login-btn:hover {
  background-color: #e0a73b;
}

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

.register-btn:hover {
  background-color: #e0e0e0;
}

.main-nav {
  background-color: var(--main-nav-bg);
  min-height: 50px;
  display: flex; /* Desktop default: visible */
  flex-direction: row; /* Desktop default: horizontal */
  align-items: center;
  padding: 0 30px;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center; /* Center menu items horizontally */
  align-items: center;
  gap: 25px;
}

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

.nav-link:hover {
  color: var(--login-btn-color);
}

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

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

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

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

.mobile-menu-overlay {
  display: none; /* Hidden on desktop */
}

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

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

.footer-columns {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}

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

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

.site-footer h3 {
  font-size: 18px;
  margin-top: 0;
  margin-bottom: 15px;
  color: var(--login-btn-color);
}

.site-footer p {
  margin: 0;
  line-height: 1.6;
  color: #cccccc;
}

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

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

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

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

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

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Ensure full width on mobile */
    justify-content: space-between;
    position: relative;
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    order: 1;
    margin-right: auto;
  }

  .logo {
    order: 2;
    flex: 1;
    text-align: center;
    font-size: 24px;
    display: block; /* Ensure logo is visible */
  }

  .desktop-nav-buttons {
    display: none; /* Hide desktop buttons */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical menu on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 80%;
    max-width: 300px;
    height: calc(100% - var(--header-offset));
    background-color: var(--main-nav-bg);
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease-out;
    z-index: 999;
    overflow-y: auto;
    align-items: flex-start;
  }

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

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

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

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

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: var(--header-top-bg);
    min-height: 50px;
    align-items: center;
  }

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

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

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

  .footer-column {
    min-width: unset;
  }
}

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