:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) + 2px */
  --primary-color: #F2C14E;
  --accent-color: #FFD36B;
  --card-bg: #111111;
  --bg-color: #0A0A0A;
  --text-main: #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);
  color: var(--text-main);
  background-color: var(--bg-color);
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

a {
  text-decoration: none;
  color: var(--text-main);
}

.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.5); /* Suspended effect */
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  white-space: nowrap;
  display: flex;
  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;
}

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px; /* Required min-height for mobile */
  background-color: var(--card-bg); /* Use card-bg for mobile buttons background */
  width: 100%;
  padding: 0 15px; /* Padding for mobile buttons */
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none; /* Remove underline for buttons */
  color: #0A0A0A; /* Text color for buttons to contrast with gold/red */
  white-space: nowrap;
}

.btn-primary {
  background: var(--button-gradient);
  color: #333; /* Darker text for primary button */
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-secondary {
  background-color: #333; /* Darker background for secondary button */
  border: 1px solid var(--primary-color);
  color: var(--primary-color); /* Primary color text for secondary button */
}

.btn-secondary:hover {
  background-color: #444;
  color: var(--accent-color);
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop: flex */
  align-items: center;
  overflow: hidden;
  background-color: var(--card-bg); /* Lighter 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; /* Desktop: row */
  justify-content: center;
  align-items: center;
  padding: 0 20px;
}

.nav-link {
  padding: 10px 15px;
  font-size: 16px;
  font-weight: bold;
  color: var(--text-main);
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

/* Hamburger menu for mobile */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001; /* Above header-top content */
  margin-left: auto; /* Push to right on desktop, but hidden */
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 5px 0;
  transition: all 0.3s ease;
}

.hamburger-menu.active .hamburger-icon:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger-menu.active .hamburger-icon:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active .hamburger-icon:nth-child(3) {
  transform: translateY(-8px) 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 main-nav but above content */
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

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

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

.footer-col {
  padding: 10px 0;
}

.footer-logo {
  display: inline-block;
  font-size: 20px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.footer-description {
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

.footer-col h3::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background-color: var(--primary-color);
  margin-top: 5px;
}

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

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

.footer-nav a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 20px;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom p {
  margin: 0;
}

/* Dynamic slot anchor inner for footer */
.footer-slot-anchor-inner {
  min-height: 1px;
  margin-top: 15px;
}

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

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

  /* Mobile image overflow prevention */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

  .header-top {
    min-height: 60px;
    height: 60px;
  }

  .header-container {
    width: 100%;
    max-width: none; /* No max-width for container on mobile */
    justify-content: space-between;
    position: relative;
    padding: 0 15px; /* Adjusted padding for mobile */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    max-width: calc(100% - 100px); /* Leave space for hamburger */
    order: 2; /* Move logo to center for mobile */
    font-size: 20px;
  }

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

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    min-height: 48px;
    padding: 0 15px; /* Match header-top padding */
    justify-content: center;
    align-items: center;
    gap: 10px;
  }

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

  .hamburger-menu {
    display: flex; /* Show hamburger menu on mobile */
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    width: 40px;
    height: 40px;
    order: 1; /* Place hamburger menu on left */
  }

  .main-nav {
    min-height: auto;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px; /* Width of the mobile menu */
    background-color: var(--card-bg);
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 60px; /* Space for fixed header-top */
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease;
    z-index: 1002;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

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

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

  .nav-link {
    width: 100%;
    padding: 12px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  .overlay.active {
    display: block;
  }

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    text-align: center;
    padding: 0 15px;
  }

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

  .footer-col h3::after {
    margin: 5px auto 0 auto;
  }

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

  .footer-col.footer-about .footer-logo {
    margin-bottom: 10px;
  }
}

/* Ensure mobile nav-links have enough contrast */
.main-nav .nav-link {
    color: var(--text-main);
}
.main-nav .nav-link:hover,
.main-nav .nav-link.active {
    color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.1);
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
