:root {
  --primary-color: #FF8C1A;
  --accent-color: #FFA53A;
  --button-gradient: linear-gradient(180deg, #FFA53A 0%, #D96800 100%);
  --card-bg: #17191F;
  --background-color: #0D0E12;
  --text-main-color: #FFF3E6;
  --border-color: #A84F0C;
  --glow-color: #FFB04D;
  --deep-orange-color: #D96800;

  --header-offset: 122px; /* Desktop: header-top (68px) + main-nav (52px) */
}

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

/* Site Header - Fixed Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  background-color: var(--background-color); /* Main background for entire header */
}

/* Header Top Bar */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--card-bg); /* Different background from main-nav */
  width: 100%;
  padding: 0 20px; /* Default padding 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;
}

/* Logo */
.logo, .footer-logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  height: 100%; /* Ensure logo text aligns with container height */
}

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

/* Mobile Navigation Buttons (hidden by default on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px; /* Fixed height for mobile */
  background-color: var(--background-color); /* Matches main-nav for mobile */
  width: 100%;
  padding: 0 20px; /* Default padding for desktop, adjusted in mobile */
  justify-content: center; /* Center buttons horizontally */
  align-items: center;
}

/* Main Navigation Bar */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop default: visible */
  align-items: center;
  overflow: hidden;
  background-color: var(--background-color); /* Different background from header-top */
  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(--text-main-color);
  text-decoration: none;
  font-size: 16px;
  padding: 10px 0;
  white-space: nowrap;
  transition: color 0.3s ease;
}

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

/* Hamburger Menu (hidden by default on desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001; /* Above header elements */
}

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

/* Hamburger menu active state (X icon) */
.hamburger-menu.active span:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}
.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-11px) 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; /* Below mobile menu, above content */
}

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

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

/* Footer */
.site-footer {
  background-color: var(--background-color);
  color: var(--text-main-color);
  padding: 40px 20px 20px;
}

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

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

.footer-about .footer-logo {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
}

.footer-description {
  line-height: 1.6;
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-heading {
  font-size: 18px;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: bold;
}

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

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

.footer-nav a {
  color: var(--text-main-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--accent-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-color);
}

.footer-bottom p {
  margin: 0;
}

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

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

  body {
    padding-top: var(--header-offset);
    overflow-x: hidden; /* Ensure body itself doesn't scroll horizontally */
  }

  /* 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;
  }

  /* Header Top Bar */
  .header-top {
    min-height: 60px;
    height: 60px;
    padding: 0 15px;
    justify-content: space-between; /* Hamburger left, Logo center, empty space right */
  }

  .header-container {
    padding: 0; /* Remove container padding as header-top has it */
    justify-content: space-between;
    max-width: none; /* Mobile container fills width */
  }

  /* Logo Centering on Mobile */
  .logo {
    flex: 1 !important; /* Allow logo to take available space */
    display: flex !important;
    justify-content: center !important; /* Center the logo text/image */
    align-items: center !important;
    font-size: 24px;
    position: absolute; /* Absolute positioning for precise centering */
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Leave space for hamburger */
    height: 100%;
  }

  /* Desktop Buttons (hidden on mobile) */
  .desktop-nav-buttons {
    display: none !important;
  }

  /* Mobile Buttons (visible on mobile) */
  .mobile-nav-buttons {
    display: flex !important; /* Visible on mobile */
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    justify-content: center;
    align-items: center;
    min-height: 48px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    gap: 10px;
    overflow: hidden;
    z-index: 999; /* Below main nav, above header-top */
  }

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

  /* Main Navigation Bar (mobile - slide-out menu) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header (header-top + mobile-nav-buttons) */
    left: 0;
    width: 80%; /* Slide-out menu width */
    max-width: 300px; /* Max width for consistency */
    height: auto; /* Allow height to adjust to content if not full screen */
    max-height: calc(100vh - var(--header-offset)); /* Limit height to viewport */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Off-screen initially */
    transition: transform 0.3s ease-in-out;
    z-index: 1001; /* Above overlay and other header elements */
    background-color: var(--background-color);
    overflow-y: auto; /* Allow scrolling for long menus */
  }

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

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

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-link:last-child {
      border-bottom: none;
  }

  /* Hamburger Menu (visible on mobile) */
  .hamburger-menu {
    display: flex;
    position: relative; /* To be clickable */
    z-index: 1002; /* Ensure it's above the logo for clickability */
    margin-right: auto; /* Push logo to center */
  }

  /* Overlay active state */
  .overlay.active {
    display: block;
  }
  
  /* Footer */
  .site-footer {
    padding: 30px 15px 15px;
  }

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

  .footer-col {
    align-items: center;
    text-align: center;
  }

  .footer-nav {
    width: 100%;
  }

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

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