:root {
  --primary-color: #FFD700;
  --secondary-color: #8B0000;
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

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

/* Base styles for body to ensure header offset and prevent mobile overflow */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  color: #333;
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

/* Header styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  background-color: var(--secondary-color); /* Default background, specific sections will override */
  display: flex;
  flex-direction: column;
}

.header-top {
  background-color: var(--secondary-color); /* Deep red for top section */
  width: 100%;
  min-height: 60px;
  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: 15px 30px;
  box-sizing: border-box;
}

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

.desktop-nav-buttons {
  display: flex;
  gap: 12px;
  margin-left: auto; /* Push buttons to the right */
}

.btn {
  display: inline-block;
  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;
  cursor: pointer;
}

.btn-login {
  background-color: var(--primary-color); /* Gold button */
  color: var(--secondary-color); /* Dark red text */
  border: 1px solid var(--primary-color);
}

.btn-login:hover {
  background-color: #e6c200; /* Slightly darker gold */
}

.btn-register {
  background-color: var(--secondary-color); /* Dark red button */
  color: var(--primary-color); /* Gold text */
  border: 1px solid var(--primary-color);
}

.btn-register:hover {
  background-color: #6a0000; /* Slightly darker red */
}

.main-nav {
  background-color: var(--primary-color); /* Gold for main navigation */
  width: 100%;
  min-height: 50px;
  display: flex; /* Desktop default: visible */
  align-items: center;
  justify-content: center;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  padding: 10px 30px;
  box-sizing: border-box;
}

.nav-link {
  color: var(--secondary-color); /* Dark red text on gold background */
  text-decoration: none;
  padding: 8px 15px;
  font-weight: bold;
  white-space: nowrap;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.nav-link:hover {
  background-color: rgba(139, 0, 0, 0.1); /* Subtle hover effect */
  border-radius: 4px;
}

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

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--primary-color); /* Gold lines */
  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 */
  background-color: var(--secondary-color); /* Same as header-top */
  width: 100%;
  padding: 10px 15px;
  box-sizing: border-box;
  justify-content: center;
  gap: 12px;
  min-height: 50px;
}

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

/* Footer styles */
.site-footer {
  background-color: #1a1a1a;
  color: #f0f0f0;
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.8;
}

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

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

.footer-section {
  flex: 1;
  min-width: 250px;
}

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

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

.footer-section ul li a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: var(--primary-color); /* Gold hover */
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #333;
  color: #aaa;
}

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

  .site-header {
    flex-direction: column;
  }

  .header-container {
    padding: 10px 15px;
    flex-wrap: nowrap;
    justify-content: space-between;
    width: 100%;
    max-width: none; /* Remove max-width on mobile */
  }

  .hamburger-menu {
    display: block; /* Show on mobile */
    order: 0;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    order: 1;
    text-align: center; /* For text logo */
  }

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

  .mobile-nav-buttons {
    display: flex; /* Show on mobile */
    order: 2;
    min-height: 50px;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below header and mobile buttons */
    left: 0;
    width: 70%;
    height: calc(100vh - var(--header-offset));
    flex-direction: column;
    background-color: #222; /* Dark background for mobile menu */
    padding: 20px;
    box-sizing: border-box;
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    z-index: 1001;
    box-shadow: 2px 0 5px rgba(0,0,0,0.5);
  }

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

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

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

  .footer-section {
    min-width: unset;
    width: 100%;
  }
  .footer-bottom {
    padding: 15px;
  }
}

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