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

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
}

body.no-scroll {
  overflow: hidden;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #1a1a1a; /* Dark grey/black for header top */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.header-top {
  min-height: 60px; /* Base height for header-top */
  display: flex;
  align-items: center;
  padding: 0 20px; /* Padding for the header-top */
}

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

.logo {
  color: #FFD700; /* Gold */
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  padding: 10px 0;
  display: block;
}

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

.btn {
  padding: 10px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  border: none;
}

.btn-register {
  background-color: #FFD700; /* Gold */
  color: #1a1a1a; /* Dark text on gold */
}

.btn-register:hover {
  background-color: #e6c200;
}

.btn-login {
  background-color: #8B0000; /* Dark Red */
  color: #FFFFFF; /* White text on red */
}

.btn-login:hover {
  background-color: #7a0000;
}

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  padding: 5px;
  box-sizing: content-box;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFD700; /* Gold */
  border-radius: 2px;
  transition: all 0.3s ease;
}

.header-balance-placeholder {
  display: none; /* Hidden by default on desktop */
}

.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
}

.main-nav {
  background-color: #FFD700; /* Gold for main nav */
  min-height: 50px; /* Base height for main-nav */
  display: flex; /* Default to flex for desktop */
  align-items: center;
  padding: 0 20px; /* Padding for the main-nav */
}

.nav-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center; /* Center nav links on desktop */
  gap: 25px;
}

.nav-link {
  color: #1a1a1a; /* Dark text on gold */
  text-decoration: none;
  font-weight: bold;
  padding: 10px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: #8B0000; /* Dark Red on hover */
}

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

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

/* Footer */
.site-footer {
  background-color: #1a1a1a; /* Dark grey/black */
  color: #cccccc;
  padding: 40px 20px;
}

.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-logo {
  color: #FFD700; /* Gold */
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-info p {
  font-size: 14px;
  line-height: 1.8;
  margin: 0;
}

.footer-col h3 {
  color: #FFD700; /* Gold */
  font-size: 18px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

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

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

.footer-col ul li a {
  color: #cccccc;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-col ul li a:hover {
  color: #FFD700; /* Gold on hover */
}

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

  .header-top {
    padding: 0 15px;
  }

  .header-container {
    max-width: none; /* No max-width on mobile */
    padding: 0;
    justify-content: space-between;
  }

  .hamburger-menu {
    display: flex;
    width: 40px;
    height: 30px;
    align-items: center;
    justify-content: center;
    z-index: 1001;
  }

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

  .logo {
    flex: 1;
    text-align: center;
    font-size: 24px;
  }

  .header-balance-placeholder {
    display: block;
    width: 40px; /* To balance hamburger menu */
    height: 30px;
  }

  .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: #2a2a2a; /* Slightly lighter dark for buttons bar */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 999; /* Below hamburger, above content */
    min-height: 50px; /* Ensure it has height */
    align-items: 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;
  }

  /* Mobile Main Nav (Hamburger Menu Content) */
  .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;
    height: calc(100% - var(--header-offset));
    background-color: #1a1a1a; /* Dark background for mobile menu */
    flex-direction: column;
    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;
    overflow-y: auto;
    z-index: 999;
  }

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

  .nav-container {
    flex-direction: column;
    padding: 0 15px;
    max-width: none;
    align-items: flex-start; /* Align links to the left */
  }

  .nav-link {
    width: 100%;
    padding: 12px 0;
    color: #FFFFFF; /* White text on dark background */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  .nav-link:hover {
    color: #FFD700; /* Gold on hover */
  }

  /* Mobile Footer */
  .footer-container {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

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

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

  .footer-info p {
    font-size: 13px;
  }

  /* Ensure images in content don't overflow */
  .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;
  }
}
/* 内容保护（系统追加，请勿删除） */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}
