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

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

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

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

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-main);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  z-index: 1001; /* Above other elements in mobile */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 20px; /* Spacing from nav */
  text-shadow: 0 0 5px var(--glow-color); /* subtle glow */
}

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

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

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}

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

.nav-link:hover::after {
  width: 100%;
}

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

.mobile-nav-buttons {
  display: none !important; /* Hidden by default on desktop, !important to override potential flex */
}

/* Buttons */
.btn {
  background: var(--button-gradient);
  color: var(--text-main);
  padding: 10px 20px;
  border-radius: 25px;
  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 0 8px rgba(255, 211, 107, 0.4); /* Glow effect */
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 211, 107, 0.6);
}

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

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

  .header-container {
    width: 100%;
    max-width: none; /* Mobile container fills width */
    padding: 10px 15px; /* Mobile padding */
    position: relative; /* For logo absolute positioning if needed */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    flex-shrink: 0;
    margin-right: 15px; /* Space from logo */
  }

  .hamburger-menu.active {
    /* Transform to 'X' */
    color: var(--secondary-color);
  }

  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important; /* Center logo */
    align-items: center !important;
    margin-right: 0; /* Remove desktop margin */
    font-size: 24px; /* Adjust logo size */
  }

  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column; /* Vertical menu */
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 70%;
    max-width: 300px; /* Limit menu width */
    height: calc(100vh - var(--header-offset));
    background-color: var(--card-bg); /* Darker background for menu */
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.7);
    transform: translateX(-100%); /* Off-screen initially */
    transition: transform 0.3s ease;
    z-index: 999;
    align-items: flex-start; /* Align links to the left */
  }

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

  .main-nav .nav-link {
    width: 100%;
    padding: 12px 0;
    font-size: 18px;
    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 {
    flex-shrink: 0;
    display: flex !important; /* Show mobile buttons */
    gap: 8px; /* Spacing between mobile buttons */
    margin-left: 15px; /* Space from logo */
  }

  .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.6); /* Dark overlay */
    z-index: 998;
  }

  .mobile-menu-overlay.active {
    display: block; /* Show overlay when active */
  }

  body.no-scroll {
    overflow: hidden; /* Prevent scrolling when menu is open */
  }

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

/* Footer */
.site-footer {
  background-color: var(--bg-color);
  color: var(--text-main);
  padding-top: 50px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px 40px; /* Bottom padding for the container */
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding-bottom: 30px; /* Space above copyright line */
}

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

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

.footer-description {
  font-size: 14px;
  line-height: 1.6;
  color: #CCC;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

.footer-nav a {
  color: #CCC;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

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

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

.footer-slot-anchor-inner {
  /* Placeholder for injected content, ensure it's visible */
  min-height: 10px; /* Give it some height for visibility if empty */
  margin-top: 10px;
}

/* Mobile footer */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }
  .footer-container {
    padding: 0 15px 30px; /* Mobile padding */
  }
  .footer-bottom {
    padding: 15px;
  }
  .footer-col h3 {
    margin-top: 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;
  }
}
