:root {
  --primary-color: #FFD700;
  --secondary-color: #8B0000;
  --text-dark: #333;
  --text-light: #fff;
  --header-offset: 120px; /* Desktop: header-top (70px) + main-nav (50px) */
}

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

body {
  padding-top: var(--header-offset);
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  overflow-x: hidden;
}

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  background-color: var(--secondary-color); /* Fallback for transparency */
  display: flex;
  flex-direction: column; /* Default for mobile, overridden for desktop */
}

.header-top {
  background-color: var(--secondary-color); /* Dark Red */
  color: var(--text-light);
  width: 100%;
  min-height: 70px; /* Desktop height */
  display: flex;
  align-items: center;
  padding: 10px 0; /* Adjust padding to fit content and min-height */
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color); /* Gold */
  text-decoration: none;
  display: block;
  white-space: nowrap;
}

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

.btn {
  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;
  font-size: 14px;
  border: none;
  cursor: pointer;
}

.btn-login {
  background-color: var(--primary-color); /* Gold */
  color: var(--secondary-color); /* Dark Red */
}

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

.btn-register {
  background-color: var(--text-light); /* White */
  color: var(--secondary-color); /* Dark Red */
}

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

.main-nav {
  background-color: var(--primary-color); /* Gold */
  width: 100%;
  min-height: 50px; /* Desktop height */
  display: flex; /* Visible on desktop */
  align-items: center;
  padding: 5px 0; /* Adjust padding to fit content and min-height */
}

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

.nav-link {
  color: var(--text-dark); /* Dark text on gold */
  text-decoration: none;
  font-weight: bold;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
  font-size: 15px;
}

.nav-link:hover {
  color: var(--secondary-color); /* Dark Red on hover */
}

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

/* Footer styles */
.site-footer {
  background-color: var(--secondary-color); /* Dark Red */
  color: var(--text-light);
  padding: 40px 20px 20px;
  font-size: 14px;
}

.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: 16px;
  margin-top: 0;
  margin-bottom: 15px;
}

.footer-col p {
  margin: 0;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color); /* Gold */
  text-decoration: none;
  margin-bottom: 15px;
  display: inline-block;
}

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

.footer-nav a {
  color: var(--text-light);
  text-decoration: none;
  line-height: 1.8;
  transition: color 0.3s ease;
}

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

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

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

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Important for mobile */
    justify-content: space-between; /* Hamburger left, Logo center */
  }

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

  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative; /* For active state animation */
    z-index: 1001;
  }

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

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

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Below the fixed header-top and mobile buttons */
    left: 0;
    width: 280px; /* Sidebar width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--secondary-color); /* Dark Red for mobile menu */
    flex-direction: column;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
    overflow-y: auto;
    z-index: 1000;
  }

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

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

  .nav-link {
    color: var(--text-light); /* Light text on dark menu */
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  .mobile-nav-buttons {
    display: flex; /* Visible on mobile */
    width: 100%;
    justify-content: center;
    gap: 10px;
    background-color: var(--secondary-color); /* Same as header-top */
    padding: 10px 15px;
    min-height: 50px; /* Mobile height */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }

  .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.5);
    z-index: 999;
  }

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

  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-col {
    min-width: unset;
    width: 100%;
  }
  .footer-col h3 {
    margin-top: 20px;
  }
}

/* Mobile specific overflow fix */
@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;
  }
}
/* 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;
  }
}
