:root {
  --primary-color: #F2C14E;
  --secondary-color: #FFD36B;
  --button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  --card-bg: #111111;
  --background-color: #0A0A0A;
  --text-main-color: #FFF6D6;
  --border-color: #3A2A12;
  --glow-color: #FFD36B;
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) = 120px */
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Mandatory for fixed header */
  background-color: var(--background-color);
  color: var(--text-main-color);
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--background-color); /* Dark background for contrast */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); /* Suspended effect */
  z-index: 1000;
  min-height: 60px; /* Ensure content adaptation */
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  flex-shrink: 0;
  padding: 5px 0;
  line-height: 1;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  font-size: 28px;
  color: var(--primary-color);
  cursor: pointer;
  padding: 5px;
  flex-shrink: 0;
  line-height: 1;
  order: 0; /* Ensures it's on the left on mobile */
}

.main-nav {
  display: flex; /* Desktop default: flex row */
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex: 1; /* Occupy middle space */
  gap: 25px;
  padding: 0 20px;
}

.main-nav .nav-link {
  color: var(--text-main-color);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 8px 0;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
  color: var(--primary-color);
}

.desktop-nav-buttons {
  display: flex; /* Desktop default: flex */
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto; /* Push to the right */
}

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

.btn {
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  text-align: center;
  white-space: nowrap;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  color: #111111; /* Button text color for contrast with gradient */
}

.btn-login {
  background: var(--button-gradient);
  color: #111111;
}

.btn-register {
  background: var(--button-gradient);
  color: #111111;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(var(--glow-color), 0.4);
}

/* Mobile Menu Overlay */
.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.7);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Footer Styles */
.site-footer {
  background-color: var(--card-bg); /* Darker background for footer */
  padding: 40px 0 20px;
  color: var(--text-main-color);
  font-size: 14px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

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

.footer-description {
  line-height: 1.6;
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-heading {
  font-size: 18px;
  color: var(--primary-color);
  margin-bottom: 15px;
}

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

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

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

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

.footer-bottom {
  max-width: 1200px;
  margin: 30px auto 0;
  padding: 20px 30px 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

.footer-slot-anchor-inner {
  margin-top: 15px; /* Add some spacing for injected content */
}

/* Mandatory slot anchors, ensure they are visible */
.footer-slot-anchor, .footer-slot-anchor-inner {
  /* These elements must not be hidden by CSS to allow content injection */
  /* No display: none, visibility: hidden, opacity: 0, height: 0, max-height: 0, overflow: hidden */
}


/* Mobile Styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: 60px (header-top) + 48px (main-nav) = 108px */
  }

  body {
    padding-top: var(--header-offset);
    overflow-x: hidden;
  }

  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

  .site-header {
    min-height: 50px; /* Adjust min-height for mobile header */
  }

  .header-container {
    padding: 10px 15px; /* Mobile padding */
    width: 100%;
    max-width: none; /* Mandatory for mobile container */
    justify-content: space-between; /* Distribute items */
  }

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

  .logo {
    flex: 1 !important; /* Mandatory for image logo centering (Method 1) */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0;
    font-size: 24px; /* Adjust logo size for mobile */
    order: 1;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Align with header bottom */
    left: 0;
    width: 75%;
    max-width: 300px;
    height: calc(100vh - var(--header-offset));
    background-color: var(--card-bg);
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto; /* Allow scrolling for long menus */
    align-items: flex-start; /* Align menu items to the left */
    gap: 15px;
  }

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

  .main-nav .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 18px;
  }
  .main-nav .nav-link:last-child {
    border-bottom: none;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    gap: 8px;
    flex-shrink: 0;
    order: 2;
  }

  .mobile-menu-overlay.active {
    display: block; /* Show overlay when menu is active */
  }

  .footer-container {
    grid-template-columns: 1fr; /* Single column on mobile */
    padding: 0 15px;
  }

  .footer-col {
    margin-bottom: 20px;
  }

  .footer-bottom {
    padding: 15px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
