:root {
  --header-offset: 110px; /* Desktop: header-top (~60px) + main-nav (~50px) = 110px */
}
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: header-top (~50px) + mobile-nav-buttons (~50px) = 100px. Using 110px to match desktop for consistency and safety */
  }
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}

/* Global Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  line-height: 1.6;
  color: #333;
  background-color: #FFFFFF; /* Background: #FFFFFF */
  overflow-x: hidden; /* Prevent body overflow */
}

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

.header-top {
  background-color: #000000; /* Header Top: Primary color */
  padding: 15px 0;
  min-height: 30px; /* Base height for content */
  display: flex;
  align-items: center;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px; /* Padding for logo and buttons from container edges */
  width: 100%;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #FCBC45; /* Contrasting color for logo text */
  text-decoration: none;
  text-transform: uppercase;
  display: block; /* Ensure logo is visible on desktop */
  white-space: nowrap;
}

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

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

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

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

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

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

.main-nav {
  background-color: #333333; /* Main Nav: Darker gray to contrast with header-top */
  padding: 10px 0;
  display: flex; /* Desktop default: flex */
  flex-direction: row; /* Desktop default: row */
  justify-content: center;
  align-items: center;
  min-height: 30px; /* Base height for content */
}

.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;
  width: 100%;
}

.nav-link {
  color: #FFFFFF; /* Nav links: White */
  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; /* Hover color: Yellow/Gold */
}

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

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

.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-nav-buttons {
  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.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; /* Footer background: Primary color */
  color: #FFFFFF; /* Footer text: Secondary color */
  padding: 40px 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: 180px;
}

.footer-col h3 {
  color: #FCBC45; /* Footer heading: Yellow/Gold */
  margin-bottom: 15px;
  font-size: 18px;
}

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

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

.footer-nav a {
  color: #FFFFFF; /* Footer link: White */
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #FCBC45; /* Footer link hover: Yellow/Gold */
}

.footer-copyright {
  width: 100%;
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #333333; /* Subtle separator */
  color: #AAAAAA;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .header-container,
  .nav-container,
  .footer-container {
    width: 100%;
    max-width: none; /* Important: Remove max-width on mobile */
    padding: 0 15px; /* Smaller padding on mobile */
  }

  .header-top {
    padding: 10px 0;
    min-height: 30px; /* Adjust for mobile */
  }

  .header-container {
    justify-content: flex-start; /* Hamburger on the left */
    position: relative; /* For logo centering */
  }

  .logo {
    font-size: 20px;
    position: absolute; /* Centering text logo */
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: block;
    width: fit-content;
    text-align: center;
    z-index: 1001; /* Above other elements if needed, but below hamburger */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger menu */
    z-index: 1002; /* Higher than logo for clickability */
  }

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

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

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

  .nav-container {
    flex-direction: column;
    padding: 0;
    align-items: flex-start;
    width: 100%; /* Ensure mobile nav container takes full width */
  }

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

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

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    justify-content: center;
    gap: 10px;
    background-color: #000000; /* Same as header-top */
    padding: 10px 15px;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 990; /* Below main nav but above content */
  }

  .btn {
    flex: 1;
  }

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

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

  .footer-col ul {
    padding: 0;
  }

  .footer-col li {
    display: inline-block;
    margin: 0 10px 10px 10px;
  }

  .footer-col li:last-child {
    margin-right: 0;
  }

  .footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
  }

  .footer-nav li {
    margin-bottom: 0;
  }
  .footer-copyright {
    margin-top: 20px;
  }
}
/* 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;
  }
}
