:root {
  --primary-color: #FFD700;
  --auxiliary-color: #8B0000;
  --text-dark: #333;
  --text-light: #fff;
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: 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;
  color: var(--text-dark);
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
}

/* Site Header - Fixed, Shadow, Z-index */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  background-color: var(--auxiliary-color); /* Fallback for transparency issues */
}

/* Header Top - Desktop Layout */
.header-top {
  background-color: var(--auxiliary-color); /* Dark red */
  min-height: 60px; /* Base height for header-top */
  display: flex;
  align-items: center;
  padding: 10px 0; /* Adjust padding to make space for content */
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color); /* Gold color for logo */
  text-decoration: none;
  display: block; /* Ensure logo is treated as a block for flex alignment */
  white-space: nowrap; /* Prevent logo text from wrapping */
}

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

/* Main Navigation - Desktop Layout */
.main-nav {
  background-color: var(--primary-color); /* Gold */
  min-height: 50px; /* Base height for main-nav */
  display: flex; /* Default to flex for desktop */
  align-items: center;
  padding: 10px 0; /* Adjust padding to make space for content */
}

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

.nav-link {
  color: var(--auxiliary-color); /* Dark red for nav links on gold background */
  text-decoration: none;
  font-weight: bold;
  padding: 8px 15px;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  background-color: rgba(139, 0, 0, 0.1); /* Lighter shade of auxiliary for hover */
  border-radius: 4px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.btn-login {
  background-color: var(--primary-color); /* Gold */
  color: var(--auxiliary-color); /* Dark red */
  border: 2px solid var(--primary-color);
}

.btn-login:hover {
  background-color: var(--auxiliary-color); /* Dark red */
  color: var(--primary-color); /* Gold */
  border-color: var(--primary-color);
}

.btn-register {
  background-color: var(--auxiliary-color); /* Dark red */
  color: var(--primary-color); /* Gold */
  border: 2px solid var(--auxiliary-color);
}

.btn-register:hover {
  background-color: var(--primary-color); /* Gold */
  color: var(--auxiliary-color); /* Dark red */
  border-color: var(--auxiliary-color);
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  padding: 5px;
  z-index: 1001; /* Above mobile buttons */
}

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

.hamburger-menu.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav Buttons (Hidden on Desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
  background-color: var(--auxiliary-color); /* Dark red */
  padding: 10px 20px;
  justify-content: center;
  gap: 12px;
  min-height: 50px; /* Base height for mobile buttons */
  align-items: center;
}

/* Mobile Menu Overlay (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;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* Footer Styles */
.site-footer {
  background-color: var(--auxiliary-color); /* Dark red for footer */
  color: var(--text-light);
  padding: 40px 0 20px;
  font-size: 14px;
}

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

.footer-col {
  flex: 1;
  min-width: 250px;
  margin-bottom: 20px;
  padding-right: 20px;
}

.footer-col:last-child {
  padding-right: 0;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color); /* Gold for footer logo */
  text-decoration: none;
  margin-bottom: 15px;
  display: block;
}

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

.site-footer p {
  line-height: 1.6;
  color: #ccc;
}

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

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

.site-footer ul li a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-footer ul li a:hover {
  color: var(--primary-color); /* Gold on hover */
}

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

/* Mobile styles */
@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
  }

  .header-top {
    min-height: 60px; /* Keep consistent height */
    padding: 10px 0;
  }

  .header-container {
    width: 100%;
    max-width: none; /* Crucial for mobile container width */
    padding: 0 15px; /* Mobile padding */
    justify-content: space-between; /* Space between hamburger and logo */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    order: 0; /* Place hamburger first */
    margin-right: 10px; /* Space between hamburger and logo */
  }

  .logo {
    flex: 1; /* Allow logo to take available space */
    display: flex; /* Use flex to center the logo */
    justify-content: center; /* Center logo horizontally */
    align-items: center;
    font-size: 24px; /* Adjust logo size for mobile */
    margin: 0; /* Reset margin */
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical menu */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header */
    left: 0;
    width: 250px; /* Width of the mobile menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--auxiliary-color); /* Dark red for mobile menu */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Enable scrolling for long menus */
    z-index: 1000;
  }

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

  .nav-container {
    flex-direction: column;
    padding: 20px 0;
    width: 100%;
    max-width: none; /* Crucial for mobile container width */
  }

  .nav-link {
    width: 100%;
    padding: 12px 20px;
    text-align: left;
    color: var(--primary-color); /* Gold for mobile nav links */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    width: 100%;
    min-height: 50px; /* Keep consistent height */
    padding: 10px 15px;
    background-color: var(--auxiliary-color); /* Dark red */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 990; /* Below hamburger menu, above content */
    align-items: center;
    justify-content: center; /* Center the buttons */
    gap: 12px;
  }

  .footer-container {
    flex-direction: column;
    padding: 0 15px; /* Mobile padding */
  }

  .footer-col {
    min-width: auto;
    width: 100%;
    padding-right: 0;
    text-align: center;
  }

  .footer-logo {
    margin: 0 auto 15px;
  }

  .site-footer h3 {
    text-align: center;
  }

  .site-footer ul {
    text-align: center;
  }
}

/* Body no-scroll class for mobile menu */
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;
  }
}
