:root {
  --header-offset: 122px;
  --color-main: #FF8C1A;
  --color-auxiliary: #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 */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Ensure main content takes available space */
main {
  flex-grow: 1;
}

/* Common container styles */
.header-container, .nav-container, .footer-top-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
  width: 100%;
}

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

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

.header-top .header-container {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--color-text-main);
  text-decoration: none;
  display: block;
  line-height: 1;
  padding: 5px 0;
}

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

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  position: relative;
}

.hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--color-text-main);
  margin: 5px 0;
  transition: 0.4s;
}

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

/* Mobile Nav Buttons - Hidden by default on desktop */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Will be overridden by media query for mobile */
  min-height: 48px;
  background-color: var(--color-card-bg);
  width: 100%;
  padding: 10px 20px;
}

/* Main Navigation Bar */
.main-nav {
  background-color: var(--color-main); /* Lighter shade, contrasts with header-top */
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
}

.main-nav .nav-container {
  height: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 25px;
  padding: 0 20px;
}

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

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

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

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

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

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}

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

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

.footer-description {
  line-height: 1.6;
  color: #CCC;
  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: #CCC;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

/* Footer slot anchors - must be visible */
.footer-slot-anchor-inner, .footer-slot-anchor-outer {
  min-height: 1px;
  min-width: 1px;
  display: block;
}

/* Mobile Styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px;
  }

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

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .header-top .header-container {
    width: 100%;
    max-width: none;
    padding: 0;
    justify-content: space-between;
  }

  .hamburger-menu {
    display: block;
    order: -1; /* Place to the far left */
    margin-right: auto;
  }

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

  /* Mobile Logo Centering (Method 1: Flexbox) */
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0;
    font-size: 24px;
  }
  .logo img {
    max-height: 56px !important;
    max-width: 100%;
  }

  .desktop-nav-buttons {
    display: none !important;
  }

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--color-card-bg); /* Match footer/card background */
  }

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

  .main-nav {
    min-height: 48px !important;
    height: auto; /* Allow content to dictate height, will be full height of viewport */
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 80%; /* Sidebar width */
    max-width: 300px;
    height: calc(100% - var(--header-offset));
    flex-direction: column;
    justify-content: flex-start;
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease-in-out;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    display: none; /* Must be none for initial hide */
    padding-top: 20px;
    align-items: flex-start; /* Align menu items to left */
    background-color: var(--color-main); /* Menu background */
  }

  .main-nav.active {
    transform: translateX(0);
    display: flex; /* Display when active */
  }

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: none;
    padding: 0 20px;
    gap: 15px;
  }

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

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

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

  .mobile-menu-overlay.active {
    visibility: visible;
    opacity: 1;
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

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

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

  .footer-nav li {
    display: inline-block;
    margin: 0 10px 8px;
  }
  .footer-nav li:last-child {
    margin-bottom: 0;
  }
}

/* Ensure color contrast for text */
/* WCAG AA contrast for #FFF3E6 (Text Main) on various backgrounds */
/* on #D96800 (Deep Orange/header-top): ~6.1:1 */
/* on #FF8C1A (Main/main-nav): ~5.6:1 */
/* on #17191F (Card BG/footer): ~12.9:1 */
/* on #0D0E12 (Background): ~13.8:1 */
/* All pass AA (4.5:1) and some AAA (7:1) */
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
