:root {
  --primary-color: #F2C14E;
  --accent-color: #FFD36B;
  --card-bg: #111111;
  --bg-color: #0A0A0A;
  --text-main-color: #FFF6D6;
  --border-color: #3A2A12;
  --glow-color: #FFD36B;
  --header-offset: 122px; /* Desktop */
}

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

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

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 15px 20px;
  width: 100%;
  box-sizing: border-box;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
}

.logo {
  flex-shrink: 0;
  color: var(--text-main-color);
  text-decoration: none;
  font-weight: bold;
  font-size: 24px;
  line-height: 1;
  padding: 5px 0; /* Add some vertical padding for clickable area */
}

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

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

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

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

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

.btn {
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  color: #0A0A0A; /* Dark text for contrast */
  padding: 8px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: filter 0.3s ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}

.btn:hover {
  filter: brightness(1.1);
}

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

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

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

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

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

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

.footer-nav a {
  color: var(--text-main-color);
  text-decoration: none;
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  transition: color 0.3s ease;
}

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

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

/* Dynamic slot anchors - ensure visibility */
.footer-slot-anchor, .footer-slot-anchor-inner {
    display: block;
    min-height: 1px;
}

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

  .header-container {
    width: 100%;
    max-width: none; /* Crucial for mobile full width */
    padding: 10px 15px;
    justify-content: space-between; /* Distribute items */
  }

  .hamburger-menu {
    display: block; /* Visible on mobile */
    font-size: 28px;
    background: none;
    border: none;
    color: var(--text-main-color);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    z-index: 1001;
    position: relative;
  }

  .hamburger-menu.active {
    transform: rotate(90deg);
    transition: transform 0.3s ease;
  }

  /* Logo centering for mobile (Method 1 as preferred) */
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px; /* Smaller font size for mobile logo */
  }
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical on mobile */
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 250px; /* Sidebar width */
    height: calc(100% - var(--header-offset));
    background-color: var(--card-bg); /* Darker background for menu */
    padding: 20px 0; /* Vertical padding, horizontal handled by nav-link */
    box-shadow: 2px 0 5px rgba(0,0,0,0.5);
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease;
    z-index: 999; /* Below hamburger, above content */
    overflow-y: auto; /* Scroll for long menus */
    align-items: flex-start; /* Align links to left */
  }

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

  .main-nav .nav-link {
    padding: 10px 20px;
    width: 100%;
    box-sizing: border-box;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Visible on mobile */
    gap: 8px;
    flex-shrink: 0;
    z-index: 1000;
  }

  .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.5); /* Semi-transparent overlay */
    z-index: 998; /* Below menu, above content */
  }

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

  body.no-scroll {
    overflow: hidden;
  }

  /* Mobile footer layout */
  .footer-container {
    grid-template-columns: 1fr; /* Single column on mobile */
  }

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

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

  /* 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;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
