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

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

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

/* Header Styling */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--card-bg); /* Using card-bg for a dark header background */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  min-height: 60px; /* Ensure content adaptation */
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color); /* Added border for definition */
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  flex-shrink: 0;
  padding-right: 20px; /* Space between logo and nav */
  display: block; /* Ensure logo is visible */
}

.main-nav {
  flex: 1;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 30px; /* Space between nav links */
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-link {
  color: var(--text-main-color);
  font-size: 16px;
  font-weight: bold;
  padding: 8px 0;
  transition: color 0.3s ease, border-bottom 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
}

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

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

.btn {
  background: var(--button-gradient);
  color: #0A0A0A; /* Dark text for bright button */
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none; /* Remove underline */
  box-shadow: 0 0 10px rgba(255, 211, 107, 0.4); /* Glow effect */
  white-space: nowrap;
}

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

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  color: var(--text-main-color);
  font-size: 28px;
  cursor: pointer;
  padding: 5px 10px;
  z-index: 1002; /* Above nav and overlay */
  flex-shrink: 0;
}

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

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

.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;
  text-transform: uppercase;
}

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

.footer-description {
  line-height: 1.6;
  color: rgba(255, 246, 214, 0.8);
  word-wrap: break-word; /* Ensure full display */
  overflow-wrap: break-word; /* Ensure full display */
}

.footer-nav a {
  display: block;
  color: rgba(255, 246, 214, 0.8);
  margin-bottom: 10px;
  transition: color 0.3s ease;
  white-space: nowrap;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  margin-top: 20px;
  color: rgba(255, 246, 214, 0.7);
}

/* Dynamic slot anchors - ensure visibility */
.footer-slot-anchor,
.footer-slot-anchor-inner {
  min-height: 1px; /* Smallest possible height to ensure renderability */
  display: block; /* Ensure it takes up space */
}

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

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

  .header-container {
    width: 100%;
    max-width: none; /* Crucial: no max-width on mobile */
    padding: 10px 15px; /* Mobile padding */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* For absolute positioning of logo if needed */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1; /* Leftmost */
  }

  .logo {
    order: 2; /* Center */
    flex: 1 !important; /* Take available space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px; /* Adjust logo size for mobile */
    padding-right: 0; /* No padding if centered */
  }
  .logo img { /* For image logos, if they were used */
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    order: 3; /* Rightmost */
    gap: 8px;
    flex-shrink: 0;
  }
  
  .btn {
    padding: 8px 15px; /* Adjust button padding for mobile */
    font-size: 14px;
  }

  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Align with header bottom */
    left: 0;
    width: 250px; /* Drawer width */
    height: calc(100vh - var(--header-offset));
    background-color: var(--card-bg); /* Dark background for drawer */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
    z-index: 999; /* Below hamburger, above overlay */
    justify-content: flex-start; /* Align menu items to top */
    align-items: flex-start; /* Align menu items to left */
  }

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

  .main-nav .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
  }
  .main-nav .nav-link:last-child {
      border-bottom: none;
  }

  .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); /* Semi-transparent overlay */
    z-index: 998; /* Below menu, above content */
    opacity: 0;
    transition: opacity 0.3s ease;
  }

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

  body.no-scroll {
    overflow: hidden; /* Prevent background scroll */
  }

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