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

/* Base Styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Header offset */
  background-color: var(--page-bg);
  color: var(--text-main);
  line-height: 1.6;
}

/* Shared Container */
.header-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  display: flex;
  align-items: center;
  height: 100%; /* Ensure container fills header/footer height */
}

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--page-bg); /* Use page-bg for consistency with Black Gold theme */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); /* Suspended effect */
  z-index: 1000;
  min-height: 60px; /* Base min-height for desktop */
  display: flex; /* Ensure flex context for header-container to align */
  align-items: center; /* Vertically center content in header */
}

/* Logo */
.logo, .footer-logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  padding: 10px 0; /* Add some padding for clickable area */
  white-space: nowrap;
  flex-shrink: 0;
}

/* Main Navigation (Desktop) */
.main-nav {
  flex: 1; /* Take up available space */
  display: flex;
  flex-direction: row;
  justify-content: center; /* Center nav links */
  align-items: center;
  gap: 30px; /* Spacing between nav links */
  list-style: none;
  padding: 0;
  margin: 0;
}

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

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

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  margin-left: auto; /* Push buttons to the right */
  display: flex;
  gap: 12px; /* Spacing between buttons */
  flex-shrink: 0;
}

/* Mobile Navigation Buttons (Hidden by default on desktop) */
.mobile-nav-buttons {
  display: none !important; /* Hidden by default on desktop, override with !important */
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  color: var(--text-main); /* Text Main for button text */
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  border: none;
  background: var(--button-gradient); /* Use custom button gradient */
  box-shadow: 0 0 10px rgba(255, 211, 107, 0.4); /* Glow effect */
}

.btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 15px rgba(255, 211, 107, 0.6);
}

/* Hamburger Menu (Hidden by default on desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001; /* Above other elements */
  flex-shrink: 0;
}

.hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-main);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* Mobile Menu Overlay (Hidden by default) */
.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); /* Dark semi-transparent overlay */
  z-index: 998; /* Below menu, above page content */
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* Site Footer */
.site-footer {
  background-color: var(--card-bg); /* Use card-bg for footer background */
  padding: 40px 0 20px;
  font-size: 14px;
  color: var(--text-main);
}

.footer-main-content {
  padding-bottom: 30px;
}

.site-footer .footer-container {
  align-items: flex-start; /* Align columns to top */
  flex-wrap: wrap; /* Allow columns to wrap on smaller screens */
  gap: 20px; /* Gap between columns */
}

.footer-col {
  flex: 1; /* Distribute space evenly */
  min-width: 200px; /* Minimum width for columns before wrapping */
}

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

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

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

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

.footer-description {
  color: var(--text-main);
  margin-top: 10px;
  line-height: 1.8;
  word-wrap: break-word; /* Ensure long words break */
  overflow-wrap: break-word; /* Ensure long words break */
}

.footer-logo {
  display: block; /* Ensure logo behaves as a block element */
  margin-bottom: 15px;
}

.footer-bottom {
  border-top: 1px solid var(--border-color); /* Border color for separator */
  padding-top: 20px;
  margin-top: 20px;
  text-align: center;
  color: var(--text-main);
}

.footer-bottom .footer-container {
  justify-content: center;
  align-items: center;
}

/* Footer slot anchors - must remain visible */
.footer-slot-anchor, .footer-slot-anchor-inner {
  min-height: 1px; /* Ensure they have some height for visibility */
  width: 100%;
  display: block; /* Ensure they are block elements */
}


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

  /* Shared Container for Mobile */
  .header-container {
    width: 100%; /* Must be 100% on mobile */
    max-width: none; /* No max-width on mobile */
    padding-left: 15px;
    padding-right: 15px;
    min-height: 50px; /* Adjust min-height for mobile header */
  }
  
  /* 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;
  }

  /* Header Mobile Layout */
  .site-header {
    min-height: 50px; /* Mobile header height */
  }

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    order: 0; /* Order on the far left */
  }

  .logo {
    flex: 1 !important; /* Take available space */
    display: flex !important; /* Use flex for centering */
    justify-content: center !important; /* Center horizontally */
    align-items: center !important; /* Center vertically */
    padding: 5px 0;
    order: 1; /* Center position */
  }

  /* Mobile logo text adjustment if needed */
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px; /* Control image logo size */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    order: 2; /* Order on the far right */
    gap: 8px; /* Spacing between buttons */
    flex-shrink: 0;
  }

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

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

  .main-nav .nav-link {
    width: 100%; /* Full width for menu items */
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
  }

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

  /* Hamburger Menu Active State (X animation) */
  .hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Footer Mobile Layout */
  .site-footer .footer-container {
    flex-direction: column; /* Stack columns vertically */
    padding-left: 15px;
    padding-right: 15px;
  }

  .footer-col {
    width: 100%;
    min-width: unset; /* Remove min-width for mobile */
    margin-bottom: 20px;
  }
  .footer-col:last-of-type {
    margin-bottom: 0;
  }

  .footer-bottom .footer-container {
    padding-left: 15px;
    padding-right: 15px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
