:root {
  --header-offset: 105px; /* Desktop: header-top (60px) + main-nav (45px) = 105px */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 120px; /* Mobile: header-top (60px) + mobile-buttons (60px) = 120px */
  }
}

html {
  scroll-behavior: smooth;
}

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;
  line-height: 1.6;
  direction: ltr;
  overflow-x: hidden; /* Prevent body overflow */
}

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

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-top {
  background-color: #000000; /* Primary color */
  padding: 15px 0; /* Ensures approx 60px height with 30px content */
  color: #FFFFFF;
}

.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: #FCBC45; /* Contrasting color for logo */
  text-transform: uppercase;
  flex-shrink: 0; /* Prevent logo from shrinking */
  display: block;
}

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

.btn {
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none; /* Remove underline */
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  white-space: nowrap; /* Prevent buttons from wrapping */
  cursor: pointer;
}

.btn-login {
  background-color: #FCBC45; /* Login color */
  color: #000000; /* Contrasting text color */
  border: 1px solid #FCBC45;
}

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

.btn-register {
  background-color: #FFFFFF; /* Register color */
  color: #000000; /* Contrasting text color */
  border: 1px solid #FFFFFF;
}

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

.main-nav {
  background-color: #333333; /* Different dark color for main nav */
  padding: 10px 0; /* Ensures approx 45px height with 24px content */
  width: 100%;
  display: flex; /* Desktop default: flex */
}

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

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

.nav-link:hover {
  color: #FCBC45; /* Highlight color */
}

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

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

.mobile-buttons {
  display: none; /* Hidden by default 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.7);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* Footer Styles */
.site-footer {
  background-color: #000000; /* Primary color */
  color: #FFFFFF;
  padding: 40px 20px 20px;
  font-size: 14px;
}

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

.footer-col h3 {
  color: #FCBC45; /* Highlight color for titles */
  font-size: 18px;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.footer-col p {
  line-height: 1.8;
  color: #cccccc;
}

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

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

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

.footer-nav a:hover {
  color: #FCBC45; /* Highlight color */
}

.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  text-align: center;
  border-top: 1px solid #444444;
  padding-top: 20px;
  color: #cccccc;
}

/* Mobile styles */
@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none;
    justify-content: center; /* Center logo by default */
    position: relative; /* For absolute positioning of hamburger */
  }

  .logo {
    flex: 1; /* Allow logo to take available space for centering */
    text-align: center; /* Center text logo */
    font-size: 24px;
  }
  
  /* Specific styling for image logo centering if it were an img tag inside .logo */
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
    margin: 0 auto; /* Center image */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger menu on mobile */
    position: absolute;
    left: 15px; /* Align to the left of the container padding */
    top: 50%;
    transform: translateY(-50%);
  }

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

  .main-nav {
    display: none; /* Hide main nav by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Start below the visible header + buttons */
    left: 0;
    width: 80%;
    max-width: 300px;
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background-color: #222222; /* Slightly different background for mobile menu */
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease-out;
    padding: 20px 0;
    overflow-y: auto; /* Allow scrolling for many menu items */
  }

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

  .nav-container {
    flex-direction: column;
    padding: 0 15px;
    width: 100%;
    max-width: none;
    align-items: flex-start; /* Align menu items to the left */
  }

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

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

  .mobile-buttons {
    display: flex; /* Show mobile buttons */
    justify-content: center;
    gap: 10px;
    background-color: #1a1a1a; /* Background for mobile buttons area */
    padding: 10px 15px;
    width: 100%;
    box-sizing: border-box; /* Include padding in width */
  }

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

  .footer-col {
    min-width: unset;
    width: 100%;
  }
  
  /* Mobile content overflow prevention */
  .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.no-scroll {
    overflow: hidden;
  }

  /* Hamburger menu active state (X icon) */
  .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);
  }
}
/* 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;
  }
}
