:root {
  --header-offset: 110px; /* Desktop: Calculated height of header-top (70px) + main-nav (40px) */
}
@media (max-width: 768px) {
  :root {
    --header-offset: 130px; /* Mobile: Calculated height of header-top (70px) + mobile-nav-buttons (60px) */
  }
}

html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

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

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  background-color: #000000; /* Fallback for main header background */
}

.header-top {
  background-color: #000000; /* Primary color for header top */
  width: 100%;
  min-height: 70px; /* Logo/buttons height + padding (15px top/bottom + ~40px content) */
  display: flex;
  align-items: center;
}

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

.logo {
  color: #FFFFFF;
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  padding: 15px 0; /* Ensures min-height of header-top for content */
  display: block;
  line-height: 1;
}

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

.main-nav {
  background-color: #1a1a1a; /* Dark grey, contrasting with header-top */
  width: 100%;
  min-height: 40px; /* Nav links height + padding (10px top/bottom + ~20px content) */
  display: flex; /* Desktop default: flex */
  flex-direction: row; /* Desktop default: row */
  position: static; /* Desktop default: static */
  align-items: center;
}

.main-nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px; /* Ensures min-height of main-nav for content */
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.nav-link {
  color: #FFFFFF;
  text-decoration: none;
  padding: 8px 15px;
  font-size: 16px;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #FCBC45;
}

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

.btn-login {
  background-color: #FCBC45;
  color: #000000;
}

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

.btn-register {
  background-color: #FFFFFF;
  color: #000000;
  border: 1px solid #FCBC45; /* Add a subtle border for contrast */
}

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

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

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 10px; }
.hamburger-menu span:nth-child(3) { top: 20px; }

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

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

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

/* Mobile specific button section */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
  background-color: #000000; /* Same as header-top for consistency */
  width: 100%;
  padding: 10px 0;
  min-height: 60px; /* Buttons height + padding (10px top/bottom + ~40px content) */
  box-sizing: border-box;
}

.mobile-nav-buttons .nav-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: none; /* Override desktop max-width */
  padding: 0 15px;
}

.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.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;
  color: #FFFFFF;
  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-column {
  flex: 1;
  min-width: 200px;
}

.footer-logo {
  color: #FCBC45;
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  margin-bottom: 15px;
  display: block;
}

.footer-description {
  color: #CCCCCC;
}

.site-footer h3 {
  color: #FFFFFF;
  font-size: 18px;
  margin-bottom: 20px;
}

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

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

.site-footer ul li a {
  color: #CCCCCC;
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-footer ul li a:hover {
  color: #FCBC45;
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #333333;
}

.copyright {
  color: #CCCCCC;
}

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

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

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    order: 0; /* Position to the left */
  }

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

  /* If logo is an image, use this */
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

  .mobile-nav-buttons {
    display: block; /* Show mobile buttons section */
  }

  .mobile-nav-buttons .nav-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
  }

  .main-nav {
    display: none; /* Hide by default */
    flex-direction: column; /* Vertical menu */
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 280px;
    height: calc(100% - var(--header-offset));
    background-color: #222222; /* Slightly different dark background for mobile menu */
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease;
    padding-top: 20px;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
  }

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

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

  .nav-link {
    padding: 12px 0;
    width: 100%;
    border-bottom: 1px solid #333333;
  }

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

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

  .footer-column {
    min-width: unset;
    width: 100%;
    text-align: center;
  }

  .footer-logo {
    margin: 0 auto 15px auto;
  }

  .site-footer h3 {
    text-align: center;
  }

  .site-footer ul {
    text-align: center;
  }
}

/* No scroll for body when mobile menu is open */
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;
  }
}
