html { scroll-behavior: smooth; }
body { margin: 0; font-family: Arial, sans-serif; line-height: 1.6; color: #FFF6D6; background-color: #0A0A0A; }
:root { --header-offset: 122px; }
body { padding-top: var(--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 {
  box-sizing: border-box;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #0A0A0A; /* Darker background for header top */
  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: 28px;
  font-weight: bold;
  color: #F2C14E;
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

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

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  color: #FFF6D6;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  border: none;
  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);
}

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

.main-nav {
  box-sizing: border-box;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #111111; /* Slightly lighter background for main nav */
  width: 100%;
  transition: transform 0.3s ease; /* For mobile menu animation */
}

.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;
  gap: 20px;
}

.nav-link {
  color: #FFF6D6;
  text-decoration: none;
  font-weight: bold;
  padding: 8px 0;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #F2C14E;
}

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

.hamburger-icon {
  display: block; width: 25px; height: 3px; background-color: #F2C14E;
  position: relative; transition: background-color 0.3s ease;
}

.hamburger-icon::before, .hamburger-icon::after {
  content: ''; display: block; width: 25px; height: 3px; background-color: #F2C14E;
  position: absolute; left: 0; 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);
}

.overlay {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 999;
  background-color: rgba(0, 0, 0, 0.7);
}

.overlay.active {
  display: block;
}

/* Site Footer */
.site-footer {
  background-color: #111111;
  padding: 40px 20px 20px;
  color: #FFF6D6;
  font-size: 14px;
}

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

.footer-col h3 {
  color: #F2C14E;
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-about .footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: #F2C14E;
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-description {
  line-height: 1.8;
  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: 10px;
}

.footer-nav a {
  color: #FFF6D6;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #F2C14E;
}

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

.footer-dynamic-row {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
}

.footer-dynamic-row .footer-slot-anchor-inner {
  display: flex; flex-wrap: wrap; flex-direction: row; align-items: flex-start; gap: 8px; width: 100%;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #3A2A12;
  max-width: 1200px;
  margin: 0 auto;
  color: #FFF6D6;
}

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

  .header-top {
    height: 60px;
    padding: 0 15px;
    justify-content: space-between; /* Ensures hamburger is left, logo is center-ish */
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0;
    position: relative; /* For absolute logo centering */
  }

  .logo {
    flex: 1 !important; /* Take available space */
    display: flex !important;
    justify-content: center !important; /* Center the logo */
    align-items: center !important;
    position: absolute; /* To truly center visually without affecting other flex items */
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Leave space for hamburger */
    font-size: 24px;
  }

  .logo img {
    max-height: 56px !important;
  }

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

  .hamburger-menu {
    display: block;
    order: -1; /* Place it first in flex order */
    margin-left: -10px; /* Adjust for padding */
  }

  .main-nav {
    height: auto;
    min-height: 100vh; /* Full viewport height */
    position: fixed; top: var(--header-offset); left: 0; width: 280px;
    background-color: #111111;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: none; /* Default hidden, controlled by JS and active class */
  }

  .main-nav.active {
    transform: translateX(0); /* Show menu */
    display: flex; /* Make it visible */
  }

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

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid #3A2A12;
  }

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

  .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: #0A0A0A; /* Same as header-top for continuity */
    border-top: 1px solid #3A2A12;
    border-bottom: 1px solid #3A2A12;
  }

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

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

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

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

  .footer-about .footer-logo {
    text-align: center;
  }

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

  .footer-dynamic-row {
    padding: 0 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;
  }
}

/* Ensure no horizontal scroll for header/footer on mobile */
.site-header, .site-footer {
  max-width: 100%;
  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;
  }
}
