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

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  background-color: var(--body-bg-color);
  color: var(--text-main-color);
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

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

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  flex-shrink: 0;
  padding: 5px 0;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  font-size: 30px;
  color: var(--text-main-color);
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
  flex-shrink: 0;
}

.main-nav {
  flex: 1;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 25px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-nav .nav-link {
  color: var(--text-main-color);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  padding: 8px 0;
  transition: color 0.3s ease, transform 0.3s ease;
  position: relative;
}

.main-nav .nav-link:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

.main-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.main-nav .nav-link:hover::after {
  width: 100%;
}

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

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

.btn {
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 15px;
  font-weight: bold;
  text-decoration: none;
  color: #000;
  background: var(--button-gradient);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

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

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

.site-footer .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.footer-col {
  padding: 10px 0;
}

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

.footer-description {
  line-height: 1.6;
  color: rgba(255, 246, 214, 0.7);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-heading {
  font-size: 18px;
  color: var(--primary-color);
  margin-bottom: 20px;
  position: relative;
}

.footer-heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 30px;
  height: 2px;
  background-color: var(--primary-color);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav .nav-link {
  color: rgba(255, 246, 214, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

.footer-slot-anchor-inner {
  min-height: 1px;
  visibility: visible;
  opacity: 1;
  display: block;
}

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

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

  .site-header {
    min-height: 50px;
  }

  .header-container {
    width: 100%;
    max-width: none; /* Important: remove max-width */
    padding: 8px 15px;
    justify-content: space-between;
    position: relative; /* Needed for absolute positioning of logo */
  }

  .hamburger-menu {
    display: block;
    order: 1;
    font-size: 26px;
  }

  .hamburger-menu.active {
    color: var(--primary-color);
  }

  .logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    flex: none; /* Override flex: 1 from desktop */
    text-align: center;
    max-width: calc(100% - 140px); /* Adjust max-width to not overlap buttons/hamburger */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header */
    left: 0;
    width: 80%;
    max-width: 300px;
    height: calc(100vh - var(--header-offset));
    background-color: var(--card-bg-color);
    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;
    align-items: flex-start;
    gap: 15px;
  }

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

  .main-nav .nav-link {
    font-size: 18px;
    padding: 10px 0;
    width: 100%;
  }
  .main-nav .nav-link::after {
    height: 1px;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show on mobile */
    order: 3;
    gap: 8px;
    margin-left: auto;
  }
  
  .mobile-nav-buttons .btn {
      padding: 8px 15px;
      font-size: 14px;
  }

  .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);
    z-index: 998;
    transition: opacity 0.3s ease;
    opacity: 0;
  }

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

  /* Footer Mobile Styles */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-col.footer-about {
    order: -1;
  }
  
  .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;
  }
}
