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

body {
  margin: 0;
  font-family: Arial, sans-serif;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  color: #fff; /* Default text color for better contrast on dark backgrounds */
  background-color: #1a1a2e; /* A complementary dark background */
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}

.header-top {
  background-color: #0A1931; /* Main color */
  padding: 15px 0;
  min-height: 30px;
  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 {
  color: #FFD700; /* Accent color */
  text-decoration: none;
  font-size: 28px;
  font-weight: bold;
  letter-spacing: 1.5px;
  transition: color 0.3s ease;
}

.logo:hover {
  color: #FFF;
}

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

.btn {
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-login {
  background-color: #FFD700; /* Gold */
  color: #0A1931; /* Dark Blue */
  border: 1px solid #FFD700;
}

.btn-login:hover {
  background-color: #0A1931;
  color: #FFD700;
}

.btn-register {
  background-color: #E74C3C; /* Vibrant Red */
  color: #FFFFFF; /* White */
  border: 1px solid #E74C3C;
}

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

.main-nav {
  background-color: #FFD700; /* Accent color, contrasting with header-top */
  padding: 10px 0;
  min-height: 30px;
  display: flex; /* Desktop default: flex */
  justify-content: center;
  align-items: center;
}

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

.nav-link {
  color: #0A1931; /* Dark Blue */
  text-decoration: none;
  font-weight: bold;
  padding: 5px 0;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #FFFFFF; /* White on hover */
}

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

.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #FFD700; /* Gold */
  margin: 5px 0;
  transition: all 0.3s ease;
}

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

.mobile-menu-overlay {
  display: none; /* Hidden by default */
}

/* Footer Styles */
.site-footer {
  background-color: #0A1931; /* Main color */
  color: #FFFFFF;
  padding: 40px 20px;
  font-size: 14px;
  line-height: 1.6;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col {
  flex: 1;
  min-width: 180px;
}

.footer-col h3 {
  color: #FFD700; /* Accent color */
  font-size: 18px;
  margin-bottom: 15px;
  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;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 20px;
  color: #AAAAAA;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
  }

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Ensure full width on mobile */
  }

  .hamburger-menu {
    display: block;
    order: 0; /* Place hamburger menu first */
  }

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

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

  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0; /* Will be adjusted by JS to be below header-top + mobile-nav-buttons */
    left: 0;
    width: 70%; /* Side menu width */
    height: 100%;
    background-color: #0A1931; /* Dark Blue */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    padding-top: var(--header-offset); /* Ensure menu content starts below header */
    box-shadow: 2px 0 10px rgba(0,0,0,0.5);
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0;
    width: 100%;
    max-width: none; /* Ensure full width on mobile */
  }

  .nav-link {
    width: 100%;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #FFD700; /* Gold links on dark background */
    text-align: left;
  }

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

  .mobile-nav-buttons {
    display: flex; /* Visible on mobile */
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: #0A1931; /* Dark Blue, same as header-top */
    width: 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }

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

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

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

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

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

  .footer-col ul {
    padding-top: 10px;
  }

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