:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #8B0000; /* Burgundy Red */
  --black-color: #000000;
  --white-color: #FFFFFF;

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

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

body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: var(--white-color); /* Default text color for body, will be overridden for specific sections */
  background-color: #1a1a1a; /* Dark background for the page content */
  padding-top: var(--header-offset); /* Apply header offset to body */
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

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

/* Fixed 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(--black-color); /* Fallback, should be overridden by header-top/main-nav */
}

/* Header Top Area (Desktop default) */
.header-top {
  background-color: var(--black-color); /* Dark background */
  padding: 10px 0;
  height: 60px; /* Desktop height */
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

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

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

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  padding: 0;
  z-index: 1001; /* Above other header elements */
}

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

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex; /* Visible on desktop */
  gap: 10px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap; /* Prevent buttons from wrapping text on desktop */
  text-decoration: none; /* Remove underline for buttons */
}

.btn-register {
  background-color: var(--primary-color); /* Gold background */
  color: var(--black-color); /* Black text */
  border: 1px solid var(--primary-color);
}

.btn-register:hover {
  background-color: var(--white-color);
  color: var(--secondary-color);
}

.btn-login {
  background-color: var(--secondary-color); /* Burgundy Red background */
  color: var(--white-color); /* White text */
  border: 1px solid var(--secondary-color);
}

.btn-login:hover {
  background-color: var(--primary-color);
  color: var(--black-color);
}

/* Main Navigation Area (Desktop default) */
.main-nav {
  background-color: var(--secondary-color); /* Burgundy Red background */
  padding: 10px 0;
  height: 50px; /* Desktop height */
  box-sizing: border-box;
  display: flex; /* Visible on desktop */
  flex-direction: row;
  justify-content: center; /* Center menu items */
  align-items: center;
  position: static; /* Default desktop position */
  transition: transform 0.3s ease; /* For mobile slide effect */
}

.main-nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px; /* Spacing between nav links */
  padding: 0 20px;
}

.nav-link {
  color: var(--white-color);
  font-size: 16px;
  font-weight: bold;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevent nav links from wrapping */
}

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

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

/* Mobile Menu Overlay (Hidden by default) */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999; /* Below main-nav but above content */
}

/* Footer Styles */
.site-footer {
  background-color: var(--black-color); /* Black footer background */
  color: var(--white-color);
  padding: 40px 20px 20px;
  font-size: 14px;
}

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

.site-footer .footer-section {
  flex: 1;
  min-width: 250px;
  margin-bottom: 20px;
}

.site-footer .footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color); /* Gold color for footer logo */
  margin-bottom: 15px;
  text-transform: uppercase;
}

.site-footer h4 {
  color: var(--primary-color); /* Gold color for section titles */
  font-size: 18px;
  margin-bottom: 15px;
}

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

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

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

.site-footer .footer-nav a {
  color: #ccc;
  transition: color 0.3s ease;
}

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

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

/* Mobile Styles */
@media (max-width: 768px) {
  .site-header {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  }

  .header-top {
    height: 55px; /* Mobile height */
    padding: 0 15px; /* Smaller padding */
  }

  .header-container {
    padding: 0; /* No horizontal padding, handled by header-top */
    width: 100%;
    max-width: none; /* Crucial for mobile container width */
    position: relative; /* For logo centering */
  }

  .hamburger-menu {
    display: flex; /* Visible on mobile */
    order: 0; /* Place to the left */
    margin-right: auto; /* Push logo to center */
    z-index: 1001;
  }

  .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 {
    font-size: 24px;
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-left: -30px; /* Offset hamburger menu width for visual centering */
  }

  .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; /* Padding for the button row */
    overflow: hidden; /* Prevent horizontal overflow */
    gap: 10px; /* Spacing between buttons */
    flex-wrap: nowrap; /* Ensure buttons stay in one row */
    background-color: var(--black-color); /* Match header-top background */
    height: 55px; /* Mobile height */
    align-items: center;
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Max width for two buttons with 10px gap */
    box-sizing: border-box;
    padding: 8px 12px; /* Smaller padding for mobile buttons */
    font-size: 13px; /* Smaller font size */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Ensure long words break */
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 280px; /* Sidebar width */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background-color: var(--secondary-color); /* Match desktop main-nav background */
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0;
    transform: translateX(-100%); /* Start off-screen to the left */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
  }

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

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

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

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

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

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

  .site-footer .footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .site-footer .footer-nav li {
    margin-bottom: 0;
  }

  .site-footer .footer-bottom {
    padding-top: 15px;
  }

  /* 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;
  }
}

/* Prevent body scroll when mobile menu is open */
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;
  }
}
