:root {
  --header-offset: 110px; /* Desktop: Calculated from header-top (60px) + main-nav (50px) */
}

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

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

/* Shared styles for header and footer */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.header-top {
  background-color: #000000; /* Primary color */
  width: 100%;
  padding: 15px 0;
  display: flex;
  align-items: center;
  min-height: 60px; /* Ensures consistent height */
}

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

.logo,
.footer-logo {
  font-weight: bold;
  font-size: 24px;
  text-decoration: none;
  color: #FFFFFF; /* Secondary color for logo on dark background */
  white-space: nowrap;
  letter-spacing: 0.5px;
}

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

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

.btn.login-btn {
  background-color: #FCBC45; /* Login button color */
  color: #000000;
}

.btn.login-btn:hover {
  background-color: #e0a53b;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn.register-btn {
  background-color: #FFFFFF; /* Register button color */
  color: #000000;
}

.btn.register-btn:hover {
  background-color: #f0f0f0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.main-nav {
  background-color: #FFFFFF; /* Secondary color for main nav, different from header-top */
  width: 100%;
  display: flex; /* Desktop default: flex */
  align-items: center;
  padding: 10px 0;
  min-height: 50px; /* Ensures consistent height */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: row; /* Desktop default: row */
  justify-content: center;
  align-items: center;
  padding: 0 20px;
}

.nav-link {
  color: #000000; /* Primary color for links on light background */
  text-decoration: none;
  padding: 8px 15px;
  font-weight: bold;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: #FCBC45;
  background-color: #f5f5f5;
  border-radius: 3px;
}

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

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #FFFFFF; /* Hamburger lines on dark header-top */
  border-radius: 3px;
  transition: all 0.3s ease-in-out;
}

.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: rgba(0, 0, 0, 0.7);
  z-index: 999;
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

/* Footer styles */
.site-footer {
  background-color: #000000; /* Primary color for footer */
  color: #FFFFFF; /* Secondary color for text on dark background */
  padding: 40px 0;
  margin-top: auto;
}

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

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

.footer-col h3 {
  color: #FCBC45; /* Highlight color for footer headings */
  font-size: 18px;
  margin-bottom: 20px;
}

.footer-col p {
  font-size: 14px;
  line-height: 1.8;
  opacity: 0.8;
}

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

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

.footer-nav a {
  color: #FFFFFF;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
  opacity: 0.9;
}

.footer-nav a:hover {
  color: #FCBC45;
  opacity: 1;
}

.footer-logo {
  margin-bottom: 15px;
  display: inline-block;
  font-size: 20px;
}

/* 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;
    justify-content: flex-start; /* Align items to start for hamburger on left */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    margin-right: 20px;
  }

  .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 {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
  }
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical menu */
    position: fixed;
    top: var(--header-offset); /* Position below the fixed header + mobile buttons */
    left: 0;
    width: 80%;
    height: calc(100% - var(--header-offset));
    background-color: #000000; /* Dark background for mobile menu */
    transform: translateX(-100%); /* Off-screen by default */\    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
  }

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

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

  .nav-link {
    color: #FFFFFF; /* White links on dark mobile menu */
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .mobile-buttons-area {
    display: block; /* Show mobile buttons area */
    background-color: #000000; /* Same as header-top */
    padding: 10px 0;
    width: 100%;
    position: fixed;
    top: 60px; /* Below header-top (which is 60px height) */
    z-index: 990;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    min-height: 50px; /* Ensures consistent height */
  }

  .mobile-buttons-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
  }

  .site-footer .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-col {
    width: 100%;
    margin-bottom: 30px;
  }

  .footer-col:last-child {
    margin-bottom: 0;
  }
}
/* 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;
  }
}
