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

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

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--background-color); /* Use specified background color */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  min-height: 60px; /* Ensure content adaptation */
  display: flex;
  align-items: center;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 15px 30px; /* Adjusted padding for better spacing */
}

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

.main-nav {
  flex: 1;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 25px;
  margin: 0 20px;
}

.nav-link {
  color: var(--text-main-color);
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  padding: 8px 12px;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
  display: block; /* Ensure clickable area */
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

.desktop-nav-buttons {
  display: flex;
  gap: 10px;
  margin-left: auto; /* Push buttons to the right */
  flex-shrink: 0;
}

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

.btn {
  background: var(--button-gradient);
  color: #000000; /* Contrast color for button text */
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 80px; /* Ensure buttons have a minimum width */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  text-shadow: 0 1px 1px rgba(0,0,0,0.2);
  color: #333; /* Darker text for better contrast on gold */
}

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

.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: 1001; /* Ensure hamburger is above menu */
  flex-shrink: 0;
  margin-right: 15px;
}

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

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

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

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

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

.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;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

/* Footer Styles */
.site-footer {
  background-color: var(--background-color);
  padding: 40px 20px;
  color: var(--text-main-color);
  border-top: 1px solid var(--border-color);
}

.site-footer .footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-columns {
  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;
  font-weight: bold;
}

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

.footer-description {
  font-size: 14px;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav a {
  color: var(--text-main-color);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
  display: block;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-main-color);
}

.footer-slot-anchor-inner {
  min-height: 10px; /* Ensure visibility for slot injection */
  width: 100%;
}

.footer-slot-anchor {
  min-height: 10px; /* Ensure visibility for slot injection */
  width: 100%;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .main-nav {
    gap: 15px;
    margin: 0 10px;
  }
  .header-container {
    padding: 10px 20px;
  }
  .logo {
    font-size: 24px;
  }
  .nav-link {
    font-size: 15px;
    padding: 6px 10px;
  }
  .btn {
    padding: 8px 15px;
    font-size: 14px;
    min-width: 70px;
  }
}

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

  .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-container {
    width: 100%;
    max-width: none; /* Important for mobile to ensure full width */
    padding: 10px 15px; /* Adjust padding for smaller screens */
    justify-content: space-between; /* Distribute items */
  }

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

  .logo {
    order: 2;
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 22px;
    margin-left: 0; /* Reset margin */
    margin-right: 0; /* Reset margin */
    padding: 0 10px; /* Add some padding around the logo if needed */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header */
    left: 0;
    width: 280px; /* Adjust as needed */
    height: calc(100% - var(--header-offset));
    background-color: var(--card-bg-color); /* Darker background for menu */
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease-out, visibility 0.3s ease-out;
    z-index: 999; /* Below overlay, above body */
    align-items: flex-start;
    overflow-y: auto;
    visibility: hidden; /* Ensure it's not visible when hidden */
  }

  .main-nav.active {
    display: flex; /* Must set display for it to be visible */
    transform: translateX(0); /* Slide in */
    visibility: visible;
  }

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

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

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    order: 3;
    gap: 8px;
  }

  .mobile-menu-overlay {
    display: none;
    opacity: 0;
  }

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

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

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

  .footer-col:first-child .footer-logo,
  .footer-col:first-child .footer-description {
    text-align: center;
  }

  .footer-nav {
    align-items: center;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
