:root {
  --header-offset: 122px;
}

body {
  padding-top: var(--header-offset);
  margin: 0;
  font-family: Arial, sans-serif;
  color: #FFF6D6;
  background-color: #0A0A0A;
  overflow-x: hidden; /* Prevents horizontal scroll from body */
}

/* General container styles */
.header-top .header-container, .main-nav .nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
  height: 100%;
}

/* Site Header - Fixed Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  background-color: #0A0A0A; /* Fallback */
}

.header-top {
  background-color: #0A0A0A; /* Darker background for top bar */
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between; /* For logo and buttons */
  padding: 0 20px;
  box-sizing: border-box;
}

.header-top .hamburger-menu {
  display: none; /* Hidden on desktop */
}

.header-top .logo {
  font-size: 28px;
  font-weight: bold;
  color: #F2C14E;
  text-decoration: none;
  white-space: nowrap;
}

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

.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
  min-height: 48px;
  background-color: #111111; /* Default to nav background */
  box-sizing: border-box;
}

.main-nav {
  background-color: #111111; /* Slightly lighter dark for main nav */
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.main-nav .nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  padding: 0 20px;
}

.main-nav .nav-link {
  color: #FFF6D6;
  text-decoration: none;
  font-size: 16px;
  padding: 10px 0;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.main-nav .nav-link:hover {
  color: #F2C14E;
}

/* Buttons */
.btn {
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  color: #0A0A0A;
  padding: 10px 18px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  white-space: nowrap;
  transition: transform 0.2s ease;
  border: none;
  cursor: pointer;
  display: inline-block;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

/* Hamburger Menu Styling */
.hamburger-menu {
  width: 30px;
  height: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  z-index: 1001;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFF6D6;
  transition: all 0.3s ease;
}

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

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

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

/* Mobile Overlay */
.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  display: none;
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

/* Footer */
.site-footer {
  background-color: #111111;
  color: #FFF6D6;
  padding: 40px 20px 20px;
  box-sizing: border-box;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 30px;
}

.footer-col h3 {
  color: #F2C14E;
  font-size: 18px;
  margin-bottom: 20px;
}

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

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

.footer-col .footer-nav a {
  color: #FFF6D6;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-col .footer-nav a:hover {
  color: #FFD36B;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: #F2C14E;
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-description {
  font-size: 14px;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #3A2A12;
  margin-top: 30px;
  font-size: 13px;
  color: #FFF6D6;
}

/* Anchor slots */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure visibility for injection */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 158px;
  }
  body {
    overflow-x: hidden;
  }

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

  .header-top {
    min-height: 60px;
    height: 60px;
    padding: 0 15px; /* Adjust padding for mobile */
    justify-content: space-between;
    position: relative; /* For logo centering */
  }

  .header-top .hamburger-menu {
    display: flex;
  }

  .header-top .logo {
    font-size: 24px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Account for hamburger width + padding */
    text-align: center;
  }

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

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
  }

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

  .main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px; /* Width of the mobile menu */
    height: 100vh; /* Full viewport height */
    background-color: #111111;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: calc(var(--header-offset) + 20px); /* Push content below fixed header and mobile buttons */
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease;
    z-index: 1000;
    display: none; /* Initially hidden, will be flex when active */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 20px;
    width: 100%;
    max-width: none;
  }

  .main-nav .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid #3A2A12; /* Separator */
  }

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

  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-col {
    text-align: center;
  }

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