:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #1A2B3C; /* Dark Blue */
  --text-color-light: #F0F0F0;
  --text-color-dark: #1A2B3C;
  --header-top-bg: var(--secondary-color); /* Dark Blue */
  --main-nav-bg: #2C3E50; /* Slightly lighter dark blue/grey for contrast */
  --button-bg-primary: var(--primary-color);
  --button-text-primary: var(--text-color-dark);
  --button-bg-secondary: #4A6572; /* A shade of grey-blue for secondary button */
  --button-text-secondary: var(--text-color-light);

  /* Desktop header offset */
  --header-offset: 110px; /* header-top (60px) + main-nav (50px) */
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  line-height: 1.6;
  color: var(--text-color-light);
  background-color: #0D1923; /* Very dark background for the page body */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* General Link Styling */
a {
  text-decoration: none;
  color: var(--primary-color);
}

a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* 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(--header-top-bg); /* Default background, will be covered by header-top/main-nav */
  box-sizing: border-box;
  overflow-x: hidden; /* Prevent horizontal scroll on header itself */
}

.header-top {
  background-color: var(--header-top-bg);
  padding: 10px 0;
  min-height: 60px; /* Estimated height */
  display: flex; /* For vertical centering of content */
  align-items: center; /* For vertical centering of content */
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px; /* Padding for desktop logo/buttons */
  width: 100%; /* Ensure container takes full width up to max-width */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block; /* Ensure it's a block-level element for styling */
  padding: 5px 0; /* Vertical padding */
}

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

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

.btn-primary {
  background-color: var(--button-bg-primary);
  color: var(--button-text-primary);
  border: none;
}

.btn-primary:hover {
  background-color: #E6C200; /* Slightly darker gold */
  color: var(--button-text-primary);
  transform: translateY(-2px);
  text-decoration: none;
}

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

.btn-secondary:hover {
  background-color: #5A7B87; /* Slightly darker grey-blue */
  color: var(--button-text-light);
  transform: translateY(-2px);
  text-decoration: none;
}

.main-nav {
  background-color: var(--main-nav-bg);
  padding: 10px 0;
  display: flex; /* Desktop default: flex */
  flex-direction: row; /* Desktop default: row */
  justify-content: center; /* Center nav links */
  align-items: center;
  min-height: 50px; /* Estimated height */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center; /* Center nav links */
  align-items: center;
  padding: 0 20px;
  width: 100%;
  flex-wrap: wrap; /* Allow wrapping on smaller desktop screens */
  gap: 15px; /* Spacing between nav links */
}

.nav-link {
  color: var(--text-color-light);
  font-weight: bold;
  padding: 5px 10px;
  transition: color 0.3s ease, background-color 0.3s ease;
  border-radius: 3px;
  white-space: nowrap; /* Prevent nav links from wrapping prematurely */
  font-size: 15px;
}

.nav-link:hover {
  color: var(--primary-color);
  background-color: rgba(255, 215, 0, 0.1); /* Subtle highlight */
  text-decoration: none;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  padding: 5px;
  box-sizing: content-box;
  z-index: 1001; /* Ensure it's above other elements */
}

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

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

.mobile-menu-overlay {
  display: none; /* Hidden on desktop */
}

/* Footer */
.site-footer {
  background-color: var(--secondary-color);
  color: var(--text-color-light);
  padding: 40px 20px 20px;
  text-align: center;
  font-size: 14px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 30px;
  text-align: left;
  padding-bottom: 30px;
}

.footer-column {
  flex: 1;
  min-width: 250px;
  max-width: 300px;
}

.footer-column h3 {
  color: var(--primary-color);
  font-size: 18px;
  margin-bottom: 15px;
  border-bottom: 2px solid rgba(255, 215, 0, 0.3);
  padding-bottom: 5px;
}

.footer-column p {
  font-size: 14px;
  line-height: 1.8;
}

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

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

.footer-nav a {
  color: var(--text-color-light);
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 215, 0, 0.1);
  padding-top: 20px;
  margin-top: 20px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

/* Mobile Styles */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

  .site-header {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  }

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Crucial: no max-width on mobile containers */
    justify-content: space-between;
  }

  .hamburger-menu {
    display: flex;
    order: 0;
  }

  .hamburger-menu.active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
  }
  .hamburger-menu.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu.active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important; /* Center the logo */
    align-items: center !important;
    font-size: 24px;
    order: 1;
  }

  .desktop-nav-buttons {
    display: none;
  }

  .mobile-nav-buttons {
    display: flex !important;
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--header-top-bg);
    justify-content: center;
  }

  .mobile-nav-buttons .btn {
    flex: 1; min-width: 0;
    max-width: calc(50% - 5px);
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below header and mobile buttons */
    left: 0;
    width: 80%; /* Sidebar width */
    max-width: 300px; /* Max width for sidebar */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--main-nav-bg); /* Sidebar background */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    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-in-out;
    overflow-y: auto;
  }

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

  .nav-container {
    flex-direction: column;
    padding: 0;
    width: 100%;
    max-width: none;
    gap: 0;
  }

  .nav-link {
    width: 100%;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.05);
    text-align: left;
  }

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

  .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

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

  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-column {
    min-width: unset;
    max-width: 90%;
  }

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

  .footer-nav {
    text-align: center;
  }
}

/* Utility to prevent body scroll */
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;
  }
}
