:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #1A1A1A; /* Dark Grey/Black */
  --text-light: #FFFFFF;
  --text-dark: #1A1A1A;

  /* Header offsets - Calculated based on estimated heights */
  --header-top-height-desktop: 60px;
  --main-nav-height-desktop: 50px;
  --mobile-nav-buttons-height: 50px; /* Includes padding */
  --header-offset: calc(var(--header-top-height-desktop) + var(--main-nav-height-desktop)); /* Desktop */
}

@media (max-width: 768px) {
  :root {
    --header-offset: calc(var(--header-top-height-desktop) + var(--mobile-nav-buttons-height)); /* Mobile */
  }
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  margin: 0;
  padding-top: var(--header-offset); /* Apply header offset */
  overflow-x: hidden; /* Prevent body overflow on mobile */
}

body.no-scroll {
  overflow: hidden;
}

/* Base Container Styling */
.header-container, .nav-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap; /* Prevent text wrapping on desktop */
  font-size: 15px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--text-dark);
  border: 1px solid var(--primary-color);
}

.btn-primary:hover {
  background-color: #E6C200; /* A slightly darker gold */
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: #333333; /* Slightly lighter dark */
  color: var(--primary-color);
}

/* Header Styling (Desktop First) */
.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: transparent; /* Base for fixed header */
}

.header-top {
  background-color: var(--secondary-color); /* Dark background */
  min-height: var(--header-top-height-desktop);
  display: flex;
  align-items: center;
  padding: 10px 0; /* Vertical padding */
}

.header-top .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%; /* Ensure flex items span container */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color); /* Gold logo */
  text-decoration: none;
  padding: 5px 0; /* Ensures some vertical space */
  display: block; /* For text logo */
  line-height: 1;
}

.desktop-nav-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.main-nav {
  background-color: #222222; /* Slightly lighter dark than header-top, distinct */
  min-height: var(--main-nav-height-desktop);
  display: flex; /* Desktop: visible, row */
  align-items: center;
  padding: 10px 0; /* Vertical padding */
}

.main-nav .nav-container {
  display: flex;
  flex-direction: row; /* Desktop: horizontal */
  justify-content: center; /* Center align menu items */
  align-items: center;
  flex-wrap: wrap; /* Allow wrapping if many items */
  gap: 20px;
}

.main-nav .nav-link {
  color: var(--text-light); /* White text for menu items */
  text-decoration: none;
  font-weight: bold;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevent menu items from wrapping */
  font-size: 16px;
}

.main-nav .nav-link:hover {
  color: var(--primary-color); /* Gold on hover */
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 20px;
  position: relative;
  cursor: pointer;
  z-index: 1002; /* Above logo on mobile */
  margin-right: 15px; /* Space between hamburger and logo */
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--primary-color);
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 8px; }
.hamburger-menu span:nth-child(3) { top: 16px; }

.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 (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;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

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

/* Footer Styling */
.site-footer {
  background-color: var(--secondary-color);
  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: 200px;
}

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

.footer-col p {
  color: var(--text-light);
}

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

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

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

.footer-nav 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);
}

.footer-bottom p {
  margin: 0;
  color: var(--text-light);
}

/* Mobile Specific Styles */
@media (max-width: 768px) {
  /* Prevent content overflow on mobile */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

  .header-top {
    min-height: var(--header-top-height-desktop); /* Keep consistent height */
    padding: 10px 0;
  }

  .header-top .header-container {
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
    max-width: none; /* Crucial for mobile container */
    justify-content: space-between; /* To push hamburger left and allow logo to center */
    position: relative; /* For absolute logo centering if needed */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1; /* Place hamburger first */
  }

  .logo {
    order: 2; /* Place logo second */
    flex: 1; /* Allow logo to take available space */
    text-align: center; /* Center text logo */
    font-size: 24px; /* Adjust logo size for mobile */
    padding: 0;
    position: absolute; /* For robust centering */
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 80px); /* Account for hamburger width + margin */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Vertical padding + horizontal container padding */
    overflow: hidden; /* Prevent overflow */
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay in one row */
    background-color: #333333; /* Distinct background for mobile buttons */
    min-height: var(--mobile-nav-buttons-height); /* Set min-height */
    align-items: center;
    justify-content: center;
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    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 word wrapping */
    overflow-wrap: break-word;
    text-align: center;
  }

  .main-nav {
    display: none; /* Hide main nav by default on mobile */
    position: fixed;
    top: 0; /* Will be adjusted by JS to be below header-offset */
    left: 0;
    width: 70%; /* Slide-in menu width */
    height: 100%;
    background-color: var(--secondary-color); /* Dark background for mobile menu */
    flex-direction: column; /* Vertical menu */
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: var(--header-offset); /* Push menu content below fixed header */
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    z-index: 1001; /* Above overlay */
    overflow-y: auto; /* Allow scrolling for long menus */
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px; /* Adjust padding for vertical menu */
    width: 100%;
    max-width: none; /* Crucial for mobile container */
    gap: 15px; /* Vertical gap between menu items */
  }

  .main-nav .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: normal; /* Allow menu link text to wrap if long */
  }
  .main-nav .nav-link:last-child {
      border-bottom: none;
  }

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

  .footer-col {
    min-width: unset;
  }
}
/* 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;
  }
}
