/* Shared CSS */
:root {
  --primary-color: #F2C14E;
  --accent-color: #FFD36B;
  --button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  --card-bg: #111111;
  --background-color: #0A0A0A;
  --text-main-color: #FFF6D6;
  --border-color: #3A2A12;
  --glow-color: #FFD36B;

  /* Header offset values based on "no marquee" */
  --header-offset: 122px; 
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  background-color: var(--background-color);
  color: var(--text-main-color);
  padding-top: var(--header-offset); /* Mandatory body padding for fixed header */
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

/* --- Header Styles (Desktop First) --- */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--background-color); /* Using background color for header */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); /* Suspended effect */
  min-height: 60px; /* Ensure content adaptation */
  display: flex; /* Ensure flex context for header-container */
  align-items: center;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 25px; /* Desktop padding */
  display: flex;
  align-items: center;
  width: 100%;
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--text-main-color);
  text-decoration: none;
  flex-shrink: 0; /* Prevent logo from shrinking */
  margin-right: 20px; /* Spacing between logo and nav */
}

.main-nav {
  flex: 1; /* Occupy middle space */
  display: flex; /* Desktop: show nav links horizontally */
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 25px; /* Spacing between nav links */
  position: static; /* Desktop: normal flow */
}

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

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

.desktop-nav-buttons {
  display: flex; /* Display on desktop */
  gap: 10px;
  margin-left: auto; /* Push buttons to the right */
  flex-shrink: 0;
}

.mobile-nav-buttons {
  display: none !important; /* Hidden on desktop, important to override other rules */
}

.btn {
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none; /* Remove underline */
  color: #333; /* Dark text for bright button */
  background: var(--button-gradient);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap; /* Prevent button text wrapping */
  border: none; /* Ensure no default button border */
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

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

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

  .site-header {
    min-height: 50px; /* Adjust min-height for mobile header */
  }

  .header-container {
    width: 100%; /* Mobile container takes full width */
    max-width: none; /* Remove max-width restriction */
    padding: 10px 15px; /* Mobile padding */
    justify-content: space-between; /* Space out items */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    font-size: 24px;
    background: none;
    border: none;
    color: var(--text-main-color);
    cursor: pointer;
    padding: 5px;
    z-index: 1001; /* Above other elements */
    flex-shrink: 0;
  }

  .logo {
    flex: 1; /* Allow logo to take available space for centering */
    text-align: center; /* Center text logo */
    margin-right: 0; /* Remove right margin */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed; /* Fixed position for off-canvas menu */
    top: var(--header-offset); /* Start below the header */
    left: 0;
    width: 250px; /* Width of the mobile menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--card-bg); /* Use card background for menu */
    flex-direction: column; /* Stack links vertically */
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.5);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease; /* Smooth animation */
    z-index: 999; /* Below hamburger, 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 */
  }

  .main-nav .nav-link {
    padding: 15px 0;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }

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

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

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

  .mobile-menu-overlay {
    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 */
    display: none; /* Hidden by default */
  }

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

/* --- Footer Styles --- */
.site-footer {
  background-color: var(--background-color);
  color: var(--text-main-color);
  padding: 40px 20px 20px;
  border-top: 1px solid var(--border-color);
}

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

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

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

.footer-description {
  font-size: 14px;
  line-height: 1.6;
  word-wrap: break-word; /* Ensure full text display */
  margin-bottom: 15px;
}

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

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

.footer-nav a {
  color: var(--text-main-color);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

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

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

/* Footer Mobile */
@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr; /* Single column for mobile */
  }

  .footer-col {
    margin-bottom: 30px; /* Add spacing between columns */
  }

  .footer-col:last-child {
    margin-bottom: 0;
  }
}

/* Ensure footer slot anchors are visible */
.footer-slot-anchor-inner {
  display: block; /* Ensure it's rendered and can contain content */
  min-height: 1px; /* Small height so it's not completely invisible if empty */
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
