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

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  background-color: var(--bg-color);
  color: var(--text-main);
  overflow-x: hidden; /* Prevent body overflow on desktop as well */
}

/* --- Header Styles --- */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--bg-color); /* Use dark background */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); /* Suspended effect */
  z-index: 1000;
  min-height: 60px; /* Minimum height for header */
  display: flex; 
  align-items: center;
}

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

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

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  font-size: 30px;
  color: var(--primary-color);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  z-index: 1001; /* Higher than other header elements */
}

.main-nav {
  flex: 1; /* Takes available space */
  display: flex; /* Desktop: horizontal */
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 25px; /* Space between nav links */
  padding: 0 20px; /* Padding for nav menu */
}

.main-nav .nav-link {
  color: var(--text-main);
  text-decoration: none;
  font-size: 17px;
  font-weight: 600;
  padding: 8px 0;
  position: relative;
  transition: color 0.3s ease, transform 0.3s ease;
}

.main-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease, left 0.3s ease;
  transform: translateX(-50%);
}

.main-nav .nav-link:hover::after,
.main-nav .nav-link.active::after {
  width: 100%;
  left: 0;
  transform: translateX(0);
}

.main-nav .nav-link:hover {
  color: var(--secondary-color);
  transform: translateY(-2px);
}

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

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

.btn {
  background: var(--button-gradient);
  color: #000; /* Text color for buttons, contrast with gold */
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 211, 107, 0.5); /* Glow effect */
}

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

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

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

.site-footer h3 {
  color: var(--primary-color);
  font-size: 18px;
  margin-bottom: 15px;
  text-shadow: 0 0 3px rgba(242, 193, 78, 0.5);
}

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

.footer-col {
  display: flex;
  flex-direction: column;
}

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

.footer-description {
  font-size: 14px;
  line-height: 1.6;
  color: #CCC; /* Slightly lighter text for description */
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

.footer-nav .nav-link {
  color: #AAA; /* Lighter color for footer links */
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
  color: #888;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- Mobile Specific Styles --- */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: 60px (header-top) + 48px (main-nav) + 2px buffer */
  }

  body {
    padding-top: var(--header-offset);
  }

  /* Mobile 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 {
    padding: 10px 15px; /* Smaller padding for mobile */
    width: 100%;
    max-width: none; /* CRITICAL: No max-width on mobile container */
    justify-content: space-between;
  }

  .hamburger-menu {
    display: block; /* Visible on mobile */
    order: 1; /* Place at the beginning */
    margin-right: 10px; /* Space from logo */
  }

  .logo {
    order: 2; /* Place after hamburger */
    flex: 1 !important; /* CRITICAL: Take available space */
    display: flex !important; /* CRITICAL: Use flex to center image/text logo */
    justify-content: center !important; /* CRITICAL: Center logo horizontally */
    align-items: center !important;
    font-size: 24px; /* Adjust logo size for mobile */
    padding-right: 0; /* Remove extra padding */
  }

  /* If logo is an image, control its size */
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px; /* Max height for mobile logo image */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical layout for menu items */
    position: fixed; /* Fixed position for drawer menu */
    top: var(--header-offset); /* Start below the fixed header */
    left: 0;
    width: 280px; /* Width of the mobile menu drawer */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background-color: var(--card-bg); /* Dark background for menu */
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Initially off-screen to the left */
    transition: transform 0.3s ease;
    z-index: 999; /* Below overlay if overlay is used for content, above content */
    align-items: flex-start; /* Align menu items to the left */
    gap: 15px; /* Space between menu items */
    overflow-y: auto; /* Allow scrolling if menu content is long */
  }

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

  .main-nav .nav-link {
    font-size: 18px;
    width: 100%; /* Full width for menu items */
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color); /* Separator */
  }
  .main-nav .nav-link:last-child {
    border-bottom: none;
  }
  .main-nav .nav-link::after {
    display: none;
  }
  .main-nav .nav-link:hover {
    transform: none;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* CRITICAL: Visible on mobile */
    order: 3; /* Place after logo */
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto; /* Push buttons to the right */
  }

  .mobile-menu-overlay {
    z-index: 998; /* Ensure overlay is below the menu (999) but above content */
  }

  .footer-grid {
    grid-template-columns: 1fr; /* Single column layout for footer */
  }

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

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

  .footer-bottom {
    padding: 15px 0 0;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
/* 内容保护（系统追加，请勿删除） */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}
