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

body {
  padding-top: var(--header-offset);
  overflow-x: hidden;
  margin: 0;
  font-family: Arial, sans-serif;
  color: #FFF6D6;
  background-color: #0A0A0A;
  direction: ltr;
}

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

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #1A1A1A; /* Dark background for header top */
  width: 100%;
  border-bottom: 1px solid #3A2A12;
}

.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 {
  display: block;
  font-size: 24px;
  font-weight: bold;
  color: #FFD36B; /* Secondary color for logo text */
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

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

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  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(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);
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #2A2A2A; /* Slightly lighter dark background for main nav */
  width: 100%;
  border-bottom: 1px solid #3A2A12;
}

.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: #FFF6D6;
  text-decoration: none;
  font-size: 16px;
  padding: 10px 0;
  white-space: nowrap;
  transition: color 0.3s ease;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  color: #0A0A0A; /* Dark text for bright button */
  white-space: nowrap;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.mobile-nav-overlay {
  display: none;
  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-nav-overlay.active {
  display: block;
  opacity: 1;
}

.site-footer {
  background-color: #111111; /* Card BG for main footer content */
  color: #FFF6D6;
  padding-top: 40px;
  font-size: 14px;
  line-height: 1.6;
}

.footer-top-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding: 0 20px 40px;
  border-bottom: 1px solid #3A2A12;
}

.footer-col h3 {
  color: #F2C14E; /* Primary color for footer headings */
  font-size: 18px;
  margin-bottom: 15px;
}

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

.footer-col .footer-description {
  color: #FFF6D6;
  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: #FFF6D6;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  background-color: #0A0A0A; /* Background color for copyright */
  text-align: center;
  padding: 20px 20px;
  margin-top: 0;
  color: #FFF6D6;
}

.footer-slot-anchor-inner {
  min-height: 10px; /* Ensure slot is visible for inspection */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 110px;
  }

  .body {
    padding-top: var(--header-offset);
  }

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

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding: 0 15px;
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0;
    justify-content: space-between;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    order: 2; /* Center logo */
    font-size: 20px;
    max-width: calc(100% - 80px); /* Account for hamburger and potential right-side items */
  }

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

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

  .hamburger-menu {
    display: flex;
    order: 1; /* Left side */
  }

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: #1A1A1A;
    border-bottom: 1px solid #3A2A12;
    justify-content: center;
  }

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

  .main-nav {
    min-height: auto !important;
    height: 100vh; /* Full viewport height */
    width: 280px; /* Width of the slide-out menu */
    position: fixed;
    top: var(--header-offset); /* Start below header */
    left: 0;
    background-color: #111111; /* Card BG for menu background */
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    border-right: 1px solid #3A2A12;
  }

  .main-nav.active {
    display: flex; /* Must be flex to show */
    transform: translateX(0);
  }

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 20px;
    gap: 15px;
    height: auto;
  }

  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(58, 42, 18, 0.5); /* Lighter border for menu items */
    font-size: 15px;
  }

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

  .footer-top-grid {
    grid-template-columns: 1fr;
    padding: 0 15px 30px;
  }

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

  .footer-col:last-of-type {
    margin-bottom: 0;
  }

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