:root {
  --header-offset: 122px; /* Desktop: 68px (top) + 52px (main-nav) + 2px buffer */
}
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Mandatory body padding-top */
  background-color: #0A0A0A; /* Background */
  color: #FFF6D6; /* Text Main */
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}
a {
  color: #F2C14E; /* Main color for links */
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* --- Header Styles --- */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background-color: #111111; /* Card BG, darker for header */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  min-height: 60px; /* Ensure content fits */
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 15px 30px;
  min-height: 52px; /* main-nav height */
}

.logo {
  flex-shrink: 0;
  color: #FFF6D6; /* Text Main */
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  margin-right: 20px;
  display: block; /* Default for text logo */
}

.main-nav {
  flex: 1;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 30px;
  position: static; /* Desktop default */
}

.nav-link {
  color: #FFF6D6; /* Text Main */
  text-decoration: none;
  padding: 10px 0;
  font-size: 16px;
  font-weight: bold;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #F2C14E; /* Main color */
  text-decoration: none;
}

.desktop-nav-buttons {
  flex-shrink: 0;
  margin-left: auto;
  display: flex;
  gap: 10px;
}

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

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  color: #FFF6D6; /* Text Main */
  font-size: 30px;
  cursor: pointer;
  padding: 5px;
  line-height: 1;
  flex-shrink: 0;
  z-index: 1001; /* Ensure it's above other elements on mobile */
}

.btn {
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button gradient */
  color: #111111; /* Card BG for text, ensures contrast */
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  border: none;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4), 0 0 15px #FFD36B; /* Glow */
  text-decoration: none;
}

.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: 998; /* Below menu, above page content */
  transition: opacity 0.3s ease;
  opacity: 0;
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

/* --- Footer Styles --- */
.site-footer {
  background-color: #0A0A0A; /* Background */
  color: #FFF6D6; /* Text Main */
  padding: 40px 20px;
  font-size: 14px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid #3A2A12; /* Border */
}

.footer-col h3 {
  color: #F2C14E; /* Main Color */
  font-size: 18px;
  margin-bottom: 15px;
  border-bottom: 2px solid #3A2A12; /* Border */
  padding-bottom: 5px;
}

.footer-logo {
  color: #FFF6D6; /* Text Main */
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-description {
  margin-top: 0;
  line-height: 1.8;
  color: #FFF6D6; /* Text Main */
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li {
  margin-bottom: 8px;
}

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

.footer-nav a:hover {
  color: #F2C14E; /* Main Color */
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  margin-top: 20px;
  color: #FFF6D6; /* Text Main */
  font-size: 13px;
}

/* Dynamic slot anchors - ensure visibility */
.footer-slot-anchor-inner,
.footer-top-row,
.footer-mid-row-1,
.footer-mid-row-2,
.footer-mid-grid-r1 > div,
.footer-mid-grid-r2 > div,
.footer-bottom-slot {
  display: block; /* or flex, or grid depending on context */
  visibility: visible;
  opacity: 1;
  height: auto;
  max-height: none;
  overflow: visible;
}

/* --- Mobile Specific Styles --- */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: 60px (top) + 48px (main-nav) + 2px buffer */
  }
  body {
    padding-top: var(--header-offset); /* Mandatory body padding-top */
    overflow-x: hidden;
  }
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

  .site-header {
    min-height: 48px; /* main-nav height on mobile */
  }

  .header-container {
    width: 100%;
    max-width: none; /* Crucial for mobile */
    padding: 10px 15px;
    justify-content: space-between;
  }

  .hamburger-menu {
    display: block;
    order: 0; /* Leftmost */
    font-size: 24px;
    padding: 8px;
    z-index: 1001;
  }

  .logo {
    flex: 1 !important; /* Image LOGO居中实现 - Method 1 */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    margin: 0 10px; /* Adjust margin for spacing */
    order: 1; /* Middle */
  }
  .logo img { /* If logo is an image */
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px; /* Adjust as needed */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 70%;
    max-width: 300px; /* Limit max width of mobile menu */
    height: calc(100vh - var(--header-offset));
    background-color: #111111; /* Card BG */
    flex-direction: column;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    align-items: flex-start;
    gap: 15px;
    z-index: 999; /* Below hamburger, above overlay */
  }

  .main-nav.active {
    display: flex; /* Must set display to show */
    transform: translateX(0);
  }

  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid #3A2A12; /* Border */
  }
  .nav-link:last-child {
    border-bottom: none;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Visible on mobile */
    gap: 8px;
    flex-shrink: 0;
    order: 2; /* Rightmost */
  }

  /* Footer Mobile */
  .footer-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .footer-col {
    text-align: center;
  }
  .footer-col h3 {
    text-align: center;
    border-bottom: none;
    padding-bottom: 0;
  }
  .footer-nav ul {
    text-align: center;
  }
  .footer-logo {
    margin-left: auto;
    margin-right: auto;
  }
  .footer-description {
    text-align: center;
  }
}

/* Ensure body.no-scroll works */
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;
  }
}
