:root {
  --header-offset: 122px; /* Desktop: header-top (68px) + main-nav (52px) */
  --color-primary: #FF8C1A;
  --color-accent: #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); /* Fixed header offset */
  background-color: var(--color-background);
  color: var(--color-text-main);
  overflow-x: hidden; /* Prevent body overflow on mobile */
}

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

a:hover {
  text-decoration: underline;
}

/* --- Site Header --- */
.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.3); /* Suspended effect */
  background-color: var(--color-background); /* Default background, will be overridden by header-top/main-nav */
  box-sizing: border-box;
  overflow-x: hidden; /* Prevent header overflow on mobile */
}

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

.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(--color-primary);
  text-decoration: none;
  display: block; /* Ensure logo is visible */
  line-height: 1; /* Align text logo */
  white-space: nowrap; /* Prevent text logo from wrapping */
}

/* Image Logo styles (if used) */
.logo img {
  display: block;
  max-height: 60px; /* Fixed height for image logo desktop */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

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

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

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px; /* Fixed height desktop */
  display: flex; /* Visible on desktop */
  align-items: center;
  overflow: hidden;
  background-color: var(--color-primary); /* Lighter background for main nav */
  width: 100%;
}

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

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 25px; /* Spacing between menu items */
}

.main-nav a {
  color: var(--color-text-main);
  font-weight: bold;
  font-size: 16px;
  padding: 10px 0;
  display: block;
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevent menu items from wrapping */
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--color-accent);
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--color-button-gradient);
  color: var(--color-text-main); /* Ensure text is visible */
  border: none;
  outline: none;
  min-width: 80px; /* Ensure button has some minimum width */
  text-align: center;
  box-sizing: border-box;
}

.btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 15px var(--color-glow); /* Glow effect */
  text-decoration: none;
}

/* Hamburger menu for mobile */
.hamburger-menu {
  display: none; /* Hidden 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 */
}

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

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

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

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

.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 content */
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

body.no-scroll {
  overflow: hidden;
}

/* --- Site 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(4, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto 30px;
}

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

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

.footer-description {
  margin-bottom: 15px;
  color: var(--color-text-main);
  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(--color-text-main);
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-main);
}

.footer-bottom p {
  margin: 0;
  color: var(--color-text-main);
}

/* Dynamic Slot Anchor Styling (ensure visibility) */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure anchor is not completely collapsed if empty */
  width: 100%;
}

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

  /* Header adjustments */
  .header-top {
    min-height: 60px;
    height: 60px; /* Fixed height mobile */
    padding: 0 15px; /* Smaller mobile padding */
    justify-content: space-between; /* Space between hamburger and logo */
  }

  .header-container {
    width: 100%;
    max-width: none; /* Full width on mobile */
    padding: 0; /* No padding on container itself, handled by header-top */
    position: relative; /* For logo absolute positioning if needed */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px; /* Adjust logo size for mobile */
    max-width: calc(100% - 100px); /* Leave space for hamburger */
    text-align: center; /* For text logo */
  }

  .logo img {
    max-height: 56px !important; /* Fixed height for image logo mobile */
    max-width: 100%;
    height: auto;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    height: auto; /* Allow content to dictate height, but min-height ensures space */
    padding: 8px 15px;
    background-color: var(--color-card-bg); /* Match header-top */
    border-top: 1px solid var(--color-border);
    flex-wrap: nowrap; /* Ensure buttons stay on one line */
  }

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

  .hamburger-menu {
    display: flex; /* Show hamburger menu on mobile */
    position: absolute; /* Position hamburger menu */
    left: 15px; /* Align to the left of the header-top */
    top: 50%;
    transform: translateY(-50%);
    width: 25px; /* Adjust size */
    height: 20px;
  }
  .hamburger-menu.active {
    position: fixed; /* Keep hamburger fixed when menu is open */
    left: 15px;
    top: 20px; /* Adjust position when active */
    transform: none;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical menu on mobile */
    position: fixed; /* Fixed position for mobile menu */
    top: 0;
    left: 0;
    width: 280px; /* Width of mobile menu */
    height: 100%;
    background-color: var(--color-card-bg); /* Menu background */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease;
    z-index: 1001; /* Above header */
    padding-top: 80px; /* Space for fixed header content */
    overflow-y: auto; /* Allow scrolling for long menus */
    box-sizing: border-box;
  }

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

  .nav-container {
    flex-direction: column; /* Vertical list */
    align-items: flex-start; /* Align items to the left */
    padding: 0 20px;
    width: 100%;
    max-width: none; /* Full width on mobile */
  }

  .main-nav ul {
    flex-direction: column;
    width: 100%;
    gap: 0; /* No gap between vertical menu items */
  }

  .main-nav li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Separator */
  }

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

  .main-nav a {
    padding: 15px 0;
    font-size: 16px;
    white-space: normal; /* Allow text to wrap if needed */
  }

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

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

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

  .footer-col h3 {
    margin-top: 20px;
  }

  .footer-nav {
    text-align: center;
  }

  /* 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;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
