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

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

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

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%; /* Default to 100% width, max-width will constrain */
  display: flex;
  align-items: center;
  padding: 10px 30px; /* Adjusted padding for desktop */
  min-height: 48px; /* Minimum height for nav elements */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  flex-shrink: 0;
  padding-right: 20px; /* Space between logo and nav */
  display: block; /* Ensure logo is visible */
}

.main-nav {
  flex: 1;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 25px;
  padding: 0 20px; /* Padding for nav to not touch buttons */
}

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

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

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.desktop-nav-buttons {
  display: flex;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

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

.btn {
  background: var(--btn-gradient);
  color: var(--bg-color); /* Text color should contrast with button background */
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  display: inline-flex; /* Ensure proper button sizing */
  align-items: center;
  justify-content: center;
  min-width: 80px; /* Minimum width for buttons */
}

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

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  font-size: 30px;
  color: var(--text-main);
  cursor: pointer;
  padding: 5px;
  line-height: 1;
  z-index: 1001; /* Above mobile nav */
  flex-shrink: 0;
  margin-right: 10px;
}

.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: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

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

.footer-main-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
}

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

.footer-description {
  line-height: 1.6;
  color: rgba(255, 246, 214, 0.7);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

.footer-link {
  color: rgba(255, 246, 214, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--primary-color);
}

.footer-bottom {
  max-width: 1200px;
  margin: 20px auto 0;
  text-align: center;
  color: rgba(255, 246, 214, 0.6);
}

/* Ensure footer slot anchors are visible */
.footer-slot-anchor, .footer-slot-anchor-inner {
  min-height: 1px; /* Small height to ensure visibility/renderability */
  width: 100%;
  display: block;
}

/* Global no-scroll for body when mobile menu is open */
body.no-scroll {
  overflow: hidden;
}

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

  body {
    padding-top: var(--header-offset);
    overflow-x: hidden; /* Prevent horizontal scroll on mobile */
  }

  /* Mobile Overflow Protection */
  .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; /* Smaller padding for mobile */
    width: 100%; /* Ensure full width */
    max-width: none; /* Remove max-width constraint */
    position: relative; /* For absolute positioning of logo if needed */
  }

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    margin-right: 10px; /* Space between hamburger and logo */
  }

  .logo {
    flex: 1 !important; /* Take available space */
    display: flex !important;
    justify-content: center !important; /* Center text/image logo */
    align-items: center !important;
    padding-right: 0; /* No extra padding */
    font-size: 24px; /* Adjust font size for mobile */
  }

  /* If .logo contains an img, ensure it's sized correctly */
  .logo img {
    max-width: 100%;
    height: auto;
    max-height: 40px; /* Max height for mobile logo */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 280px; /* Mobile menu width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--card-bg);
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Enable scrolling for long menus */
    justify-content: flex-start; /* Align items to top */
    align-items: flex-start; /* Align text to left */
    gap: 15px;
    z-index: 999; /* Below overlay, above content */
  }

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

  .nav-link {
    width: 100%;
    padding: 10px 0;
    font-size: 18px;
  }

  .nav-link::after {
    left: 0;
    bottom: -5px; /* Adjust underline position for mobile */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    gap: 8px;
    margin-left: auto; /* Push to right */
    flex-shrink: 0;
    z-index: 1001; /* Ensure buttons are clickable */
  }

  .btn {
    padding: 8px 15px; /* Smaller padding for mobile buttons */
    font-size: 14px;
    min-width: 70px;
  }

  .mobile-menu-overlay {
    z-index: 998; /* Ensure overlay is behind the menu */
  }

  /* Footer responsive */
  .site-footer {
    padding: 30px 15px 15px;
  }

  .footer-main-content {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
    padding-bottom: 20px;
  }

  .footer-col {
    align-items: flex-start;
  }

  .footer-logo {
    font-size: 22px;
  }

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