:root {
  --header-offset: 98px; /* Desktop: Calculated based on header-top (~58px) + main-nav (~40px) */
}
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: Calculated based on header-top (~54px) + mobile-nav-buttons (~56px) */
  }
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333333;
  padding-top: var(--header-offset);
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

/* 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; /* Default background for the entire fixed header */
}

.header-top {
  background-color: #000000; /* Main color for top section */
  width: 100%;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #FFFFFF;
  text-decoration: none;
  line-height: 1;
  letter-spacing: 0.5px;
}

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

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
  border: none;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
}

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

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

.main-nav {
  background-color: #333333; /* Darker grey for navigation, distinct from header-top */
  width: 100%;
  display: flex;
}

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

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

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

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 25px;
  position: relative;
  cursor: pointer;
  z-index: 1002;
  flex-shrink: 0;
}

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

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

.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);
}

.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;
}

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

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

.site-footer .footer-column {
  flex: 1;
  min-width: 200px;
  text-align: left;
}

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

.site-footer .footer-column p {
  margin-bottom: 10px;
  color: #BBBBBB;
}

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

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

.site-footer .footer-nav a {
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

/* Mobile Styles */
@media (max-width: 768px) {
  /* Prevent content overflow */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }

  .site-header {
    flex-direction: column;
  }

  .header-container {
    width: 100%;
    max-width: none; /* Ensure container takes full width */
    padding: 15px;
    justify-content: space-between; /* Space out hamburger and logo */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
  }

  .desktop-nav-buttons {
    display: none;
  }

  .hamburger-menu {
    display: block;
    order: -1; /* Place hamburger first */
    margin-right: auto; /* Push logo to center */
  }

  .mobile-nav-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: #000000;
    width: 100%;
  }

  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0; /* Position from top, will be pushed down by padding-top */
    left: 0;
    width: 80%;
    height: 100%;
    background-color: #222222;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1001;
    padding-top: var(--header-offset); /* Ensure menu content starts below the fixed mobile header */
    overflow-y: auto;
  }

  .main-nav.active {
    display: flex; /* Must be flex to show */
    transform: translateX(0);
  }

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

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

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

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

  .site-footer .footer-column {
    width: 100%;
    min-width: unset;
    text-align: center;
  }
  .site-footer .footer-column h3 {
    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;
  }
}
