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

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--color-text-main);
  background-color: var(--color-background);
  padding-top: var(--header-offset); /* Fixed header offset */
  overflow-x: hidden; /* Prevent horizontal scroll from body */
}

/* Header styles */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--color-background); /* Use background color for header */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4); /* Suspended effect */
  z-index: 1000;
  min-height: 60px; /* Ensure content adaptation */
  display: flex; /* For overall header flex behavior */
  align-items: center; /* Vertically align content */
  padding: 10px 0; /* Vertical padding for the header */
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between; /* Distribute items */
  padding: 0 30px; /* Desktop side padding */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--color-accent);
  text-decoration: none;
  flex-shrink: 0;
  display: block; /* Ensure logo is visible */
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  font-size: 30px;
  color: var(--color-text-main);
  cursor: pointer;
  padding: 5px;
  line-height: 1;
  flex-shrink: 0;
}

.main-nav {
  flex: 1;
  display: flex; /* Desktop: horizontal menu */
  flex-direction: row;
  justify-content: center; /* Center nav links */
  align-items: center;
  gap: 25px; /* Spacing between nav links */
  position: static; /* Desktop: normal flow */
}

.main-nav .nav-link {
  color: var(--color-text-main);
  text-decoration: none;
  font-size: 16px;
  padding: 8px 12px;
  transition: color 0.3s ease, background-color 0.3s ease;
  border-radius: 5px;
  white-space: nowrap; /* Prevent wrapping */
}

.main-nav .nav-link:hover {
  color: var(--color-primary);
  background-color: rgba(255, 255, 255, 0.1);
}

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

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

.btn {
  background: var(--color-button-gradient);
  color: var(--color-text-main);
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid var(--color-border); /* Add a subtle border */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4), 0 0 15px var(--color-glow); /* Glow effect on hover */
}

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

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Responsive grid for columns */
  gap: 30px;
  padding-bottom: 30px;
}

.footer-col {
  margin-bottom: 20px;
}

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

.footer-description {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 246, 214, 0.7); /* Slightly lighter text for description */
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-title {
  font-size: 18px;
  color: var(--color-primary);
  margin-bottom: 15px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 8px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.footer-nav .nav-link:hover {
  color: var(--color-primary);
}

.footer-bottom {
  text-align: center;
  font-size: 13px;
  color: rgba(255, 246, 214, 0.6);
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  margin-top: 20px;
}

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

  /* Prevent content overflow */
  .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 {
    padding: 8px 0; /* Adjust vertical padding for mobile header */
  }

  .header-container {
    width: 100%;
    max-width: none; /* Remove max-width on mobile */
    padding: 0 15px; /* Mobile side padding */
    justify-content: space-between; /* Space out hamburger, logo, buttons */
    position: relative; /* For absolute positioning of logo if needed */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    z-index: 1001; /* Ensure it's above other elements */
  }
  
  .hamburger-menu.active {
    /* Style for active hamburger, e.g., turning into an X */
    color: var(--color-primary);
  }

  .logo {
    flex: 1 !important; /* Take up available space for centering */
    display: flex !important;
    justify-content: center !important; /* Center text logo */
    align-items: center !important;
    font-size: 24px;
    margin: 0 10px; /* Add some margin around the logo */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical menu for mobile */
    position: fixed; /* Fixed position for slide-in menu */
    top: var(--header-offset); /* Start below the header */
    left: 0;
    width: 280px; /* Width of the mobile menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--color-card-bg); /* Menu background */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    padding: 20px;
    gap: 15px;
    align-items: flex-start; /* Align links to the left */
    z-index: 999; /* Below hamburger, above content */
    overflow-y: auto; /* Enable scrolling for long menus */
  }

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

  .main-nav .nav-link {
    width: 100%; /* Full width for menu items */
    padding: 12px 15px;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
  }
  .main-nav .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; /* Spacing between mobile buttons */
    flex-shrink: 0;
    z-index: 1000; /* Ensure buttons are clickable */
  }

  .btn {
    padding: 8px 15px; /* Smaller buttons for mobile */
    font-size: 14px;
  }

  .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 content */
    transition: opacity 0.3s ease;
    opacity: 0;
  }

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

  .footer-container {
    grid-template-columns: 1fr; /* Single column for mobile footer */
    gap: 20px;
  }
  
  .footer-col {
    text-align: center; /* Center footer content on mobile */
  }

  .footer-logo {
    margin-left: auto;
    margin-right: auto;
  }
  .footer-title {
    text-align: center;
  }
  .footer-nav {
    align-items: center; /* Center footer nav links */
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
