:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #8B0000; /* Dark Red */
  --text-color-light: #f0f0f0;
  --text-color-dark: #333333;
  --bg-dark-1: #1a1a1a;
  --bg-dark-2: #333333;
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 105px; /* Mobile: header-top (60px) + mobile-nav-buttons (45px) */
  }
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark);
}

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  background-color: var(--bg-dark-1); /* Fallback, specific colors for header-top and main-nav */
}

.header-top {
  background-color: var(--bg-dark-1); /* Dark background for top bar */
  padding: 10px 0;
  min-height: 60px; /* Ensure sufficient height */
  display: flex;
  align-items: center;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px; /* Padding for desktop */
}

.logo {
  font-family: 'Arial Black', sans-serif;
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color); /* Gold logo */
  text-decoration: none;
  white-space: nowrap;
  padding: 0;
  order: 1; /* Default order for desktop */
}

.desktop-nav-buttons {
  display: flex;
  gap: 10px;
  order: 2; /* Default order for desktop */
}

.btn {
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  text-align: center;
  display: inline-block;
  line-height: 1.2;
}

.btn-primary {
  background-color: var(--primary-color); /* Gold button */
  color: var(--text-color-dark); /* Dark text on gold */
}

.btn-primary:hover {
  background-color: #e6c200;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--secondary-color); /* Dark Red button */
  color: var(--text-color-light); /* Light text on dark red */
}

.btn-secondary:hover {
  background-color: #6a0000;
  transform: translateY(-2px);
}

.main-nav {
  background-color: var(--secondary-color); /* Dark Red background for nav */
  padding: 10px 0;
  min-height: 50px; /* Ensure sufficient height */
  display: flex; /* Desktop default is flex */
  justify-content: center;
  align-items: center;
}

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

.nav-link {
  color: var(--text-color-light); /* Light text for nav links */
  text-decoration: none;
  padding: 8px 15px;
  font-weight: bold;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
  border-radius: 3px;
}

.nav-link:hover {
  color: var(--primary-color); /* Gold on hover */
  background-color: rgba(255, 255, 255, 0.1);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1001;
  position: relative;
  order: 0; /* Ensures it's first in flex container on mobile */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--primary-color); /* Gold bars */
  transition: all 0.3s ease;
  border-radius: 2px;
}

.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 on desktop */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  cursor: pointer;
}

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

@media (max-width: 768px) {
  .header-container {
    padding: 0 15px; /* Smaller padding for mobile */
    justify-content: space-between; /* Space between hamburger and logo */
  }

  .logo {
    flex: 1 !important; /* Allow logo to take space */
    display: flex !important;
    justify-content: center !important; /* Center the logo */
    align-items: center !important;
    order: 1; /* Place logo in middle */
    font-size: 24px;
  }
  
  /* Placeholder to balance the hamburger menu on the right for perfect logo centering */
  .header-container::after {
    content: '';
    width: 30px; /* Match hamburger width for centering effect */
    order: 2;
  }

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

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
  }

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    background-color: var(--bg-dark-2); /* Different dark background for mobile buttons */
    padding: 10px 15px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: center; /* Center buttons horizontally */
    align-items: center;
    min-height: 45px;
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* For two buttons with 10px gap */
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hide nav by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below header + buttons */
    left: 0;
    width: 250px; /* Sidebar width */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    flex-direction: column; /* Vertical menu */
    align-items: flex-start;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    background-color: var(--bg-dark-2); /* Dark background for mobile menu */
    z-index: 1000;
    overflow-y: auto; /* Enable scrolling for long menus */
  }

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

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

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

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

  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}

/* Footer styles */
.site-footer {
  background-color: var(--bg-dark-1);
  color: var(--text-color-light);
  padding: 40px 0 20px;
  font-size: 14px;
}

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

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

.footer-logo {
  font-family: 'Arial Black', sans-serif;
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.site-footer h3 {
  color: var(--primary-color);
  font-size: 18px;
  margin-bottom: 15px;
}

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

.site-footer a {
  color: var(--text-color-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-footer a:hover {
  color: var(--primary-color);
}

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

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

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

body.no-scroll {
  overflow: 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;
  }
}
