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

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

body.no-scroll {
  overflow: hidden;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.header-top {
  background-color: var(--color-background); /* Darker background for header-top */
  height: 68px;
  min-height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
  position: relative; /* Needed for absolute positioning of logo on mobile */
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1; /* Ensure text logo fits */
  display: flex; /* For text logo vertical alignment */
  align-items: center;
  height: 100%;
}

.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: var(--button-gradient);
  color: #000; /* Black text for gold button */
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  white-space: nowrap;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(255, 211, 107, 0.4);
  display: inline-flex; /* Ensure flex properties apply */
  align-items: center; /* Vertically align text */
  justify-content: center; /* Horizontally align text */
}

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

.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
  box-sizing: border-box;
  min-height: 48px;
  background-color: var(--color-card-bg); /* Use card background for mobile button bar */
  padding: 8px 15px; /* Add some padding for the buttons */
  justify-content: center; /* Center buttons when only one */
  gap: 10px;
}

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1002; /* Above header-top */
  margin-left: -5px; /* Adjust for visual alignment */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--color-primary);
  margin-bottom: 5px;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger-menu span:last-child {
  margin-bottom: 0;
}

/* Hamburger animation */
.hamburger-menu.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

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

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

.main-nav {
  background-color: var(--color-card-bg); /* Slightly lighter background for main nav */
  height: 52px;
  min-height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
  transition: background-color 0.3s ease;
}

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

.nav-link {
  color: var(--color-text-main);
  text-decoration: none;
  padding: 0 15px;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.3s ease, transform 0.3s ease;
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background-color: var(--color-primary);
  transition: width 0.3s ease;
}

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

.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: 999;
  transition: opacity 0.3s ease;
  opacity: 0;
  pointer-events: none; /* Allow clicks through when hidden */
}

.overlay.active {
  display: block;
  opacity: 1;
  pointer-events: auto; /* Enable clicks when active */
}

/* Footer styles */
.site-footer {
  background-color: var(--color-card-bg);
  color: var(--color-text-main);
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.6;
  border-top: 1px solid var(--color-border);
}

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

.footer-col {
  display: flex;
  flex-direction: column;
}

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

.footer-description {
  margin-bottom: 15px;
  color: rgba(var(--color-text-main), 0.8);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

.footer-nav a {
  color: var(--color-text-main);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-slot-anchor-inner {
  /* Placeholder for injected content */
  min-height: 1px; /* Ensure it takes up space */
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  color: rgba(var(--color-text-main), 0.7);
}

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

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

  /* Image 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;
  }

  .header-top {
    height: 60px !important;
    min-height: 60px !important;
    padding-left: 15px; /* Add padding to header-top itself for hamburger */
    padding-right: 15px;
  }

  .header-container {
    padding: 0; /* Reset container padding, handled by header-top */
    width: 100%;
    max-width: none;
    justify-content: space-between; /* Hamburger left, logo middle */
    position: relative; /* For absolute positioning of logo */
  }

  .logo {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: calc(100% - 100px); /* Prevent logo from overlapping hamburger/buttons */
    height: 100%;
    padding: 0; /* Reset padding for logo when centered */
  }

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

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

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    height: auto; /* Allow height to adjust for wrapped text */
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay on one line */
    justify-content: center;
  }

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

  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    order: -1; /* Place hamburger first */
    width: 40px;
    height: 40px;
  }

  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header + mobile buttons */
    left: 0;
    width: 80%; /* Menu takes 80% width */
    max-width: 300px;
    height: calc(100vh - var(--header-offset)); /* Fill remaining height */
    background-color: var(--color-card-bg);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px 0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease, opacity 0.3s ease; /* Add opacity transition */
    overflow-y: auto; /* Enable scrolling for long menus */
    z-index: 1001; /* Above overlay */
    min-height: unset; /* Override desktop min-height */
    opacity: 0; /* Start hidden for transition */
    pointer-events: none; /* Disable interaction when hidden */
  }

  .main-nav.active {
    display: flex; /* Show the menu */
    transform: translateX(0); /* Slide in */
    opacity: 1; /* Fade in */
    pointer-events: auto; /* Enable interaction when active */
  }

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

  .nav-link {
    width: 100%;
    padding: 12px 0;
    justify-content: flex-start;
    border-bottom: 1px solid rgba(var(--color-border), 0.5);
  }
  .nav-link:last-child {
    border-bottom: none;
  }
  .nav-link::after {
    display: none; /* Hide underline animation on mobile */
  }

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

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

  .footer-nav {
    width: 100%;
  }
  .footer-nav li {
    margin-bottom: 8px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
