:root {
  --header-offset: 120px; /* Desktop: header + button area total height */
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #333;
  line-height: 1.6;
  background-color: #f4f4f4;
  padding-top: var(--header-offset);
  overflow-x: hidden;
}

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  min-height: 60px; /* Ensure content adaptation */
  display: flex;
  flex-direction: column; /* Desktop default for two rows */
}

.header-top {
  background-color: #1A202C; /* Secondary color for top bar */
  width: 100%;
  padding: 10px 0;
}

.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 */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FFD700; /* Primary color for logo text */
  text-decoration: none;
  display: block;
  padding: 5px 0;
  white-space: nowrap;
}

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

.btn {
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(90deg, #FFD700 0%, #FFA500 100%);
  color: #1A202C;
  box-shadow: 0 4px 8px rgba(255, 215, 0, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(90deg, #FFA500 0%, #FFD700 100%);
  box-shadow: 0 6px 12px rgba(255, 215, 0, 0.6);
}

.btn-secondary {
  background-color: #1A202C;
  color: #FFD700;
  border: 2px solid #FFD700;
}

.btn-secondary:hover {
  background-color: #333;
  color: #FFD700;
  border-color: #FFA500;
}

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

.hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #FFD700;
  margin: 5px auto;
  transition: all 0.3s ease-in-out;
}

.main-nav {
  background-color: #FFD700; /* Primary color for nav bar */
  width: 100%;
  padding: 10px 0;
  display: flex; /* Desktop default: flex */
  flex-direction: row; /* Desktop default: row */
}

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

.nav-link {
  color: #1A202C; /* Secondary color for nav links */
  text-decoration: none;
  padding: 10px 15px;
  font-weight: bold;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background-color: rgba(26, 32, 44, 0.1);
  border-radius: 5px;
}

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

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

.site-footer {
  background-color: #1A202C; /* Secondary color for footer */
  color: #FFD700;
  padding: 40px 20px;
  text-align: center;
}

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

.footer-column {
  flex: 1;
  min-width: 250px;
  margin: 15px;
}

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

.site-footer h3 {
  color: #FFD700;
  font-size: 18px;
  margin-bottom: 20px;
}

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

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

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

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

.footer-bottom {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 215, 0, 0.2);
  color: #ccc;
  font-size: 14px;
}

/* Mobile Styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 200px; /* Mobile: total header height */
  }

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

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
    position: relative; /* For logo centering */
    min-height: 60px;
  }

  .logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    z-index: 1;
  }

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

  .hamburger-menu {
    display: block;
    order: -1; /* Place hamburger on the left */
    margin-right: auto;
    z-index: 1001;
  }

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

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

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    height: 100%;
    background-color: #1A202C; /* Dark background for mobile menu */
    flex-direction: column;
    padding-top: var(--header-offset); /* Push content below header */
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
  }

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

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

  .nav-link {
    color: #FFD700; /* Gold links in dark mobile menu */
    width: 100%;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
  }

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

  .mobile-buttons-area {
    display: block; /* Show on mobile */
    background-color: #FFD700; /* Primary color for mobile buttons area */
    padding: 10px 15px;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 990; /* Below main menu */
  }

  .mobile-buttons-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: none;
  }

  .mobile-buttons-container .btn {
    flex: 1;
    max-width: 120px;
    padding: 8px 10px;
    font-size: 14px;
  }

  .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.5);
    z-index: 999; /* Below menu, above content */
  }

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

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

  .footer-column {
    margin: 15px 0;
    min-width: unset;
    width: 100%;
  }

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