:root {
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: header-top (60px) + mobile-buttons-container (50px) */
  }
}

/* Base Styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #333;
  padding-top: var(--header-offset);
  overflow-x: hidden; /* Prevent horizontal scroll on mobile */
}

/* 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: #000080; /* Secondary color for header-top background */
  display: flex;
  flex-direction: column; /* Stack header-top and main-nav */
  min-height: auto;
}

.header-top {
  background-color: #000080; /* Dark Blue */
  padding: 15px 0;
  height: 60px; /* Fixed height for header-top */
  display: flex;
  align-items: center;
  width: 100%;
}

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

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

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

.btn {
  display: inline-block;
  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;
}

.login-btn {
  background-color: #FFD700; /* Gold */
  color: #000080; /* Dark Blue */
  border: 1px solid #FFD700;
}
.login-btn:hover {
  background-color: #e0b800;
  color: #000080;
}

.register-btn {
  background-color: #000080; /* Dark Blue */
  color: #FFD700; /* Gold */
  border: 1px solid #FFD700;
}
.register-btn:hover {
  background-color: #000066;
  color: #FFD700;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  position: relative;
  width: 30px;
  height: 30px;
}

.hamburger-icon {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFD700; /* Gold */
  margin: 6px 0;
  transition: all 0.3s ease;
}

.main-nav {
  background-color: #FFD700; /* Gold */
  padding: 10px 0;
  height: 50px; /* Fixed height for main-nav */
  display: flex;
  align-items: center;
  width: 100%;
  flex-grow: 1;
}

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

.nav-link {
  color: #000080; /* Dark Blue */
  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 {
  background-color: rgba(0, 0, 128, 0.1); /* Slightly transparent dark blue */
  border-radius: 4px;
}

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

.mobile-menu-overlay {
  display: none;
}

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

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: #FFD700; /* Gold */
  text-decoration: none;
  text-transform: uppercase;
  margin-bottom: 15px;
  display: block;
}

.footer-section h3 {
  color: #FFD700; /* Gold */
  font-size: 18px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.footer-section p {
  margin-bottom: 10px;
  line-height: 1.6;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.footer-nav a:hover {
  color: #FFD700; /* Gold */
}

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

/* Mobile Styles */
@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;
  }

  .site-header {
    flex-direction: column;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }

  .header-top {
    height: 60px;
  }

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

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    top: 0;
  }

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

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

  .hamburger-menu {
    display: block;
    order: -1; /* Place hamburger menu to the far left */
    margin-right: auto;
  }

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

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

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: 0; /* Will be adjusted by JS, but fixed to viewport */
    left: 0;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background-color: #000080; /* Dark Blue for mobile menu background */
    flex-direction: column;
    padding-top: 80px; /* Space for fixed header content */
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    z-index: 9999;
    height: 100vh; /* Full viewport height */
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    width: 100%;
    max-width: none;
  }

  .nav-link {
    width: 100%;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #FFFFFF; /* White for mobile menu links */
    text-align: left;
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  .mobile-buttons-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 10px 15px;
    background-color: #000066; /* Slightly darker blue for mobile buttons area */
    width: 100%;
    height: 50px; /* Fixed height for mobile buttons container */
    box-sizing: border-box;
    align-items: center;
  }

  .mobile-buttons-container .btn {
    flex: 1;
    text-align: center;
  }

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

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

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

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

  .footer-nav {
    align-items: center;
  }
}
/* 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;
  }
}
