:root {
  --primary-color: #CC0000;
  --secondary-color: #FFD700;
  --text-light: #FFFFFF;
  --text-dark: #333333;
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

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

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--text-dark);
  padding-top: var(--header-offset); /* Ensure content isn't hidden by fixed header */
  overflow-x: hidden; /* Prevent body overflow on mobile */
}

a {
  text-decoration: none;
  color: inherit;
}

.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(--text-light); /* Base for the header, individual sections will override */
}

.header-top {
  background-color: var(--primary-color); /* Primary red */
  padding: 10px 0;
  color: var(--text-light);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px; /* Desktop padding */
  min-height: 40px; /* Ensure some height for content */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* Gold logo on red background */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block; /* Ensure visibility on desktop */
}

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

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  text-decoration: none; /* Remove underline for buttons */
}

.btn-register {
  background-color: var(--secondary-color); /* Gold button */
  color: var(--primary-color); /* Red text on gold */
}

.btn-register:hover {
  background-color: #e6c200; /* Darker gold */
  transform: translateY(-2px);
}

.btn-login {
  background-color: var(--text-light); /* White button */
  color: var(--primary-color); /* Red text on white */
  border: 1px solid var(--primary-color);
}

.btn-login:hover {
  background-color: var(--primary-color); /* Red hover */
  color: var(--text-light); /* White text on hover */
  transform: translateY(-2px);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1002; /* Above mobile menu overlay */
  width: 45px; /* Fixed width for consistent spacing */
  height: 45px; /* Fixed height */
  display: flex;
  justify-content: center;
  align-items: center;
}

.hamburger-menu::before,
.hamburger-menu::after {
  content: '';
  position: absolute;
  width: 25px;
  height: 3px;
  background-color: var(--secondary-color); /* Gold hamburger lines */
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.3s ease;
}

.hamburger-menu::before {
  top: 15px;
}

.hamburger-menu::after {
  bottom: 15px;
}

.hamburger-menu.active::before {
  transform: translate(-50%, 5px) rotate(45deg);
  top: 50%;
}

.hamburger-menu.active::after {
  transform: translate(-50%, -5px) rotate(-45deg);
  top: 50%;
}

.mobile-nav-buttons {
  display: none; /* Hidden on desktop, shown on mobile */
  background-color: var(--primary-color); /* Red background for mobile buttons */
  box-sizing: border-box;
  padding: 10px 0; /* Vertical padding, horizontal handled by container */
}

.main-nav {
  background-color: var(--secondary-color); /* Secondary gold */
  padding: 10px 0;
  display: flex; /* Desktop default */
  width: 100%;
  min-height: 30px; /* Ensure some height for content */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex; /* Desktop default */
  flex-direction: row; /* Desktop default */
  justify-content: center; /* Center menu items on desktop */
  align-items: center;
  padding: 0 20px; /* Desktop padding */
}

.nav-link {
  color: var(--primary-color); /* Red text on gold background */
  font-weight: bold;
  padding: 8px 15px;
  transition: background-color 0.3s ease, color 0.3s ease;
  border-radius: 3px;
  white-space: nowrap;
}

.nav-link:hover {
  background-color: var(--primary-color); /* Red hover background */
  color: var(--text-light); /* White text on hover */
}

.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.6);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* Footer Styles */
.site-footer {
  background-color: var(--primary-color); /* Primary 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-section {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
}

.footer-section h3 {
  color: var(--secondary-color); /* Gold headings */
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-section p {
  line-height: 1.6;
  margin-bottom: 15px;
}

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

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

.footer-nav a {
  color: var(--text-light);
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--secondary-color); /* Gold hover */
}

.copyright {
  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) {
  .header-container {
    padding: 0 15px; /* Smaller padding on mobile */
    width: 100%;
    max-width: none; /* No max-width on mobile */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px; /* Adjust font size for mobile */
    order: 2; /* Place logo in center */
    max-width: calc(100% - 100px); /* Account for hamburger and potential right-side element */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    order: 1; /* Place hamburger on left */
    background-color: transparent;
    border: none;
    position: relative;
    z-index: 1002;
    color: var(--secondary-color);
    padding: 10px;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: center;
  }

  .mobile-nav-buttons .btn {
    flex: 1; min-width: 0;
    max-width: calc(50% - 5px); /* For two buttons */
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hide by default on mobile */
    flex-direction: column; /* Vertical menu */
    position: fixed;
    top: var(--header-offset); /* Below the fixed header */
    left: 0;
    width: 250px; /* Sidebar width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--secondary-color); /* Gold background for mobile menu */
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    overflow-y: auto; /* Scrollable if content is long */
    z-index: 1001;
  }

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

  .nav-container {
    flex-direction: column;
    padding: 0 15px; /* Mobile padding */
    max-width: none; /* No max-width on mobile */
    width: 100%;
    align-items: flex-start; /* Align menu items to left */
  }

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(var(--primary-color), 0.1); /* Subtle separator */
  }

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

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

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

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