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

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

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

/* Site Header - Fixed position and general styling */
.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); /* Suspended effect */
  background-color: var(--background-color); /* Fallback, should be overridden by header-top/main-nav */
}

/* Header Top Section */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--background-color); /* Darker background */
  width: 100%;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px; /* Limit logo width */
  display: block;
}
.logo img {
  display: block;
  max-height: 60px; /* Max height for image logo */
  height: auto;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--button-gradient);
  color: var(--text-main);
  font-weight: bold;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

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

/* Mobile Nav Buttons - Hidden by default on desktop */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px;
  width: 100%;
  background-color: var(--card-bg); /* Use card-bg for mobile button bar */
  padding: 8px 15px;
  gap: 10px;
  overflow: hidden;
  flex-wrap: nowrap;
}

/* Main Navigation Section */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop: visible and flex */
  align-items: center;
  overflow: hidden;
  background-color: var(--card-bg); /* Lighter background than header-top */
  width: 100%;
  transition: transform 0.3s ease;
}

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

.nav-link {
  display: block;
  padding: 10px 15px;
  color: var(--text-main);
  font-size: 15px;
  font-weight: 500;
  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 on desktop */
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 1001;
  padding: 0;
  margin-left: 20px; /* Add some space from logo */
}

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

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

/* Hamburger menu active state */
.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;
}

.overlay.active {
  display: block;
}

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

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

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

.footer-logo {
  font-size: 20px;
  font-weight: bold;
  color: var(--text-main);
  display: block;
  margin-bottom: 15px;
}

.footer-description {
  line-height: 1.6;
  color: var(--text-main);
  word-wrap: break-word;
  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(--accent-color);
}

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

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

/* Footer slot anchors - must be present but empty */
.footer-slot-anchor, .footer-slot-anchor-inner {
  min-height: 1px;
  visibility: hidden;
  height: 0;
  overflow: hidden;
  position: relative;
}
.footer-slot-anchor-inner > * {
    visibility: visible;
    height: auto;
    overflow: visible;
}
.footer-slot-anchor > * {
    visibility: visible;
    height: auto;
    overflow: visible;
}


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

  /* Header Top Mobile */
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
  }

  .header-container {
    padding: 0 15px;
    justify-content: space-between; /* Hamburger left, Logo center */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    max-width: calc(100% - 60px); /* Adjust for hamburger width */
    font-size: 20px;
  }
  .logo img {
    max-height: 56px !important; /* Adjust for mobile header height */
  }

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

  .hamburger-menu {
    display: block;
    order: -1;
    margin-left: 0;
  }

  /* Mobile Nav Buttons - Show on mobile */
  .mobile-nav-buttons {
    display: flex !important; /* Show on mobile */
    align-items: center;
    justify-content: center;
    min-height: 48px;
    height: 48px; /* Fixed height for mobile button bar */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    gap: 10px;
    background-color: var(--card-bg);
  }

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

  /* Main Navigation Mobile */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below header and mobile buttons */
    left: 0;
    height: calc(100vh - var(--header-offset)); /* Full height below header */
    width: 280px; /* Sidebar width */
    background-color: var(--background-color);
    transform: translateX(-100%); /* Slide out to the left */
    overflow-y: auto; /* Enable scrolling for long menus */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
  }

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

  .nav-container {
    flex-direction: column; /* Vertical menu items */
    align-items: flex-start;
    padding: 20px 15px;
    height: auto;
  }

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

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

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

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

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

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