:root {
  --primary-color: #FFD700;
  --secondary-color: #1A1A1A;
  --text-light: #FFFFFF;
  --text-dark: #1A1A1A;
  --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) */
  }
}

body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: var(--text-light);
  background-color: #333; /* A general background for the page content */
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  overflow-x: hidden; /* Prevent body overflow on mobile */
}

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

/* Header Styles - Desktop First */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.header-top {
  background-color: var(--secondary-color); /* Dark grey for top bar */
  padding: 10px 0;
  height: 60px; /* Fixed height for header-top to calculate offset */
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color); /* Gold logo */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block; /* Ensure logo is always visible */
}

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

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

.btn-primary {
  background-color: var(--primary-color); /* Gold button */
  color: var(--text-dark); /* Dark text on gold */
  box-shadow: 0 4px 8px rgba(255, 215, 0, 0.4);
}
.btn-primary:hover {
  background-color: #e6c200; /* Slightly darker gold on hover */
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(255, 215, 0, 0.6);
}

.btn-secondary {
  background-color: #333; /* Darker grey button */
  color: var(--text-light); /* White text on dark */
  border: 1px solid var(--primary-color); /* Gold border */
}
.btn-secondary:hover {
  background-color: #444;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

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

.main-nav {
  background-color: #222; /* Slightly lighter dark grey for nav bar */
  padding: 0;
  height: 50px; /* Fixed height for main-nav to calculate offset */
  display: flex; /* Desktop default: flex row */
  align-items: center;
  justify-content: center; /* Center links horizontally */
  position: static; /* Desktop default: static */
  width: 100%; /* Ensure it takes full width */
}

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

.nav-link {
  color: var(--text-light);
  padding: 0 15px; /* Adjust padding for spacing */
  height: 100%; /* Make links fill parent height */
  display: flex;
  align-items: center;
  transition: color 0.3s ease, background-color 0.3s ease;
  font-size: 16px;
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--primary-color); /* Gold on hover */
  background-color: #333; /* Darker background on hover */
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1100; /* Above logo on mobile */
}
.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}
.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu span:nth-child(3) { bottom: 0; }

.hamburger-menu.active span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; }
.hamburger-menu.active span:nth-child(3) { bottom: 50%; transform: translateY(50%) 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.7);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Footer Styles */
.site-footer {
  background-color: var(--secondary-color);
  color: var(--text-light);
  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: 250px; /* Ensure columns don't get too narrow */
}
.footer-col h3 {
  color: var(--primary-color);
  font-size: 18px;
  margin-bottom: 15px;
  text-transform: uppercase;
}
.footer-col p {
  line-height: 1.6;
  margin-bottom: 15px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col ul li {
  margin-bottom: 10px;
}
.footer-col ul li a {
  color: var(--text-light);
  transition: color 0.3s ease;
}
.footer-col ul li a:hover {
  color: var(--primary-color);
}

.footer-logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
  display: inline-block; /* Allow margin-bottom */
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 215, 0, 0.2); /* Light gold border */
  color: rgba(255, 255, 255, 0.7); /* Slightly muted white */
}

/* Mobile Styles */
@media (max-width: 768px) {
  body {
    padding-top: var(--header-offset); /* Mobile offset */
    overflow-x: hidden;
  }
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }

  .header-top {
    height: 60px; /* Maintain height */
    padding: 0; /* Remove padding to make hamburger/logo fill space */
  }

  .header-container {
    padding: 0 15px; /* Smaller padding for mobile */
    justify-content: space-between; /* Space out hamburger and logo */
    position: relative; /* For absolute positioning of logo if needed */
    width: 100%; /* Occupy full width */
    max-width: none; /* Crucial: no max-width on mobile containers */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1; /* Left side */
    margin-right: auto; /* Push logo to center */
  }
  .desktop-nav-buttons {
    display: none; /* Hide desktop buttons on mobile */
  }

  .logo {
    flex: 1 !important; /* Allow logo to take available space */
    display: flex !important; /* Use flex for centering */
    justify-content: center !important; /* Center the logo */
    align-items: center !important;
    order: 2; /* Center position */
    font-size: 24px; /* Smaller font size for mobile logo */
    max-width: calc(100% - 80px); /* Adjust max-width to not overlap hamburger/empty space */
  }
  /* If logo is an image, use this: */
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

  /* Placeholder for potential right-side element to balance hamburger */
  .header-container::after {
    content: "";
    width: 30px; /* Match hamburger width for visual balance */
    order: 3;
  }

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Padding around buttons */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: #222; /* Background for button bar */
    height: 50px; /* Fixed height for mobile buttons to calculate offset */
  }
  .mobile-nav-buttons .btn {
    flex: 1; min-width: 0;
    max-width: calc(50% - 5px); /* Ensure two buttons fit with gap */
    box-sizing: border-box;
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header + mobile buttons */
    left: 0;
    width: 280px; /* Sidebar width */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background-color: var(--secondary-color); /* Dark background for menu */
    flex-direction: column; /* Vertical links */
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Allow scrolling for many links */
    align-items: flex-start; /* Align links to left */
  }
  .main-nav.active {
    display: flex; /* Show when active */
    transform: translateX(0); /* Slide in */
  }

  .nav-container {
    flex-direction: column; /* Vertical links */
    padding: 0; /* Remove horizontal padding */
    width: 100%; /* Take full width of sidebar */
    align-items: flex-start;
    max-width: none; /* Crucial: no max-width on mobile containers */
  }

  .nav-link {
    width: 100%;
    padding: 12px 20px; /* Increase padding for touch targets */
    justify-content: flex-start; /* Align text to left */
    font-size: 16px;
  }
  .nav-link:hover {
    background-color: #333;
  }

  .footer-container {
    flex-direction: column;
    gap: 20px;
    padding: 0 15px;
  }
  .footer-col {
    min-width: unset; /* Remove min-width for mobile */
    width: 100%;
  }
  .footer-col h3 {
    font-size: 16px;
  }
}
/* 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;
  }
}
