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

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

body.no-scroll {
  overflow: hidden;
}

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

a:hover {
  color: var(--secondary-color);
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  background-color: var(--bg-color); /* Fallback, specific colors for top/main nav */
}

.header-top {
  box-sizing: border-box;
  height: 68px; /* Desktop fixed height */
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #1A1A1A; /* Darker background for header-top */
  width: 100%;
  position: relative; /* For mobile logo positioning */
}

.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 content inside container */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--text-main);
  text-transform: uppercase;
  display: block; /* Ensure logo is visible */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px; /* Limit logo width */
}

.logo img {
  display: block;
  max-height: 60px; /* Desktop 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; /* Mobile fixed height */
  background-color: #1A1A1A; /* Same as header-top */
  width: 100%;
  padding: 0 15px; /* Adjust padding for mobile */
}

.main-nav {
  box-sizing: border-box;
  height: 52px; /* Desktop fixed height */
  display: flex; /* Desktop default: visible and flex */
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-color); /* Primary color for main nav */
  width: 100%;
  color: #333; /* Text color for main nav */
}

.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: #333; /* Dark text for primary nav */
  font-weight: bold;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevent wrapping */
  font-size: 16px; /* Default font size */
}

.nav-link:hover {
  color: white; /* Lighter on hover */
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  text-transform: uppercase;
  color: #333; /* Dark text for buttons */
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  text-decoration: none; /* Remove underline */
}

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

/* Hamburger menu for mobile */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  width: 30px;
  height: 24px;
  position: absolute; /* Position relative to header-top */
  left: 20px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 1001; /* Above header */
}

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

/* Hamburger menu active state (X icon) */
.hamburger-menu.active span:nth-child(1) {
  transform: translateY(10.5px) rotate(45deg);
}
.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-10.5px) rotate(-45deg);
}

/* Overlay for mobile menu */
.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;
}

.overlay.active {
  display: block;
}

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

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

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

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

.footer-description {
  color: var(--text-main);
  line-height: 1.8;
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

.footer-nav a {
  color: var(--text-main);
  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;
  border-top: 1px solid var(--border-color);
  color: var(--text-main);
}

.footer-bottom p {
  margin: 0;
}

/* Dynamic slot anchors */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure it takes up minimal space */
  width: 100%;
}

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

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

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

  /* Header mobile styles */
  .header-top {
    height: 60px; /* Mobile fixed height */
  }

  .header-container {
    padding: 0 15px; /* Adjust padding for mobile */
    justify-content: center; /* Center logo on mobile */
    position: relative; /* For absolute positioning of hamburger/logo */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger menu on mobile */
    left: 15px;
  }

  .logo {
    flex: 1 !important; /* Take available space */
    display: flex !important;
    justify-content: center !important; /* Center logo */
    align-items: center !important;
    max-width: calc(100% - 100px); /* Account for hamburger menu width */
    font-size: 24px;
    position: absolute; /* Absolute position for better centering */
    left: 50%;
    transform: translateX(-50%);
  }

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

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    min-height: 48px; /* Mobile fixed height */
    align-items: center;
    justify-content: center; /* Center buttons horizontally */
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px; /* Padding for mobile buttons container */
    overflow: hidden;
    gap: 10px; /* Gap between buttons */
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed; /* Fixed position for mobile menu */
    top: var(--header-offset); /* Start below header and mobile buttons */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Max width for menu */
    height: calc(100vh - var(--header-offset)); /* Full height below header */
    flex-direction: column; /* Vertical layout for mobile menu items */
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Initially off-screen */
    transition: transform 0.3s ease;
    background-color: var(--card-bg); /* Darker background for mobile menu */
    overflow-y: auto; /* Enable scrolling for long menus */
  }

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

  .nav-container {
    flex-direction: column; /* Vertical nav links */
    align-items: flex-start;
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0 20px;
    gap: 15px; /* Spacing between mobile nav links */
  }

  .nav-link {
    width: 100%;
    padding: 10px 0;
    color: var(--text-main); /* Lighter text for mobile menu */
    font-size: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-link:last-child {
      border-bottom: none;
  }

  /* Footer mobile styles */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
  }

  .footer-col:not(:last-child) {
    margin-bottom: 20px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
