:root {
  --color-primary: #FF8C1A;
  --color-secondary: #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: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) */
}

/* Base Styles */
body {
  margin: 0;
  padding-top: var(--header-offset);
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  background-color: var(--color-background);
  color: var(--color-text-main);
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

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

/* Header Styles */
.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);
  background-color: var(--color-background); /* Fallback, specific sections will override */
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-card-bg); /* Distinct from main-nav */
  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-left: 20px;
  padding-right: 20px;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--color-primary);
  text-transform: uppercase;
  display: flex; /* For potential image logo alignment */
  align-items: center;
  height: 100%;
}
.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

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

/* Mobile specific elements - hidden by default on desktop */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 1001; /* Above header-top */
}

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

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

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop, will be flex on mobile */
  min-height: 48px; /* Fixed height for mobile buttons area */
  width: 100%;
  background-color: var(--color-card-bg); /* Same as header-top for consistency */
  padding: 8px 20px;
  gap: 10px;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop default */
  align-items: center;
  overflow: hidden;
  background-color: var(--color-primary); /* Distinct from header-top */
  width: 100%;
}

.nav-container {
  box-sizing: border-box;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row; /* Desktop default */
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  gap: 25px; /* Spacing between nav links */
}

.nav-link {
  color: var(--color-text-main);
  font-weight: bold;
  padding: 5px 0;
  white-space: nowrap;
  transition: color 0.3s ease;
}

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

.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(--color-card-bg);
  padding: 40px 0 20px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text-main);
}

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

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

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

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

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

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

.footer-bottom p {
  margin: 0;
}

/* Dynamic Slot Anchor Styles (must be visible) */
.footer-slot-anchor-outer, .footer-slot-anchor-inner {
  min-height: 1px; /* Smallest possible height if empty */
  width: 100%;
  box-sizing: border-box;
}

/* Responsive Styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: 60px (header-top) + 48px (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%;
  }

  /* Mobile Header Adjustments */
  .header-top {
    min-height: 60px;
    height: 60px;
    padding-left: 15px; /* Space for hamburger menu */
  }
  .header-container {
    width: 100%;
    max-width: none;
    padding-left: 0;
    padding-right: 15px;
    position: relative;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 100%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Leave space for hamburger */
  }
  .logo img {
    max-height: 56px !important;
  }

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

  .hamburger-menu {
    display: flex !important; /* Show hamburger on mobile */
    position: relative;
    z-index: 1001;
  }

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    min-height: 48px;
    padding: 8px 15px; /* Adjust padding for mobile */
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
  }
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Max width for two buttons with 10px gap */
    box-sizing: border-box;
    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;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 80%; /* Sidebar width */
    max-width: 300px; /* Max width for sidebar */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--color-card-bg); /* Sidebar background */
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease-in-out;
    z-index: 1001; /* Above overlay */
    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;
    padding: 0;
    gap: 15px;
    align-items: flex-start;
    width: 100%;
    height: auto;
    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;
  }

  /* Mobile Footer Adjustments */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout for mobile */
    padding: 0 15px;
  }
  .footer-col {
    margin-bottom: 20px;
  }
  .footer-bottom {
    padding: 15px;
  }
}

/* Body no-scroll class for mobile menu */
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;
  }
}
