:root {
  --header-offset: 120px; /* Desktop: header + button area total height */
  --primary-color: #CC0000;
  --secondary-color: #FFD700;
  --dark-bg: #1a1a1a;
  --light-text: #FFFFFF;
  --medium-text: #CCCCCC;
}

@media (max-width: 768px) {
  :root {
    --header-offset: 160px; /* Mobile: approx. height of header-top + mobile-buttons */
  }
}

/* Base Styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #333;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Site Header - Fixed & Suspended */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  background-color: var(--dark-bg); /* Fallback, adjusted by header-top/main-nav */
}

/* Header Top Area (Desktop) */
.header-top {
  background-color: var(--dark-bg); /* Dark background for logo and buttons */
  padding: 15px 0;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px; /* Padding for logo/buttons from container edge */
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color); /* Gold for logo text */
  white-space: nowrap;
  padding-right: 20px; /* Space between logo and potential other elements */
}

.desktop-nav-buttons {
  display: flex;
  gap: 10px; /* Space between buttons */
}

/* Main Navigation Area (Desktop) */
.main-nav {
  background-color: var(--primary-color); /* Primary red for nav background */
  width: 100%;
  display: flex; /* Desktop: visible, row layout */
  padding: 10px 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center; /* Center nav links */
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap; /* Allow wrapping for many links */
}

.nav-link {
  color: var(--light-text); /* White for nav links */
  padding: 10px 15px;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  text-decoration: none; /* Remove underline */
}

.btn-primary {
  background-color: var(--secondary-color); /* Gold background */
  color: var(--primary-color); /* Red text */
  border: none;
}

.btn-primary:hover {
  background-color: #e0bb00; /* Slightly darker gold */
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--primary-color); /* Red background */
  color: var(--light-text); /* White text */
  border: 1px solid var(--secondary-color); /* Gold border */
}

.btn-secondary:hover {
  background-color: #a00000; /* Slightly darker red */
  transform: translateY(-2px);
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001; /* Above logo on mobile */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color); /* Gold lines */
  margin-bottom: 5px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-menu span:last-child {
  margin-bottom: 0;
}

/* Mobile Specific Styles */
@media (max-width: 768px) {
  .site-header {
    flex-direction: column; /* Stack header-top and mobile-buttons */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  }

  .header-top {
    padding: 10px 0;
    width: 100%;
    background-color: var(--dark-bg); /* Explicit background for header-top */
    display: flex;
    align-items: center;
  }

  .header-container {
    width: 100%; /* Mobile: full width */
    max-width: none; /* Mobile: no max-width */
    padding: 0 15px; /* Smaller padding for mobile */
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    z-index: 1002; /* Higher than logo and overlay */
  }

  .logo {
    font-size: 20px;
    padding: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    max-width: calc(100% - 80px); /* Account for hamburger width */
    text-align: center;
  }

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

  .mobile-buttons {
    display: flex; /* Show mobile buttons */
    justify-content: center;
    gap: 10px;
    background-color: var(--dark-bg); /* Consistent with header-top */
    padding: 10px 15px;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }

  /* Main Nav (Mobile) - hidden by default, slides in */
  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0; /* Start from top of viewport, padding-top will push content */
    left: 0;
    width: 280px; /* Sidebar width */
    height: 100%;
    flex-direction: column;
    background-color: var(--primary-color); /* Primary red for mobile menu */
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease-in-out;
    padding-top: var(--header-offset); /* Push menu content down by header height */
    overflow-y: auto; /* Scrollable if menu content is long */
    z-index: 999; /* Below hamburger, above overlay */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
  }

  .nav-container {
    width: 100%; /* Mobile: full width */
    max-width: none; /* Mobile: no max-width */
    flex-direction: column; /* Stack links vertically */
    align-items: flex-start; /* Align links to left */
    padding: 20px 15px;
  }

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 18px;
  }

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

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

  /* Active states for mobile menu */
  .main-nav.active {
    display: flex; /* Show menu */
    transform: translateX(0); /* Slide into view */
  }

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

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

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

  .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); /* Semi-transparent black */
    z-index: 998; /* Below menu, above page content */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
  }

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

  body.no-scroll {
    overflow: hidden;
  }

  /* Mobile content area protection */
  .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(--dark-bg); /* Dark background for footer */
  color: var(--medium-text); /* Light grey text */
  padding: 40px 20px 20px;
  font-size: 14px;
}

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

.footer-col {
  flex: 1;
  min-width: 200px;
}

.footer-logo {
  font-size: 20px;
  font-weight: bold;
  color: var(--secondary-color); /* Gold for footer logo */
  margin-bottom: 15px;
  display: block;
}

.footer-col h3 {
  color: var(--light-text); /* White for footer headings */
  font-size: 16px;
  margin-bottom: 15px;
}

.footer-col p {
  margin-bottom: 10px;
}

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

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

.footer-nav a {
  color: var(--medium-text); /* Light grey for footer links */
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--secondary-color); /* Gold on hover */
}

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

.copyright {
  color: var(--medium-text);
  margin: 0;
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }

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

  .footer-logo {
    margin-bottom: 10px;
  }

  .footer-col h3 {
    margin-top: 20px;
  }
}
/* 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;
  }
}
