:root {
  --primary-color: #FFD700;
  --secondary-color: #8B0000;
  --dark-background: #1a1a1a;
  --text-on-dark: #FFD700;
  --text-on-light: #8B0000;
  --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) */
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f4f4f4;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

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

.header-top {
  background-color: var(--dark-background); /* Dark background for top section */
  padding: 15px 0;
  min-height: 60px;
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 2.2em;
  font-weight: bold;
  color: var(--text-on-dark);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block; /* Ensure logo is block-level for consistent styling */
}

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

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

.btn-login {
  background-color: var(--secondary-color); /* Burgundy red for Login */
  color: var(--text-on-dark);
}

.btn-login:hover {
  background-color: darken(var(--secondary-color), 10%);
}

.btn-register {
  background-color: var(--primary-color); /* Gold for Register */
  color: var(--dark-background);
}

.btn-register:hover {
  background-color: darken(var(--primary-color), 10%);
}

.main-nav {
  background-color: var(--primary-color); /* Gold background for navigation */
  padding: 10px 0;
  min-height: 50px;
  display: flex; /* Desktop: visible and flex */
  flex-direction: row; /* Desktop: horizontal */
  justify-content: center;
  align-items: center;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 30px;
  padding: 0 20px;
  width: 100%;
}

.nav-link {
  color: var(--text-on-light);
  text-decoration: none;
  font-weight: bold;
  font-size: 1.0em;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

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

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001; /* Above mobile-nav-buttons */
}

.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-on-dark);
  margin-bottom: 5px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.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-nav-buttons {
  display: none; /* Hidden on desktop */
}

.mobile-menu-overlay {
  display: none;
}

/* Footer styles */
.site-footer {
  background-color: var(--dark-background);
  color: #ccc;
  padding: 40px 20px 20px;
  font-size: 0.9em;
}

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

.footer-column {
  flex: 1;
  min-width: 200px;
}

.footer-column h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 1.2em;
}

.footer-column p {
  color: #aaa;
  line-height: 1.8;
}

.footer-nav {
  list-style: none;
}

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

.footer-nav a {
  color: #aaa;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 20px;
  text-align: center;
  color: #777;
}

/* Mobile styles */
@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  }

  .header-top {
    padding: 10px 0;
    min-height: 60px;
  }

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Mobile container fills width */
    justify-content: space-between;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 1.8em;
    margin: 0;
    padding: 0;
  }

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

  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    order: -1; /* Move to the left */
    margin-right: auto; /* Push logo to center */
    padding: 0;
    width: 40px; /* Adjust size for better touch target */
    height: 40px;
  }

  .mobile-nav-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: var(--secondary-color); /* Burgundy red for mobile buttons */
    width: 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 999; /* Below hamburger menu, above content */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    text-align: center;
    font-size: 0.9em;
  }

  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Below the fixed header + mobile buttons */
    left: 0;
    width: 80%; /* Menu width */
    height: calc(100% - var(--header-offset));
    background-color: var(--dark-background); /* Dark background for mobile menu */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px;
    transform: translateX(-100%); /* Off-screen to the left */
    transition: transform 0.3s ease-out;
    overflow-y: auto;
    z-index: 1000;
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding: 0;
    width: 100%;
    max-width: none; /* Mobile container fills width */
  }

  .nav-link {
    color: var(--text-on-dark);
    font-size: 1.1em;
    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 {
    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;
    transition: opacity 0.3s ease-out;
    opacity: 0;
  }

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

  .site-footer {
    padding: 30px 15px 15px;
  }

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

  .footer-column {
    min-width: unset;
    width: 100%;
    text-align: center;
  }

  .footer-column h3 {
    margin-bottom: 10px;
  }

  .footer-nav {
    padding: 0;
  }

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

  .footer-nav a {
    display: block;
  }

  .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;
  }
}
