html, body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
  color: #FFF3E6;
  background-color: #0D0E12;
}

:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) + 2px buffer */
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  background-color: #0D0E12; /* Background color for the fixed header */
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #0D0E12; /* Darker background */
  width: 100%;
}

.header-container {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #FFA53A;
  text-decoration: none;
  display: inline-block;
  line-height: 1;
}

.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

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

.btn {
  background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%);
  color: #FFF3E6;
  padding: 10px 18px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  white-space: nowrap;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
  display: inline-block;
  text-align: center;
}

.btn:hover {
  background: linear-gradient(180deg, #FFB04D 0%, #A84F0C 100%);
}

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default for desktop */
  min-height: 48px;
}

.hamburger-icon {
  display: none; /* Hidden by default for desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1002;
}

.hamburger-icon span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFA53A;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-icon span:nth-child(1) { top: 0; }
.hamburger-icon span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-icon span:nth-child(3) { bottom: 0; }

.hamburger-icon.active span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}
.hamburger-icon.active span:nth-child(2) { opacity: 0; }
.hamburger-icon.active span:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #17191F; /* Lighter background, different from header-top */
  width: 100%;
}

.nav-container {
  box-sizing: border-box;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  gap: 25px;
}

.nav-link {
  color: #FFF3E6;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 0;
  white-space: nowrap;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: #FFA53A;
}

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

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

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

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

/* Footer Styles */
.site-footer {
  background-color: #0D0E12;
  color: #FFF3E6;
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.6;
  border-top: 1px solid #A84F0C;
}

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

.footer-col h3 {
  color: #FFA53A;
  font-size: 18px;
  margin-bottom: 15px;
  border-bottom: 1px solid #A84F0C;
  padding-bottom: 5px;
}

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

.footer-description {
  color: #FFF3E6;
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

.footer-nav a {
  color: #FFF3E6;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

.footer-bottom p {
  margin: 0;
}

.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure slot anchors are present in DOM */
}

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

  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;
    justify-content: space-between;
  }

  .header-container {
    max-width: none;
    padding: 0;
    position: relative; /* For absolute positioning of logo if needed */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: absolute; /* To center it regardless of hamburger icon */
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 70px); /* Adjust width to not overlap hamburger */
  }

  .logo img {
    max-height: 56px !important;
  }

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

  .hamburger-icon {
    display: block;
    position: relative;
    order: -1; /* Place hamburger on the left */
  }

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    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;
    background-color: #17191F; /* Background for mobile button bar */
  }

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

  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Position below header */
    left: 0;
    width: 80%;
    max-width: 300px;
    height: calc(100% - var(--header-offset));
    background-color: #17191F;
    flex-direction: column;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
    align-items: flex-start;
  }

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

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

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

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

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

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

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

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

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

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