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

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

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

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Header styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); /* Suspended effect */
  background-color: var(--bg-color); /* Fallback background for header */
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--card-bg-color); /* Contrasting background for header-top */
  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 20px; /* Desktop container padding */
}

.logo {
  font-weight: bold;
  font-size: 28px;
  color: var(--text-main-color);
  text-decoration: none;
  display: flex; /* For potential image centering */
  align-items: center;
  white-space: nowrap;
}

.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

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

.btn {
  background: var(--button-gradient);
  color: var(--bg-color); /* Text color for buttons should contrast with gradient */
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.4), 0 0 15px var(--glow-color);
}

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px;
  width: 100%;
  background-color: var(--card-bg-color); /* Same as header-top for consistency */
  padding: 0 15px; /* Mobile padding */
  border-top: 1px solid var(--border-color);
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop default: visible, horizontal */
  align-items: center;
  overflow: hidden;
  background-color: var(--bg-color); /* Contrasting background for main-nav */
  width: 100%;
  border-top: 1px solid var(--border-color);
}

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

.main-nav-list {
  display: flex;
  gap: 25px;
}

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

.main-nav-list a:hover,
.main-nav-list a.active {
  color: var(--accent-color);
}

.main-nav-list a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 3px;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.main-nav-list a:hover::after,
.main-nav-list a.active::after {
  width: 100%;
}

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1002;
  position: relative;
  width: 30px;
  height: 24px;
  box-sizing: content-box;
}

.hamburger-menu::before,
.hamburger-menu::after,
.hamburger-menu span {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--text-main-color);
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu::before { top: 0; }
.hamburger-menu span { top: 10px; }
.hamburger-menu::after { top: 20px; }

.hamburger-menu.active::before {
  transform: translateY(10px) rotate(45deg);
}
.hamburger-menu.active span {
  opacity: 0;
}
.hamburger-menu.active::after {
  transform: translateY(-10px) rotate(-45deg);
}

/* Overlay for mobile menu */
.overlay {
  display: none;
  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;
  opacity: 0;
}

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

/* Footer styles */
.site-footer {
  background-color: var(--bg-color);
  color: var(--text-main-color);
  padding: 40px 0 0;
  border-top: 1px solid var(--border-color);
}

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

.footer-col {
  padding: 0;
}

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

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

.footer-title {
  font-size: 18px;
  color: var(--accent-color);
  margin-bottom: 15px;
  white-space: nowrap;
}

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

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

.footer-nav a {
  color: var(--text-main-color);
  font-size: 14px;
  transition: color 0.3s ease;
}

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

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

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

  body {
    overflow-x: hidden;
  }

  /* Header adjustments */
  .header-top {
    min-height: 60px;
    height: 60px;
    padding: 0 15px; /* Mobile header-top needs padding as container max-width is removed */
    position: relative; /* For absolute positioning of logo */
  }

  .header-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0; /* Reset container padding, header-top handles it */
    justify-content: flex-start; /* Adjust for hamburger and centered logo */
    position: static; /* Reset from relative if set for logo */
  }

  .logo {
    flex: 1 !important; /* Take available space */
    display: flex !important; /* Force flex for centering */
    justify-content: center !important; /* Center logo */
    align-items: center !important;
    position: absolute; /* Absolute positioning for logo to truly center */
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Leave space for hamburger */
    height: 100%; /* Ensure it spans full height of header-top */
    z-index: 1; /* Ensure it's below hamburger if needed */
  }

  .logo img {
    max-height: 56px !important; /* Smaller logo on mobile */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    min-height: 48px;
    height: auto; /* Allow height to adjust if text wraps */
    align-items: center;
    justify-content: center; /* Center buttons horizontally */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 15px; /* Adjust padding for mobile buttons row */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay on one line */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Max width for two buttons with gap */
    box-sizing: border-box;
    padding: 8px 12px; /* Smaller padding for mobile buttons */
    font-size: 13px; /* Smaller font for mobile buttons */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Ensure text wraps within button */
    overflow-wrap: break-word;
    text-align: center;
  }

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    position: relative;
    z-index: 1002; /* Ensure it's above logo */
    margin-left: 0; /* Align to left edge of header-top */
    margin-right: auto; /* Push logo to center */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below header and mobile buttons */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Max width for mobile menu */
    height: calc(100vh - var(--header-offset)); /* Full height minus header */
    background-color: var(--card-bg-color); /* Menu background */
    z-index: 1001;
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease, display 0.3s ease; /* Transition for sliding */
    overflow-y: auto; /* Scrollable if content is long */
    border-top: none; /* Remove border from main-nav */
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start; /* Align menu items to the left */
    padding: 20px 15px; /* Padding inside mobile menu */
    height: auto; /* Allow height to expand with content */
    max-width: none; /* No max-width */
    width: 100%;
  }

  .main-nav-list {
    flex-direction: column;
    width: 100%;
    gap: 0; /* Remove gap for vertical list */
  }

  .main-nav-list li {
    width: 100%;
    border-bottom: 1px solid var(--border-color); /* Separator for menu items */
  }

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

  .main-nav-list a {
    padding: 15px 0; /* Larger clickable area */
    display: block;
    width: 100%;
  }

  .main-nav-list a::after {
    display: none; /* Hide underline effect on mobile menu */
  }

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

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

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

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

/* Ensure body does not scroll when mobile menu is open */
body.no-scroll {
  overflow: 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;
  }
}
/* 内容保护（系统追加，请勿删除） */
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;
}
