:root {
  --primary-color: #F2C14E;
  --secondary-color: #FFD36B;
  --bg-color-dark: #0A0A0A;
  --bg-color-card: #111111;
  --text-main-color: #FFF6D6;
  --border-color: #3A2A12;
  --glow-color: #FFD36B;
  --header-offset: 122px; /* Desktop: header-top (68px) + main-nav (52px) */
}

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

body.no-scroll {
  overflow: hidden;
}

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

/* Site Header - Fixed Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
  overflow-x: hidden; /* Prevent header content overflow */
}

/* Header Top Section */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  background-color: var(--bg-color-dark);
  color: var(--text-main-color);
  width: 100%;
  padding: 0 20px; /* Default padding for desktop */
}

.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;
}

/* Logo */
.logo {
  color: var(--primary-color);
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  display: flex; /* Use flex for potential image logo alignment */
  align-items: center;
  height: 100%;
}
.logo img {
  display: block;
  max-height: 60px; /* Matches header-top height */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Mobile Navigation Buttons (hidden by default) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default, shown on mobile */
  min-height: 48px; /* Placeholder height */
  background-color: var(--bg-color-card); /* Different background from header-top */
  padding: 0 20px; /* Default padding for desktop, effectively hidden */
}

/* Main Navigation Section */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Default for desktop */
  align-items: center;
  background-color: var(--bg-color-card);
  width: 100%;
  color: var(--text-main-color);
}

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

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 25px;
}

.main-nav li a {
  color: var(--text-main-color);
  font-weight: bold;
  padding: 5px 0;
  white-space: nowrap;
  transition: color 0.3s ease;
}

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

/* Hamburger Menu (hidden by default on desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1001;
  padding: 5px;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--text-main-color);
  transition: all 0.3s ease;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 25px;
  font-weight: bold;
  color: #000; /* Text color for gradient buttons */
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-decoration: none; /* Remove underline for buttons */
}

.btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 10px var(--glow-color);
}

/* Overlay for 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);
  z-index: 999;
  transition: opacity 0.3s ease;
}

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

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

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

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 40px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 30px;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

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

.footer-description {
  line-height: 1.6;
  margin-bottom: 15px;
  word-wrap: break-word; /* Ensure description wraps */
  overflow-wrap: break-word;
}

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

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

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

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

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 20px;
  color: #999; /* Slightly lighter color for copyright */
}

.footer-bottom p {
  margin: 0;
}

/* Dynamic Slot Anchor Inner (ensure visibility for injected content) */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure it takes up space even if empty */
  width: 100%;
  box-sizing: border-box;
}


/* Mobile Styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: header-top (60px) + mobile-nav-buttons (48px) = 108px. Add buffer for 110px. */
  }

  .header-top {
    min-height: 60px;
    height: 60px;
    padding: 0 15px; /* Smaller padding for mobile */
    justify-content: space-between; /* Space between hamburger and logo */
  }

  .header-container {
    padding: 0; /* Handled by header-top padding */
    width: 100%;
    max-width: none; /* No max-width on mobile */
    position: relative; /* For absolute logo centering */
  }

  /* Specific rule for image LOGO centering on mobile (applies to text logo via flex as well) */
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }
  .logo img {
    max-height: 56px !important; /* Matches mobile header-top height */
    max-width: 100%;
    height: auto;
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    position: relative;
    z-index: 1002; /* Above logo and buttons */
  }

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

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

  /* Mobile Navigation Buttons */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-color-card);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px; /* Smaller padding for mobile */
    overflow: hidden; /* Prevent content overflow */
    gap: 10px; /* Space between buttons */
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
  }

  .mobile-nav-buttons .btn {
    flex: 1; /* Distribute space evenly */
    min-width: 0; /* Allow shrinking */
    max-width: calc(50% - 5px); /* Max width for two buttons with gap */
    box-sizing: border-box;
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Break long words */
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default for mobile menu */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px;
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--bg-color-card);
    flex-direction: column; /* Vertical menu */
    transform: translateX(-100%); /* Off-screen to the left */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Scroll if menu content is too long */
    z-index: 1001; /* Above overlay */
  }

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

  .main-nav .nav-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 20px 15px; /* Padding for mobile menu items */
    justify-content: flex-start; /* Align menu items to start */
    height: auto;
  }

  .main-nav ul {
    flex-direction: column;
    width: 100%;
    gap: 15px;
  }

  .main-nav li a {
    padding: 10px 0;
    display: block;
    border-bottom: 1px solid var(--border-color); /* Separator */
  }

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

  .overlay.active {
    opacity: 1;
  }

  /* Footer Mobile */
  .site-footer {
    padding: 30px 15px 15px;
  }

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
    border-bottom: none; /* Remove border in mobile */
    padding-bottom: 0;
  }

  .footer-col {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color); /* Separator between columns */
  }

  .footer-col:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
  }

  .footer-logo {
    font-size: 24px;
  }

  .footer-bottom {
    padding-top: 15px;
  }

  /* Mobile content area protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
/* 内容保护（系统追加，请勿删除） */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}
