:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #8B0000; /* Dark Red */
  --dark-bg: #222222; /* Dark Gray for header-top */
  --text-light: #FFFFFF;
  --text-dark: #333333;
  --header-offset: 110px; /* Desktop: header-top (70px) + main-nav (40px) */
}

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

/* General styles */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-dark);
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  overflow-x: hidden; /* Prevent horizontal scroll on body */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.no-scroll {
  overflow: hidden;
}

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

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

.header-container, .nav-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

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

.header-top {
  background-color: var(--dark-bg);
  padding: 15px 0; /* Total height ~70px with content */
  display: flex;
  align-items: center;
}

.header-top .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap; /* Prevent wrapping on desktop */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-block; /* Ensure visibility */
  padding: 5px 0;
}

.desktop-nav-buttons {
  display: flex;
  gap: 12px;
  margin-left: auto; /* Push buttons to the right */
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: none; /* Remove default button border */
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  box-shadow: 0 4px 8px rgba(255, 215, 0, 0.3);
}

.btn-primary:hover {
  background-color: #e6b800; /* Slightly darker gold */
  box-shadow: 0 6px 12px rgba(255, 215, 0, 0.4);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  box-shadow: 0 4px 8px rgba(139, 0, 0, 0.3);
}

.btn-secondary:hover {
  background-color: #6a0000; /* Slightly darker red */
  box-shadow: 0 6px 12px rgba(139, 0, 0, 0.4);
}

/* Main Navigation (Desktop First) */
.main-nav {
  background-color: var(--secondary-color);
  padding: 10px 0; /* Total height ~40px with content */
  display: flex; /* Desktop default: flex */
  flex-direction: row; /* Desktop default: row */
  justify-content: center;
  align-items: center;
  width: 100%;
}

.main-nav .nav-container {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping if many items, but ideally one line */
  justify-content: center;
  gap: 25px;
}

.nav-link {
  color: var(--text-light);
  font-weight: bold;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
  text-transform: uppercase;
  font-size: 15px;
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-link:hover::after {
  transform: scaleX(1);
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001; /* Above other elements */
  width: 45px; /* Fixed width for consistent spacing */
  height: 45px; /* Fixed height */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hamburger-menu span {
  display: block;
  width: 28px;
  height: 3px;
  background-color: var(--primary-color);
  margin-bottom: 5px;
  transition: all 0.3s ease;
  border-radius: 2px;
}

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

/* Mobile Nav Buttons (Hidden on Desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop, shown on mobile */
}

/* Mobile Menu Overlay (Hidden on Desktop) */
.mobile-menu-overlay {
  display: none; /* Hidden on desktop */
}

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

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}

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

.footer-col h3 {
  color: var(--primary-color);
  font-size: 18px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

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

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

.footer-col ul li a {
  color: #ccc;
  transition: color 0.3s ease;
}

.footer-col ul li a:hover {
  color: var(--primary-color);
}

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

/* Mobile Specific Styles */
@media (max-width: 768px) {
  .header-container, .nav-container, .footer-container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: none; /* Crucial for mobile to take full width */
    width: 100%; /* Ensure full width */
  }
  
  .header-top .header-container {
    justify-content: space-between;
    flex-wrap: nowrap;
    position: relative; /* For logo centering */
  }

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

  .hamburger-menu {
    display: flex; /* Show hamburger menu */
    order: 0; /* Place to the left */
    margin-right: auto; /* Push logo to center */
  }

  .logo {
    flex: 1; /* Allow logo to take available space */
    display: flex; /* Use flex to center text */
    justify-content: center; /* Center horizontally */
    align-items: center;
    order: 1; /* Place in the middle */
    font-size: 24px;
    padding: 0; /* Adjust padding for mobile */
    position: absolute; /* Absolute positioning for precise centering */
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Ensure logo doesn't overlap hamburger */
  }

  /* Specific mobile button section */
  .mobile-nav-buttons {
    display: flex !important; /* Always visible on mobile */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Padding for the container */
    overflow: hidden; /* Prevent overflow */
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay on one line */
    background-color: var(--dark-bg); /* Match header-top background */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    position: relative; /* For z-index stacking */
    z-index: 990; /* Below hamburger menu, above content */
    justify-content: center;
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0; /* Allow shrinking */
    max-width: calc(50% - 5px); /* Account for gap */
    box-sizing: border-box;
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    overflow-wrap: break-word; /* For better word breaking */
  }

  /* Main Navigation (Mobile) */
  .main-nav {
    display: none; /* Default hidden */
    flex-direction: column; /* Vertical layout */
    position: fixed; /* Fixed position for sidebar menu */
    top: var(--header-offset); /* Start below header */
    left: 0;
    width: 70%; /* Sidebar width */
    max-width: 300px; /* Limit sidebar width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--secondary-color); /* Same as desktop nav, or a lighter tone */
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease-out;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    overflow-y: auto; /* Scrollable if menu is long */
    z-index: 999; /* Below hamburger, above overlay */
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start; /* Align links to the left */
    gap: 0; /* Remove gap for vertical list */
    padding: 20px 15px;
  }

  .nav-link {
    width: 100%;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
  }
  
  .nav-link:last-child {
    border-bottom: none;
  }

  .nav-link::after {
    display: none; /* Hide underline animation on mobile */
  }

  /* Hamburger Menu Active State */
  .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 */
  .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: 998; /* Below menu, above content */
  }

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

  /* Footer */
  .footer-container {
    flex-direction: column;
    gap: 20px;
  }

  .footer-col {
    min-width: unset; /* Remove min-width for mobile */
    flex: none; /* Remove flex sizing */
    width: 100%;
  }

  /* Mobile content overflow prevention */
  .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;
  }
}
