:root {
  --header-offset: 150px; /* Desktop: Header-top (90px) + Main-nav (60px) */
}
@media (max-width: 768px) {
  :root {
    --header-offset: 172px; /* Mobile: Header-top (~60px) + Mobile-nav-buttons (~112px) */
  }
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #FFFFFF;
  background-color: #000000; /* Default background for body */
  padding-top: var(--header-offset);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header Styles */
.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: #000000; /* Default background for fixed header */
}

.header-top {
  background-color: #000000; /* Main color for top section */
  padding: 15px 0;
  min-height: 60px; /* Base height for 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%;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FCBC45; /* Brand color for logo */
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  line-height: 1;
}

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

.btn {
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
  line-height: 1;
  display: inline-flex; /* Ensure vertical alignment */
  align-items: center;
  justify-content: center;
}

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

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

.register-btn {
  background-color: #FFFFFF;
  color: #000000;
}

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

.main-nav {
  background-color: #1A1A1A; /* Darker grey for nav section, contrasts with header-top */
  padding: 10px 0;
  min-height: 40px; /* Base height for nav links */
  display: flex; /* Desktop default: flex */
  flex-direction: row; /* Desktop default: row */
  justify-content: center;
  align-items: center;
  width: 100%;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* Allow wrapping on smaller desktop screens */
  width: 100%;
}

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

.nav-link:hover {
  color: #FCBC45;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  position: relative; /* For icon animation */
  width: 45px; /* Fixed width for consistent spacing */
  height: 45px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #FFFFFF;
  margin: 4px 0;
  transition: 0.4s;
  border-radius: 2px;
}

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

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

/* Footer Styles */
.site-footer {
  background-color: #000000;
  color: #FFFFFF;
  padding: 40px 20px 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-section {
  flex: 1;
  min-width: 200px;
}

.footer-section h3 {
  color: #FCBC45;
  font-size: 18px;
  margin-bottom: 15px;
}

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

.footer-nav li a {
  color: #FFFFFF;
  text-decoration: none;
  display: block;
  padding: 5px 0;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  margin: 0;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .site-header {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  }

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

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

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

  .logo {
    order: 2;
    flex: 1;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    padding-right: 45px; /* Offset for hamburger menu width to truly center */
  }

  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

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

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    justify-content: center;
    gap: 10px;
    background-color: #000000; /* Same as header-top */
    padding: 15px 15px;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
  }

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

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

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

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

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

  /* Hamburger menu active state */
  .hamburger-menu.active .hamburger-icon:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger-menu.active .hamburger-icon:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu.active .hamburger-icon:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .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.6);
    z-index: 998;
  }

  .mobile-menu-overlay.active {
    display: block; /* Show when active */
  }

  body.no-scroll {
    overflow: hidden;
  }

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

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

  /* Mobile content image protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: 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;
  }
}
