:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #8B0000; /* Dark Red */
  --text-light: #FFFFFF;
  --text-dark: #1A1A1A;
  --bg-dark-1: #1A1A1A; /* Very dark grey for header-top and footer */
  --bg-dark-2: #2C2C2C; /* Slightly lighter dark grey for main-nav */
  --header-offset: 110px; /* Desktop */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 120px; /* Mobile */
  }
}

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  background-color: #0d0d0d; /* Dark background for the page body */
  color: var(--text-light);
  line-height: 1.6;
}

/* --- Shared CSS for Header --- */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--bg-dark-1); /* Base background for entire header */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  min-height: var(--header-offset); /* Ensure header has enough height */
  display: flex;
  flex-direction: column; /* Stack header elements for overall structure */
}

.header-top {
  background-color: var(--bg-dark-1); /* Distinct background for top bar */
  padding: 10px 0; /* Vertical padding */
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px; /* Horizontal padding for desktop */
}

.logo {
  font-size: 2em;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  text-transform: uppercase;
  padding: 5px 0;
  white-space: nowrap;
}

.desktop-nav-buttons {
  display: flex; /* Display for desktop */
  gap: 10px;
}

.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, box-shadow 0.3s ease;
  white-space: nowrap; /* Prevent buttons from wrapping */
  cursor: pointer;
}

.btn-login {
  background-color: var(--primary-color);
  color: var(--text-dark);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.btn-login:hover {
  background-color: #e6c200; /* Darken gold on hover */
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
}

.btn-register {
  background-color: var(--secondary-color);
  color: var(--text-light);
  border: 1px solid var(--primary-color); /* Gold border for contrast */
  box-shadow: 0 0 10px rgba(139, 0, 0, 0.5);
}

.btn-register:hover {
  background-color: #7a0000; /* Darken red on hover */
  box-shadow: 0 0 15px rgba(139, 0, 0, 0.7);
}

.main-nav {
  background-color: var(--bg-dark-2); /* Distinct background for navigation */
  padding: 10px 0;
  display: flex; /* Desktop: visible, row layout */
  flex-direction: row;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center; /* Center nav links on desktop */
  align-items: center;
  padding: 0 20px; /* Horizontal padding for desktop */
  flex-wrap: wrap;
  gap: 20px;
}

.nav-link {
  color: var(--text-light);
  text-decoration: none;
  font-weight: bold;
  padding: 5px 10px;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

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

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

.hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 5px 0;
  transition: all 0.3s ease;
}

.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.mobile-nav-buttons {
  display: none; /* 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: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* --- Mobile Specific Styles --- */
@media (max-width: 768px) {
  .site-header {
    min-height: var(--header-offset); /* Ensure header has enough height */
  }

  .header-container {
    padding: 0 15px;
    justify-content: space-between;
  }

  .logo {
    flex: 1;
    text-align: center;
    font-size: 1.8em;
    padding: 0;
  }

  .logo img { /* If logo was an img */
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
    margin: 0 auto;
  }

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

  .hamburger-menu {
    display: block;
    order: -1;
    color: var(--primary-color);
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below the header (top + mobile buttons) */
    left: 0;
    width: 80%;\    max-width: 300px;
    height: calc(100% - var(--header-offset));
    background-color: var(--bg-dark-1);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 999;
  }

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

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

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

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

  .mobile-nav-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: var(--bg-dark-1);
    width: 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 990;
  }

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

/* --- Shared CSS for Footer --- */
.site-footer {
  background-color: var(--bg-dark-1);
  color: var(--text-light);
  padding: 40px 20px 20px;
  margin-top: 50px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  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: 1.2em;
  margin-bottom: 15px;
}

.footer-col p {
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.7);
}

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

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

.footer-col ul li a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 0.9em;
}

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

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8em;
  color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 15px; /* Smaller padding for mobile */
  }
  .footer-col {
    width: 100%;
    min-width: unset;
  }
  .footer-col ul {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

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