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

html {
  scroll-behavior: smooth;
}

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

body.no-scroll {
  overflow: hidden !important;
}

a {
  text-decoration: none;
  color: var(--color-text-main);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  background-color: var(--color-background); /* Default background for entire header */
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-background); /* Specific background for top bar */
  width: 100%;
}

.header-container {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px; /* Adjusted padding */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--color-primary);
  text-transform: uppercase;
  display: block; /* Ensure logo is visible */
}

.desktop-nav-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--button-gradient);
  color: #333; /* Dark text for bright button */
  border: none;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn:hover {
  opacity: 0.9;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1001;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--color-primary);
  border-radius: 3px;
  transition: all 0.3s ease-in-out;
}

.hamburger-menu.active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop, shown on mobile */
  min-height: 48px;
  background-color: var(--color-card-bg); /* A different background for mobile buttons */
  width: 100%;
  padding: 0 15px; /* Mobile padding */
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop: flex */
  align-items: center;
  overflow: hidden;
  background-color: var(--color-card-bg); /* Specific background for main nav */
  width: 100%;
}

.nav-container {
  box-sizing: border-box;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row; /* Desktop: row */
  justify-content: center;
  align-items: center;
  padding: 0 20px;
}

.nav-link {
  padding: 10px 15px;
  color: var(--color-text-main);
  font-weight: bold;
  transition: color 0.3s ease;
  white-space: nowrap;
}

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

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 998;
  display: none; /* Hidden by default */
  opacity: 0;
  transition: opacity 0.3s ease;
}

.overlay.active {
  display: block;
  opacity: 1;
}

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

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

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

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

.footer-col .footer-description {
  color: #bbb;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

.footer-nav a {
  color: #bbb;
  transition: color 0.3s ease;
}

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

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

.footer-bottom p {
  margin: 0;
}

.footer-slot-anchor-inner {
  min-height: 10px; /* Small height to ensure visibility of injected content */
}

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

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

  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

  .header-top {
    min-height: 60px;
    height: 60px;
  }

  .header-container {
    padding: 0 15px;
    position: relative; /* For absolute positioning of logo if needed */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    max-width: calc(100% - 100px); /* Adjust max-width to leave space for hamburger */
  }

  /* If logo is an image, apply max-height */
  .logo img {
    max-height: 56px !important;
    width: auto;
    object-fit: contain;
  }

  .desktop-nav-buttons {
    display: none !important;
  }

  .hamburger-menu {
    display: flex;
    position: absolute; /* Position hamburger menu on the left */
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
  }

  .mobile-nav-buttons {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 10px;
    min-height: 48px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 15px; /* Adjusted padding for mobile buttons */
    overflow: hidden;
    justify-content: center;
    background-color: var(--color-card-bg);
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* 50% minus half of the gap */
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical menu */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header */
    left: 0;
    width: 280px; /* Width of the mobile menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--color-background);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease-in-out;
    z-index: 999; /* Below overlay, above site content */
    overflow-y: auto; /* Allow scrolling for long menus */
    align-items: flex-start; /* Align menu items to the left */
    padding-top: 20px; /* Add some top padding */
  }

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

  .nav-container {
    flex-direction: column;
    padding: 0;
    width: 100%;
    align-items: flex-start;
    height: auto; /* Allow content to dictate height */
  }

  .nav-link {
    width: 100%;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
  }

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

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    padding: 0 15px;
  }

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

  .footer-col:last-of-type {
    margin-bottom: 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;
  }
}
