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

/* Reset and 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; /* Prevent horizontal scroll on body */
}

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

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

/* Header styles */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--bg-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  min-height: 60px; /* Ensure content adaptation */
  display: flex; /* For centering the container */
  align-items: center;
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  flex-shrink: 0;
  display: block; /* Ensure logo is visible by default */
}

.logo:hover {
  color: var(--secondary-color);
}

.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;
  flex-shrink: 0;
  z-index: 1001;
}

.main-nav {
  flex: 1;
  display: flex;
  flex-direction: row; /* Desktop horizontal */
  justify-content: center;
  align-items: center;
  gap: 25px;
  position: static; /* Desktop normal flow */
}

.nav-link {
  font-size: 16px;
  font-weight: bold;
  padding: 5px 0;
  white-space: nowrap;
}

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

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

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

.btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none; /* Remove underline */
  color: var(--bg-color); /* Dark text on bright button */
}

.btn-login {
  background: var(--button-gradient);
  color: #111111; /* Ensure dark text on bright button */
}

.btn-register {
  background: var(--button-gradient);
  color: #111111; /* Ensure dark text on bright button */
  box-shadow: 0 0 10px var(--glow-color); /* Add glow effect */
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 0 15px var(--glow-color);
}

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

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

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

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

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

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

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

.footer-nav .nav-link {
  font-size: 14px;
  padding: 0;
  font-weight: normal;
}

.footer-nav .nav-link:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

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

/* Dynamic slot anchor styles (must be visible) */
.footer-slot-anchor-inner,
.footer-top-slot,
.footer-mid-slot-1,
.footer-mid-slot-2,
.footer-mid-row-1 div,
.footer-mid-row-2 div,
.footer-bottom-slot {
  min-height: 1px; /* Ensure they take up minimal space but are not hidden */
  visibility: visible;
  opacity: 1;
  display: block;
}

/* Mobile styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px;
  }

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

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

  .header-container {
    padding: 8px 15px; /* Adjusted padding for mobile */
    width: 100%;
    max-width: none; /* No max-width on mobile */
    justify-content: space-between;
  }

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

  .logo {
    order: 2; /* Middle */
    flex: 1; /* Take available space to push buttons right */
    text-align: center; /* Center the text logo */
    font-size: 24px;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical for mobile menu */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 250px; /* Sidebar width */
    height: calc(100vh - var(--header-offset)); /* Full height below header */
    background-color: var(--card-bg-color); /* Menu background */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Slide out initially */
    transition: transform 0.3s ease;
    padding: 20px;
    align-items: flex-start;
    gap: 15px;
    z-index: 999; /* Below hamburger, above content */
    overflow-y: auto;
  }

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

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

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

  .mobile-nav-buttons {
    display: flex !important; /* Visible on mobile */
    order: 3; /* Rightmost */
    gap: 8px;
    flex-shrink: 0;
  }

  .mobile-menu-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998; /* Below menu, above content */
  }

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

  body.no-scroll {
    overflow: hidden;
  }

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

  .footer-col {
    margin-bottom: 20px;
  }
  .footer-col:last-child {
    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;
  }
}
