:root {
  --primary-color: #FFD700;
  --secondary-color: #8B0000;
  --text-light: #FFFFFF;
  --text-dark: #333333;
  --header-top-bg: var(--secondary-color);
  --main-nav-bg: var(--primary-color);
  --header-offset: 100px; /* Desktop: header-top (60px) + main-nav (40px) */
}

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

html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
}

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.header-top {
  background-color: var(--header-top-bg);
  padding: 15px 0;
  min-height: 60px; /* Ensure sufficient height */
  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: var(--primary-color);
  text-decoration: none;
  font-size: 2.2em;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
}

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

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-size: 0.95em;
  text-align: center;
  cursor: pointer;
  border: none;
}

.btn-login {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-login:hover {
  background-color: #FFEA00; /* Slightly brighter gold */
  transform: translateY(-2px);
}

.btn-register {
  background-color: #C00000; /* Brighter red */
  color: var(--text-light);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-register:hover {
  background-color: #E00000; /* Even brighter red */
  transform: translateY(-2px);
}

.main-nav {
  background-color: var(--main-nav-bg);
  padding: 10px 0;
  min-height: 40px; /* Ensure sufficient height */
  display: flex; /* Desktop default: flex */
  align-items: center;
}

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

.nav-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
  padding: 8px 15px;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
  font-size: 1.05em;
}

.nav-link:hover,
.nav-link.active {
  background-color: rgba(139, 0, 0, 0.1);
  border-radius: 5px;
  color: var(--text-dark);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1001;
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--primary-color);
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu span:nth-child(1) {
  top: 0;
}

.hamburger-menu span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger-menu span:nth-child(3) {
  bottom: 0;
}

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

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

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

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

.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: 998;
}

/* Footer Styles */
.site-footer {
  background-color: var(--secondary-color);
  color: var(--text-light);
  padding: 40px 20px 20px;
  font-size: 0.9em;
}

.site-footer .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}

.site-footer .footer-column {
  flex: 1;
  min-width: 200px;
}

.site-footer .footer-logo {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 1.8em;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 15px;
}

.site-footer h3 {
  color: var(--primary-color);
  font-size: 1.2em;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.site-footer p {
  margin: 0 0 15px;
}

.site-footer .footer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.site-footer .footer-nav a:hover {
  color: var(--primary-color);
}

.site-footer .footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer .footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

/* Mobile Styles */
@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Ensure full width on mobile */
    justify-content: space-between;
    position: relative; /* For logo centering */
  }

  .header-top {
    padding: 10px 0;
    min-height: 50px;
  }

  .logo {
    flex-grow: 1; /* Allow logo to take available space for centering */
    text-align: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 70px); /* Adjust width to not overlap hamburger/spacer */
    font-size: 1.8em;
  }

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

  .hamburger-menu {
    display: block;
    order: -1; /* Place hamburger menu first */
    margin-right: auto; /* Push logo to center */
  }

  .header-container::after { /* Spacer for logo centering */
    content: '';
    display: block;
    width: 30px; /* Same width as hamburger menu */
    height: 24px;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical menu */
    position: fixed;
    top: var(--header-offset); /* Start below header */
    left: 0;
    width: 80%;
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--main-nav-bg);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Off-screen to the left */
    transition: transform 0.3s ease-in-out;
    z-index: 999;
    overflow-y: auto;
    padding: 20px 0;
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
    max-width: none; /* Ensure full width on mobile */
  }

  .nav-link {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(139, 0, 0, 0.1);
    width: 100%;
    text-align: left;
    font-size: 1.1em;
  }

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

  .mobile-nav-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    background-color: var(--header-top-bg);
    padding: 10px 15px;
    min-height: 50px;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 999; /* Ensure buttons are above main content */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    max-width: 150px;
    font-size: 0.9em;
  }

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

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

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

  .site-footer .footer-nav {
    align-items: center;
  }

  .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 no-scroll class for mobile menu */
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;
  }
}
