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

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

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

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

/* --- Site Header --- */
.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(--card-bg); /* Fallback, actual sections have specific colors */
  box-sizing: border-box;
}

.header-top {
  box-sizing: border-box;
  min-height: 68px; /* Desktop fixed height */
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--card-bg); /* Darker background for header-top */
  width: 100%;
  padding: 0; /* Handled by header-container for desktop */
}

.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 logo and buttons on desktop */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  display: block; /* Ensure logo is visible and takes up space */
  line-height: 1;
}

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

.desktop-nav-buttons {
  display: flex; /* Desktop default: show buttons */
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  color: var(--text-main);
  background: var(--button-gradient);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none; /* Remove underline for button links */
  box-sizing: border-box;
  white-space: nowrap; /* Prevent buttons from wrapping by default */
}

.btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 10px var(--glow-color);
}

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

.hamburger-menu .bar {
  width: 100%;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu .bar:nth-child(1) { top: 0; }
.hamburger-menu .bar:nth-child(2) { top: 10px; }
.hamburger-menu .bar:nth-child(3) { top: 20px; }

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

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px; /* Mobile fixed height for buttons */
  background-color: var(--card-bg); /* Same as header-top for consistency */
  width: 100%;
  padding: 0 15px; /* Mobile padding */
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px; /* Desktop fixed height */
  height: 52px;
  display: flex; /* Desktop default: show menu */
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-color); /* Primary color 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: #0A0A0A; /* Contrast with primary color background */
  font-weight: bold;
  padding: 5px 0;
  transition: color 0.3s ease;
  font-size: 15px;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-main);
}

.mobile-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 menu, above body */
}

/* --- Site Footer --- */
.site-footer {
  background-color: var(--card-bg); /* Footer background */
  color: var(--text-main);
  padding: 40px 0 10px;
  font-size: 14px;
  box-sizing: border-box;
}

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

.footer-col h3 {
  color: var(--secondary-color);
  font-size: 16px;
  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;
}

.footer-description {
  color: var(--text-main);
  line-height: 1.6;
  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);
  transition: color 0.3s ease;
}

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

.footer-slot-anchor-inner {
  min-height: 10px; /* Give it some minimal height to be visible for layout */
  width: 100%;
  box-sizing: border-box;
}

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

.footer-bottom p {
  margin: 0;
}

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

  body {
    padding-top: var(--header-offset);
    overflow-x: hidden; /* Ensure body prevents horizontal scroll */
  }

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

  .site-header {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  }

  .header-top {
    min-height: 60px !important; /* Mobile fixed height */
    height: 60px !important;
    padding: 0 15px; /* Smaller padding for mobile */
    justify-content: space-between; /* Space out hamburger, logo, empty space */
  }

  .header-container {
    width: 100%;
    max-width: none; /* No max-width on mobile container */
    padding: 0; /* Remove padding from container on mobile, handled by header-top */
    position: relative; /* For absolute logo centering */
  }

  .logo {
    flex: 1 !important; /* Take available space */
    display: flex !important;
    justify-content: center !important; /* Center logo */
    align-items: center !important;
    font-size: 24px;
    position: absolute; /* Absolute positioning for precise centering */
    left: 50%;
    transform: translateX(-50%);
    height: 100%; /* Ensure it's vertically centered too */
    max-width: calc(100% - 100px); /* Leave space for hamburger */
  }

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

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

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    order: -1; /* Place to the left */
    width: 40px;
    height: 40px;
    padding: 0;
    z-index: 1001; /* Ensure it's clickable above logo */
  }

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    width: 100%;
    max-width: 100%;
    padding: 8px 15px; /* Adjusted padding */
    gap: 10px;
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
  }

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

  .main-nav {
    min-height: auto; /* Dynamic height for mobile menu */
    height: auto;
    position: fixed; /* Fixed position for off-screen menu */
    top: var(--header-offset); /* Start below fixed header */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px;
    background-color: var(--card-bg); /* Menu background */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px 0;
    transform: translateX(-100%); /* Hidden off-screen by default */
    transition: transform 0.3s ease;
    z-index: 1001; /* Above overlay */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    display: none; /* Hide by default, JS toggles 'display: flex' */
  }

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

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

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main); /* Ensure visibility on card-bg */
    font-size: 16px;
  }

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

  .mobile-overlay.active {
    display: block; /* Show overlay when menu is active */
  }

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

  .footer-col {
    margin-bottom: 20px;
  }

  .footer-col:last-of-type {
    margin-bottom: 0;
  }

  .footer-bottom {
    padding: 10px 15px 0;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
