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

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

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

/* Site Header - Fixed Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); /* Suspended effect */
  background-color: var(--background-color); /* Fallback, specific sections will override */
}

/* Header Top Section */
.header-top {
  box-sizing: border-box;
  min-height: 68px; /* Desktop fixed height */
  height: 68px; /* Desktop fixed height */
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--header-top-bg);
  width: 100%;
  padding: 0 20px; /* Padding for the top bar itself */
}

.header-container {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: 1200px; /* Desktop container max-width */
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex; /* For potential image logo alignment */
  align-items: center;
  height: 100%;
}

.logo img {
  display: block;
  max-height: 60px; /* Desktop logo max height */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001; /* Above header */
}

.hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-main-color);
  margin: 5px 0;
  transition: 0.4s;
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex; /* Always flex on desktop */
  gap: 12px;
  align-items: center;
}

/* Mobile Navigation Buttons - hidden by default on desktop */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop, shown on mobile */
  min-height: 48px; /* Mobile button bar height */
  background-color: var(--header-top-bg); /* Match header top */
  width: 100%;
}

/* Main Navigation Section */
.main-nav {
  box-sizing: border-box;
  min-height: 52px; /* Desktop fixed height */
  height: 52px; /* Desktop fixed height */
  display: flex; /* Desktop default: flex */
  align-items: center;
  overflow: hidden;
  background-color: var(--main-nav-bg);
  width: 100%;
}

.nav-container {
  box-sizing: border-box;
  height: 100%;
  max-width: 1200px; /* Desktop container max-width */
  margin: 0 auto;
  display: flex; /* Desktop default: flex */
  flex-direction: row; /* Desktop default: row */
  justify-content: center;
  align-items: center;
  padding: 0 20px; /* Padding for the nav container */
}

.nav-link {
  display: block;
  padding: 10px 15px;
  color: var(--text-main-color);
  font-weight: bold;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap; /* Keep links on one line */
}

.nav-link:hover {
  color: var(--primary-color);
  background-color: rgba(255, 255, 255, 0.05);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  color: #111; /* Dark text for light button gradient */
  background: var(--button-gradient);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  text-decoration: none; /* Remove underline */
  cursor: pointer;
  border: none; /* Ensure no default button border */
}

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

/* Overlay for mobile menu */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999; /* Below menu, above main content */
  display: none; /* Hidden by default */
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

/* Footer Styles */
.site-footer {
  background-color: var(--card-bg); /* Use Card BG for footer background */
  padding: 40px 20px 20px;
  color: var(--text-main-color);
  font-size: 14px;
}

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

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

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

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

.footer-description {
  line-height: 1.6;
  color: var(--text-main-color);
  word-wrap: break-word; /* Ensure description wraps */
  overflow-wrap: break-word;
}

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

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

.footer-nav a {
  color: var(--text-main-color);
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevent breaking menu items */
}

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

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

.footer-bottom p {
  margin: 0;
}

/* Dynamic slot anchors - ensure they are visible and don't hide content */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure it takes up minimal space */
}

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

  /* Header Top Section */
  .header-top {
    min-height: 60px !important; /* Mobile fixed height */
    height: 60px !important; /* Mobile fixed height */
    padding: 0 15px; /* Smaller padding for mobile */
  }

  .header-container {
    padding: 0; /* Remove padding here, header-top has 15px */
    max-width: none; /* No max-width on mobile */
    position: relative; /* Keep for potential absolute elements like logo */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 0; /* Leftmost */
    color: var(--text-main-color);
  }

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

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

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

  /* Mobile Logo Centering (Method 1: Flexbox) */
  .logo {
    flex: 1 !important; /* Allow logo to take space */
    display: flex !important;
    justify-content: center !important; /* Center the logo text/image */
    align-items: center !important;
    /* Reset any desktop absolute positioning or fixed widths */
    position: static !important;
    left: auto !important;
    transform: none !important;
    width: auto !important; /* Let flex control width */
    text-align: center; /* Fallback for text logo */
  }

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

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

  /* Mobile Navigation Buttons - always visible below header-top */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    align-items: center;
    justify-content: center; /* Center buttons horizontally */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px; /* Padding for the button container */
    overflow: hidden; /* Prevent overflow */
    gap: 10px; /* Space between buttons */
    flex-wrap: nowrap; /* Keep buttons on one line */
    background-color: var(--main-nav-bg); /* Use main nav bg for this bar */
  }

  .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 10px gap */
    box-sizing: border-box;
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Main Navigation Section - Mobile (hamburger menu content) */
  .main-nav {
    position: fixed; /* Fixed position for slide-in menu */
    top: var(--header-offset); /* Below the header and mobile buttons */
    left: 0;
    width: 70%; /* Slide-in from left */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background-color: var(--card-bg); /* Dark background for menu */
    flex-direction: column; /* Vertical links */
    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%); /* Hidden by default */
    transition: transform 0.3s ease;
    display: none; /* Hidden by default until active */
    overflow-y: auto; /* Allow scrolling if menu is long */
    z-index: 1000; /* Same as header, overlay is 999 */
  }

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

  .nav-container {
    flex-direction: column; /* Vertical links */
    padding: 0;
    width: 100%; /* Take full width of side menu */
    max-width: none; /* No max-width on mobile */
    align-items: flex-start;
  }

  .nav-link {
    width: 100%; /* Full width for menu items */
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
  }

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

  /* Footer Styles - Mobile */
  .site-footer {
    padding: 30px 15px 15px;
  }

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout on mobile */
    gap: 30px;
    margin-bottom: 20px;
  }

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

  .footer-logo {
    font-size: 22px;
  }

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

  /* Mobile Content Overflow Protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden; /* Ensure body also prevents horizontal scrolling */
  }
}

/* Ensure body scroll is managed for mobile menu */
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;
}
