:root {
  --header-offset: 110px; /* Desktop: Matches header-top (60px) + main-nav (50px) */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: Matches header-top (60px) + mobile-nav-buttons (50px) */
  }
  .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 {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #FFFFFF;
  background-color: #FFFFFF;
  padding-top: var(--header-offset);
}

/* Site Header */
.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: transparent; /* Managed by header-top and main-nav */
}

.header-top {
  background-color: #000000; /* Primary color */
  padding: 10px 0;
  min-height: 60px; /* Explicit height for offset calculation */
  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;
  width: 100%;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FCBC45; /* Contrasting color for logo */
  text-decoration: none;
  text-transform: uppercase;
  display: block;
}

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

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

.btn-login {
  background-color: #FCBC45; /* Login button color */
  color: #000000;
}

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

.btn-register {
  background-color: #FFFFFF; /* Register button color */
  color: #000000;
}

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

.main-nav {
  background-color: #1a1a1a; /* Dark gray for contrast with header-top */
  padding: 10px 0;
  min-height: 50px; /* Explicit height for offset calculation */
  display: flex;
  justify-content: center;
  align-items: center;
}

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

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

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

.hamburger-menu,
.mobile-nav-buttons,
.mobile-menu-overlay {
  display: none;
}

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

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  text-align: left;
}

.footer-section {
  flex: 1;
  min-width: 200px;
  margin-bottom: 20px;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: #FCBC45; /* Contrasting color for footer logo */
  text-decoration: none;
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px;
}

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

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

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

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

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

.about-section p {
  line-height: 1.8;
  color: #cccccc;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none;
    justify-content: space-between; /* Hamburger left, Logo center, empty space right */
  }

  .logo {
    flex: 1 !important; /* Forces logo to take available space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
  }
  
  .desktop-nav-buttons {
    display: none;
  }

  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
  }

  .hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: #FFFFFF;
    transition: all 0.3s ease;
  }

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

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

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

  .mobile-nav-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 10px 15px;
    background-color: #000000; /* Same as header-top for continuity */
    min-height: 50px; /* Explicit height for offset calculation */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }

  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 80%; /* Adjust as needed */
    max-width: 300px;
    height: calc(100% - var(--header-offset));
    background-color: #1a1a1a; /* Same as desktop nav */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    padding: 0;
    min-height: auto; /* Override desktop min-height */
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    width: 100%;
    max-width: none; /* Important for mobile */
  }

  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
  }

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

  .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
  }

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

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

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

  .footer-section:not(:last-child) {
    margin-bottom: 30px;
  }

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

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