html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Arial', sans-serif; background-color: #0D0E12; color: #FFF3E6; padding-top: var(--header-offset); }
:root { --header-offset: 122px; --primary-color: #FF8C1A; --secondary-color: #FFA53A; --card-bg: #17191F; --background-color: #0D0E12; --text-main: #FFF3E6; --border-color: #A84F0C; --glow-color: #FFB04D; --deep-orange: #D96800; }

/* Shared Container Styles */
.header-container, .nav-container, .footer-top-grid, .footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px; /* Default desktop padding */
  padding-right: 20px; /* Default desktop padding */
  box-sizing: border-box;
}

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  background-color: var(--background-color); /* Fallback, specific colors for header-top and main-nav */
}

.header-top {
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  background-color: var(--card-bg); /* Darker background for header-top */
  border-bottom: 1px solid var(--border-color);
}

.header-top .header-container {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 20px; /* Desktop padding */
  padding-right: 20px; /* Desktop padding */
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-main);
  text-decoration: none;
  white-space: nowrap;
  display: flex; /* For potential image logo alignment */
  align-items: center;
}
.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

.desktop-nav-buttons {
  display: flex;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 25px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: bold;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.btn-primary {
  background: linear-gradient(180deg, var(--secondary-color) 0%, var(--deep-orange) 100%);
}

.btn-primary:hover {
  background: linear-gradient(180deg, var(--glow-color) 0%, var(--primary-color) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.4);
}

.btn-secondary {
  background-color: var(--primary-color);
}

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

.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
}

.main-nav {
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  background-color: var(--background-color); /* Lighter background for main-nav */
}

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

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

.main-nav .nav-link:hover, .main-nav .nav-link.active {
  color: var(--primary-color);
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 5px;
}

.overlay {
  display: none; /* Hidden on desktop */
}

/* Site Footer */
.site-footer {
  background-color: var(--card-bg);
  padding: 40px 0 20px;
  color: #CCC;
  font-size: 14px;
  border-top: 1px solid var(--border-color);
}

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

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

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

.footer-col .footer-description {
  line-height: 1.6;
  margin-bottom: 15px;
  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(--primary-color);
}

.footer-dynamic-col .footer-slot-anchor-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 5px;
}

.footer-dynamic-row {
  margin-bottom: 20px;
}

.footer-dynamic-row .footer-slot-anchor-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

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

.footer-bottom p {
  margin: 0;
}

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

  .header-top {
    min-height: 60px;
    height: 60px;
    padding: 0 15px;
    position: relative; /* For absolute positioning of logo if needed */
  }

  .header-top .header-container {
    padding-left: 0; /* No padding on container, handled by header-top */
    padding-right: 0;
    width: 100%;
    max-width: none;
    position: static;
  }

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

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

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    height: 48px;
    align-items: 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(--background-color);
    border-bottom: 1px solid var(--border-color);
  }

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

  .hamburger-menu {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: -10px; /* Adjust to align visually */
  }

  .hamburger-icon {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    position: relative;
    transition: background-color 0.3s ease;
  }

  .hamburger-icon::before, .hamburger-icon::after {
    content: '';
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-main);
    position: absolute;
    transition: transform 0.3s ease;
  }

  .hamburger-icon::before {
    top: -8px;
  }

  .hamburger-icon::after {
    top: 8px;
  }

  .hamburger-menu.active .hamburger-icon {
    background-color: transparent;
  }

  .hamburger-menu.active .hamburger-icon::before {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger-menu.active .hamburger-icon::after {
    transform: translateY(-8px) rotate(-45deg);
  }

  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 280px;
    height: calc(100% - var(--header-offset));
    background-color: var(--card-bg);
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease;
    z-index: 9999;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0;
    width: 100%;
    max-width: none;
    height: auto; /* Allow content to dictate height */
  }

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

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

  .overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9998;
  }

  .overlay.active {
    display: block;
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
    padding-left: 15px;
    padding-right: 15px;
  }

  .footer-col:not(:last-child) {
    margin-bottom: 20px;
  }

  .footer-dynamic-row .footer-slot-anchor-inner {
    padding: 0 15px;
    max-width: none;
  }

  .footer-bottom {
    padding-left: 15px;
    padding-right: 15px;
  }

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