:root {
  --primary-color: #F2C14E;
  --secondary-color: #FFD36B;
  --button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  --card-bg: #111111;
  --bg-color: #0A0A0A;
  --text-main-color: #FFF6D6;
  --border-color: #3A2A12;
  --glow-color: #FFD36B;
  --header-offset: 122px; /* Desktop: 68px (top bar) + 52px (main nav) = 120px, +2px buffer */
}

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

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg-color); /* Using background color as per instructions */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); /* Suspended effect */
  z-index: 1000;
  min-height: 60px; /* Ensure content fits */
  display: flex; /* For centering container */
  align-items: center; /* For vertical alignment */
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 10px 30px; /* Desktop padding */
  box-sizing: border-box;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-main-color);
  cursor: pointer;
  padding: 5px;
  line-height: 1;
  flex-shrink: 0;
  position: relative;
  width: 30px;
  height: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  z-index: 1001;
}
.hamburger-menu span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-main-color);
  transition: all 0.3s ease;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color); /* Use primary color for logo text */
  text-decoration: none;
  flex-shrink: 0;
  padding-right: 20px; /* Spacing between logo and nav */
}

.main-nav {
  flex: 1; /* Takes up available space */
  display: flex;
  flex-direction: row;
  justify-content: center; /* Center nav links */
  align-items: center;
  gap: 30px; /* Spacing between nav links */
}

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

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

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

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

.btn {
  background: var(--button-gradient);
  color: var(--text-main-color);
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.5), 0 0 15px var(--glow-color);
}

.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: 990; /* Below main nav but above content */
}

/* Footer */
.site-footer {
  background-color: var(--bg-color); /* Background color for footer */
  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); /* Four columns for desktop */
  gap: 30px;
  padding-bottom: 30px;
}

.footer-col {
  padding: 10px 0;
}

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

.footer-description {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main-color);
  word-wrap: break-word; /* Ensure long words break */
  overflow-wrap: break-word; /* Ensure long words break */
}

.footer-title {
  font-size: 18px;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: bold;
}

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

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

.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(--primary-color);
}

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

/* Mobile specific styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: 60px (top bar) + 48px (main nav) = 108px, +2px buffer */
  }

  /* Shared mobile content overflow prevention */
  .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%;
    max-width: none; /* Remove max-width for mobile */
    padding: 10px 15px; /* Mobile padding */
    justify-content: space-between; /* Space out items */
    position: relative; /* For absolute positioning of logo if needed */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    z-index: 1001; /* Above buttons */
    margin-right: 10px; /* Spacing */
  }
  .hamburger-menu.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  .hamburger-menu.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important; /* Center logo horizontally */
    align-items: center !important;
    font-size: 24px; /* Adjust logo size for mobile */
    padding-right: 0; /* No extra padding */
    order: 2; /* Logo in the middle */
  }
  .logo img { /* If logo is an image */
    max-width: 100%;
    height: auto;
    max-height: 40px;
    display: block !important;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below header */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Max width for menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--card-bg); /* Use card background for menu */
    flex-direction: column; /* Vertical menu */
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.7);
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    z-index: 995; /* Above overlay */
    overflow-y: auto; /* Enable scrolling for long menus */
    align-items: flex-start; /* Align menu items to the left */
    gap: 15px;
  }

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

  .main-nav .nav-link {
    font-size: 18px;
    padding: 10px 0;
    width: 100%; /* Full width for clickable area */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    gap: 8px;
    flex-shrink: 0;
    z-index: 1001; /* Above mobile menu overlay */
    order: 3; /* Buttons on the right */
  }
  .mobile-nav-buttons .btn {
      padding: 8px 15px; /* Adjust button padding for mobile */
      font-size: 14px;
  }

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

  .footer-container {
    grid-template-columns: 1fr; /* Single column for mobile footer */
    gap: 20px;
  }
  .footer-col {
    padding: 0;
  }
  .footer-logo {
    margin-bottom: 10px;
  }
  .footer-title {
    margin-top: 20px;
    margin-bottom: 10px;
  }
  .footer-bottom {
    padding-top: 15px;
  }
}

/* body no-scroll class for mobile menu */
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;
  }
}
