:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) = 120px + 2px buffer */
  --color-main: #FF8C1A;
  --color-aux: #FFA53A;
  --color-button-gradient: linear-gradient(180deg, #FFA53A 0%, #D96800 100%);
  --color-card-bg: #17191F;
  --color-background: #0D0E12;
  --color-text-main: #FFF3E6;
  --color-border: #A84F0C;
  --color-glow: #FFB04D;
  --color-deep-orange: #D96800;
}

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

/* Global Box Sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 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.2);
  background-color: var(--color-background); /* Default background for fixed header */
}

/* Header Top Bar */
.header-top {
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-deep-orange); /* Distinct color for top bar */
  width: 100%;
  padding: 0 20px; /* Outer padding for the entire header-top */
}

.header-container {
  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(--color-text-main);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block; /* Ensure it's block for proper alignment */
}
.logo img { /* If logo is an image */
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

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

/* Hamburger Menu (Hidden by default on desktop) */
.hamburger-menu {
  display: none;
  width: 30px;
  height: 24px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 1001; /* Above header */
}

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

/* Main Navigation Bar */
.main-nav {
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-main); /* Distinct color for main nav */
  width: 100%;
  padding: 0 20px; /* Outer padding for the entire main-nav */
}

.nav-container {
  width: 100%;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 25px;
}

.nav-list a {
  color: var(--color-text-main);
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  padding: 10px 0;
  position: relative;
  transition: color 0.3s ease;
}

.nav-list a:hover {
  color: var(--color-aux);
}

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

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

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

.btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4), 0 0 15px var(--color-glow);
}

/* Mobile Navigation Buttons (Hidden by default on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop, will be shown via media query */
  min-height: 48px; /* Fixed height for mobile */
  background-color: var(--color-card-bg); /* A different background for this section */
  width: 100%;
  max-width: 100%;
  padding: 0 15px; /* Inner padding for mobile buttons */
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
}

/* Footer */
.site-footer {
  background-color: var(--color-card-bg);
  padding: 40px 20px 20px;
  color: var(--color-text-main);
  font-size: 14px;
  line-height: 1.6;
}

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

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

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

.footer-description {
  margin: 0 0 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: rgba(255, 243, 230, 0.8);
}

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

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

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

.footer-nav a {
  color: rgba(255, 243, 230, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  margin-top: 30px;
  color: rgba(255, 243, 230, 0.6);
}

/* Dynamic Slot Anchor visibility */
.footer-slot-anchor-inner {
  /* This container must remain visible for content injection */
  min-height: 1px; /* Ensure it takes up minimal space if empty */
}

/* Mobile Styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: 60px (header-top) + 48px (mobile-nav-buttons) + 48px (main-nav when active, but main-nav is hidden by default) = 108px + 2px buffer. This value accounts for header-top and mobile-nav-buttons */
  }

  body {
    overflow-x: hidden;
  }

  .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.2);
  }

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

  .header-container {
    width: 100%;
    max-width: none; /* Remove max-width on mobile */
    padding: 0; /* Remove padding from container, handled by header-top */
    justify-content: space-between; /* Keep logo centered, hamburger left */
    position: relative; /* For absolute positioning of logo if needed */
  }

  /* Mobile Logo Centering (Method 1: Flexbox) */
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px; /* Adjust font size for mobile */
  }
  .logo img {
    max-height: 56px !important; /* Adjust image max-height for mobile */
  }

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

  .hamburger-menu {
    display: flex; /* Show hamburger menu on mobile */
    order: -1; /* Place hamburger to the left */
    margin-right: auto; /* Push logo to center */
    z-index: 1002; /* Ensure hamburger is clickable */
  }

  .hamburger-menu.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
  }
  .hamburger-menu.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu.active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
  }

  /* Mobile Navigation Buttons */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    background-color: var(--color-card-bg);
    width: 100%; max-width: 100%;
    padding: 0 15px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
  }
  .mobile-nav-buttons .btn {
    flex: 1; min-width: 0;
    max-width: calc(50% - 5px); /* 50% minus half of gap */
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Main Navigation Bar Mobile (Hidden by default, slides in) */
  .main-nav {
    position: fixed;
    top: calc(60px + 48px); /* Position below header-top (60px) and mobile-nav-buttons (48px) */
    left: 0;
    width: 280px; /* Width of the mobile menu */
    height: calc(100% - (60px + 48px)); /* Full height minus header-top and mobile-nav-buttons */
    background-color: var(--color-card-bg); /* Mobile menu background */
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease-out;
    z-index: 999; /* Below hamburger, above content */
    display: none; /* Hidden by default */
    overflow-y: auto; /* Allow scrolling for long menus */
  }

  .main-nav.active {
    transform: translateX(0); /* Show menu */
    display: flex; /* Ensure it's displayed when active */
  }

  .nav-container {
    width: 100%;
    max-width: none; /* Remove max-width on mobile */
    padding: 0;
  }

  .nav-list {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .nav-list li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 243, 230, 0.1);
  }

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

  .nav-list a {
    display: block;
    padding: 15px 10px;
    font-size: 16px;
    width: 100%;
  }

  /* Overlay for mobile menu */
  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
  }

  .overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* Footer Mobile */
  .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-logo {
    margin-bottom: 10px;
  }
  .footer-nav {
    width: 100%;
  }
  .footer-nav li {
    margin-bottom: 5px;
  }
  .footer-bottom {
    padding-top: 15px;
    margin-top: 20px;
  }
}

/* No-scroll class for body when mobile menu is open */
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;
}
