:root {
  --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;

  /* Header offset for desktop (68px + 52px = 120px + 2px buffer) */
  --header-offset: 122px;
}

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

/* --- 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.5);
  box-sizing: border-box;
}

/* Header Top Area */
.header-top {
  background-color: var(--color-background); /* Distinct from main-nav */
  min-height: 68px;
  height: 68px; /* Fixed height for desktop */
  display: flex;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}

.header-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  position: relative; /* For absolute positioning of hamburger */
}

.logo {
  color: var(--color-primary);
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  display: flex; /* For potential image logo centering or alignment */
  align-items: center;
  height: 100%;
}

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

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

/* Mobile Nav Buttons (hidden by default on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px; /* Placeholder height */
  background-color: var(--color-background); /* Matches header-top */
  width: 100%;
}

/* Main Navigation Area */
.main-nav {
  background-color: var(--color-card-bg); /* Distinct from header-top */
  min-height: 52px;
  height: 52px; /* Fixed height for desktop */
  display: flex; /* Visible on desktop */
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}

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

.nav-link {
  color: var(--color-text-main);
  text-decoration: none;
  padding: 10px 15px;
  white-space: nowrap;
  transition: color 0.3s ease, background-color 0.3s ease;
  font-size: 15px;
  font-weight: 500;
}

.nav-link:hover, .nav-link.active {
  color: var(--color-primary);
  background-color: rgba(255, 140, 26, 0.1);
  border-radius: 4px;
}

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

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

/* Hamburger Menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1002;
}

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

.hamburger-menu span:last-child {
  margin-bottom: 0;
}

/* Hamburger active state (X icon) */
.hamburger-menu.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-8px) 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;
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

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

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

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

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

.footer-col .footer-description {
  margin: 0;
  color: var(--color-text-main);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

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

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

.footer-bottom p {
  margin: 0;
}

/* Dynamic slot anchors - must be visible */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure it takes up space even if empty */
}

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

  body {
    overflow-x: hidden; /* Prevent horizontal scrolling */
  }

  /* Page content images to prevent overflow */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

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

  .header-container {
    width: 100%;
    max-width: none; /* Remove max-width for mobile */
    padding: 0; /* Hamburger and logo have own positioning/padding */
    justify-content: center; /* Center logo by default */
    position: relative; /* For absolute positioning of hamburger */
  }

  /* Image LOGO centering for mobile */
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 100%;
  }
  .logo img {
    max-height: 56px !important; /* Max height for mobile logo */
    max-width: 100%;
    height: auto;
  }

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

  /* Mobile Nav Buttons (visible on mobile) */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    min-height: 48px;
    align-items: center;
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px; padding-right: 15px;
    overflow: hidden; /* Prevent button overflow */
    gap: 10px;
    flex-wrap: nowrap; /* Keep buttons on one line */
    justify-content: center; /* Center buttons if less than 2 */
    background-color: var(--color-background); /* Matches header-top */
  }

  .mobile-nav-buttons .btn {
    flex: 1; min-width: 0; /* Distribute space evenly */
    max-width: calc(50% - 5px); /* Account for gap */
    box-sizing: border-box;
    padding: 8px 12px; /* Smaller padding for mobile buttons */
    font-size: 13px; /* Smaller font size for mobile buttons */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
  }

  /* Main Navigation Area (mobile) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header/buttons */
    left: 0;
    width: 75%; /* Slide-in menu width */
    height: calc(100vh - var(--header-offset)); /* Full height below header */
    flex-direction: column; /* Vertical menu items */
    align-items: flex-start;
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    background-color: var(--color-card-bg); /* Menu background */
    padding: 20px 0;
    box-sizing: border-box;
    z-index: 1001; /* Above overlay, below hamburger */
  }

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

  .nav-container {
    width: 100%;
    max-width: none; /* Remove max-width for mobile */
    flex-direction: column;
    align-items: flex-start;
    padding: 0 15px; /* Padding for menu items */
    height: auto; /* Allow content to define height */
  }

  .nav-link {
    width: 100%;
    padding: 12px 0;
    text-align: left;
    font-size: 16px;
  }

  /* Hamburger Menu (visible on mobile) */
  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
  }

  /* Footer mobile adjustments */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout for mobile */
    gap: 20px;
    padding: 0 15px;
  }

  .footer-col h3 {
    font-size: 16px;
  }

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

  .footer-bottom {
    padding: 15px 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;
}
