:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) = 120px + 2px buffer */
  --primary-color: #F2C14E;
  --secondary-color: #FFD36B;
  --card-bg: #111111;
  --body-bg: #0A0A0A;
  --text-main: #FFF6D6;
  --border-color: #3A2A12;
  --glow-color: #FFD36B;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  background-color: var(--body-bg); /* Default background for the whole header */
}

.header-top {
  box-sizing: border-box;
  height: 68px; /* Desktop height */
  min-height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--card-bg); /* Darker background for top bar */
  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 30px; /* Padding for logo and buttons */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  display: block; /* Ensure it's visible by default */
  padding: 5px 0;
  white-space: nowrap;
}

.logo img {
  display: block;
  max-height: 60px; /* Desktop logo max height */
  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;
  background-color: var(--body-bg);
}

.btn {
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: bold;
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
  border: none;
  line-height: 1;
}

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

.main-nav {
  box-sizing: border-box;
  height: 52px; /* Desktop height */
  min-height: 52px;
  display: flex; /* Desktop default: visible */
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-color); /* Golden background for main nav */
  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;
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 25px;
}

.nav-menu li a {
  color: #111111; /* Contrasting text for golden background */
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  padding: 5px 0;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nav-menu li a:hover,
.nav-menu li a.current-active {
  color: var(--text-main);
}

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  width: 30px;
  height: 24px;
  position: absolute;
  left: 20px; /* Position on mobile */
  top: 50%;
  transform: translateY(-50%);
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 1001; /* Above header */
}

.hamburger-menu .bar {
  width: 100%;
  height: 4px;
  background-color: var(--primary-color);
  transition: all 0.3s ease;
  border-radius: 2px;
}

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

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

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

.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; /* Below menu, above content */
  transition: opacity 0.3s ease;
  opacity: 0;
}

.overlay.visible {
  display: block;
  opacity: 1;
}

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

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

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

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

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

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

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

.footer-nav li a {
  color: var(--text-main);
  text-decoration: none;
  display: block;
  padding: 5px 0;
  transition: color 0.3s ease;
}

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

.footer-slot-anchor-inner {
  min-height: 10px; /* Ensure visibility for potential injected content */
}

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

.footer-bottom p {
  margin: 0;
}

/* Mobile Styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: 60px (header-top) + 48px (mobile-nav-buttons) = 108px + 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 {
    height: 60px !important;
    min-height: 60px !important;
    position: relative; /* For absolute positioning of hamburger/logo */
    padding: 0 15px; /* Adjust padding for mobile */
    display: flex;
    align-items: center;
    justify-content: space-between; /* To push hamburger left and leave space for logo */
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0; /* Remove container padding as header-top has it */
    justify-content: flex-start; /* Reset for mobile, logo handled separately */
  }

  .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); /* Leave space for hamburger */
    height: 100%; /* Ensure logo is vertically centered */
  }

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

  .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;
    background-color: var(--body-bg);
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Adjusted for 2 buttons and 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 */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 75%; /* Slide in from left */
    max-width: 300px;
    height: calc(100% - var(--header-offset));
    background-color: var(--card-bg); /* Dark background for mobile menu */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Off-screen */
    transition: transform 0.3s ease;
    overflow-y: auto;
  }

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

  .nav-container {
    width: 100%;
    max-width: none;
    padding: 20px 15px;
    flex-direction: column;
    align-items: flex-start;
    height: auto; /* Allow content to dictate height */
  }

  .nav-menu {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .nav-menu li {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }

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

  .nav-menu li a {
    color: var(--text-main); /* Text color for mobile menu items */
    padding: 12px 0;
    font-size: 16px;
    display: block;
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    position: relative; /* Relative to header-top */
    left: 0;
    top: auto;
    transform: none;
    z-index: 1001;
  }

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

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

  .footer-bottom {
    padding: 15px;
  }
}

/* No scroll for body when menu is open */
body.no-scroll {
  overflow: 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;
  }
}
/* 内容保护（系统追加，请勿删除） */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}
