:root {
  --primary-color: #F2C14E;
  --secondary-color: #FFD36B;
  --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) + 2px buffer */
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  background-color: var(--background-color);
  color: var(--text-main-color);
  padding-top: var(--header-offset);
  overflow-x: hidden;
}

/* Header Styles */
.site-header {
  background-color: var(--card-bg); /* Dark background for header */
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  min-height: 68px; /* Roughly header-top height */
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  flex-shrink: 0;
  padding: 10px 0;
  order: 1;
  white-space: nowrap;
}

.main-nav {
  flex: 1;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 30px;
  list-style: none;
  padding: 0;
  margin: 0;
  order: 2;
}

.nav-link {
  color: var(--text-main-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  padding: 10px 0;
  transition: color 0.3s ease, transform 0.3s ease;
}

.nav-link:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

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

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

.btn {
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  color: #000;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 10px rgba(255, 211, 107, 0.4);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 211, 107, 0.6);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: transparent;
  border: none;
  font-size: 30px;
  color: var(--primary-color);
  cursor: pointer;
  padding: 5px;
  z-index: 1001; /* Above other header elements */
  order: 0;
}

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

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

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

.footer-content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

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

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

.footer-description {
  line-height: 1.6;
  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: var(--text-main-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  margin-top: 20px;
  color: #999;
}

.footer-slot-anchor-inner {
  min-height: 10px; /* Ensures visibility for injection */
}

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

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

  .hamburger-menu {
    display: block;
    order: 0;
  }

  .logo {
    flex: 1;
    text-align: center;
    order: 1;
    font-size: 24px;
    padding: 8px 0;
  }

  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 280px;
    height: calc(100% - var(--header-offset));
    background-color: var(--card-bg);
    padding: 20px;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 15px;
    z-index: 999;
    overflow-y: auto;
  }

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

  .nav-link {
    padding: 12px 0;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }

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

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

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

  .hamburger-menu.active {
    color: var(--secondary-color);
  }

  /* Footer Responsive */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .footer-col h3 {
    margin-top: 20px;
  }

  .footer-logo {
    display: inline-block;
  }

  /* Mobile content overflow protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
