:root {
  --header-offset: 122px;
  --color-primary: #F2C14E;
  --color-secondary: #FFD36B;
  --color-card-bg: #111111;
  --color-background: #0A0A0A;
  --color-text-main: #FFF6D6;
  --color-border: #3A2A12;
  --color-glow: #FFD36B;
  --button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
}

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

body.no-scroll {
  overflow: hidden;
}

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

.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(--color-card-bg); /* Default background for entire header */
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--color-primary);
  display: block; /* Ensure visibility */
}

.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;
  width: 100%;
  background-color: var(--color-card-bg); /* Match header-top background */
  padding: 0 20px; /* Add padding for desktop view, though hidden */
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--button-gradient);
  color: var(--color-text-main);
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

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

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-primary); /* Lighter 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;
  gap: 25px; /* Spacing between nav links */
}

.nav-link {
  color: var(--color-text-main);
  font-weight: bold;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: #FFFFFF;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-text-main);
  transition: width 0.3s ease;
}

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

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001; /* Above header */
}

.hamburger-menu::before,
.hamburger-menu::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 4px;
  background-color: var(--color-text-main);
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu::before {
  top: 0;
}

.hamburger-menu::after {
  bottom: 0;
}

.hamburger-menu.active::before {
  top: 10px;
  transform: rotate(45deg);
}

.hamburger-menu.active::after {
  bottom: 10px;
  transform: rotate(-45deg);
}

.hamburger-menu span {
  position: absolute;
  width: 100%;
  height: 4px;
  background-color: var(--color-text-main);
  left: 0;
  top: 10px;
  transition: all 0.3s ease;
}

.hamburger-menu.active span {
  opacity: 0;
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
}

.site-footer {
  background-color: var(--color-card-bg);
  padding: 40px 20px 20px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-main);
}

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

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

.footer-col p {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

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

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

.footer-bottom {
  text-align: center;
  font-size: 13px;
  color: #AAAAAA;
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--color-border);
  padding-top: 20px;
}

.footer-bottom p {
  margin: 0;
}

/* Dynamic slot anchors */
.footer-slot-anchor, .footer-slot-anchor-inner {
  min-height: 1px; /* Ensure element exists for injection */
}

/* Mobile styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px;
  }

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

  .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 {
    min-height: 60px !important;
    height: 60px !important;
    position: relative; /* Needed for logo absolute positioning */
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
    justify-content: space-between; /* Hamburger left, Logo center handled by flex property */
  }

  .logo {
    flex: 1 !important; /* Allow logo to take available space */
    display: flex !important;
    justify-content: center !important; /* Center logo */
    align-items: center !important;
    position: absolute; /* Absolute positioning for logo to center it */
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Adjust max-width to not overlap hamburger/buttons if they were visible */
  }

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

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

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    justify-content: center; /* Center buttons horizontally */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--color-card-bg); /* Match header-top background */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Small shadow to separate from main-nav */
  }

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

  .hamburger-menu {
    display: block;
    order: -1; /* Place hamburger menu to the left */
  }
  
  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 250px; /* Width of the mobile menu */
    height: calc(100vh - var(--header-offset));
    background-color: var(--color-card-bg); /* Darker background for mobile menu */
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Enable scrolling for long menus */
    box-sizing: border-box;
  }

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

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

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
  }
  .nav-link:last-child {
      border-bottom: none;
  }
  .nav-link::after {
      display: none; /* Hide underline effect on mobile */
  }

  .overlay.active {
    display: block;
  }

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

  .footer-col {
    text-align: center;
  }
  .footer-col h3 {
      text-align: center;
  }
  .footer-nav {
      text-align: 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;
  }
}
