:root {
  --primary-color: #1A2E44;
  --accent-color: #FFD700;
  --text-color-light: #fff;
  --text-color-dark: #1A2E44;
  --header-offset: 122px; /* Desktop offset */
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color-light);
  background-color: #121212;
  padding-top: var(--header-offset); /* Mandatory body padding for fixed header */
}

body.no-scroll {
  overflow: hidden;
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--primary-color);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  min-height: 80px; /* Ensure content fits */
  display: flex;
  align-items: center;
}

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

.logo {
  flex-shrink: 0;
  font-size: 28px;
  font-weight: bold;
  color: var(--accent-color);
  text-decoration: none;
  padding-right: 20px; /* Spacing from hamburger or nav */
  display: block;
  line-height: 1;
}

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

.main-nav .nav-link {
  color: var(--text-color-light);
  text-decoration: none;
  font-size: 16px;
  padding: 10px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

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

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  font-size: 30px;
  color: var(--accent-color);
  cursor: pointer;
  padding: 5px 10px;
  flex-shrink: 0;
  line-height: 1;
  z-index: 1001;
}

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

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

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
  font-size: 15px;
}

.btn-login {
  background-color: var(--primary-color);
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
}

.btn-login:hover {
  background-color: var(--accent-color);
  color: var(--primary-color);
}

.btn-register {
  background-color: var(--accent-color);
  color: var(--primary-color);
  border: 1px solid var(--accent-color);
}

.btn-register:hover {
  background-color: var(--primary-color);
  color: var(--accent-color);
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

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

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

.footer-col h3 {
  color: var(--accent-color);
  font-size: 18px;
  margin-bottom: 15px;
}

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

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

.footer-nav a {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 20px;
  color: rgba(255, 255, 255, 0.5);
}

/* Footer Slot Anchors - ensure visibility for injected content */
.footer-slot-anchor,
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure it takes up space even if empty */
  /* Do not add display: none, visibility: hidden, opacity: 0, height: 0, max-height: 0, overflow: hidden */
}

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

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

  .header-container {
    width: 100%;
    max-width: none;
    padding: 10px 15px;
    justify-content: space-between;
  }

  .hamburger-menu {
    display: block;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding-right: 0;
  }

  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 70%;
    max-width: 300px;
    height: calc(100vh - var(--header-offset));
    background-color: var(--primary-color);
    flex-direction: column;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 1000;
    align-items: flex-start;
    gap: 15px;
  }

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

  .main-nav .nav-link {
    padding: 10px 0;
    width: 100%;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Forced visible on mobile */
    gap: 8px;
    flex-shrink: 0;
    margin-left: 10px;
  }

  .mobile-menu-overlay {
    z-index: 998;
  }

  .footer-container {
    grid-template-columns: 1fr;
  }

  .footer-col {
    text-align: center;
  }

  .footer-col h3 {
    margin-top: 20px;
  }

  .footer-logo {
    margin-bottom: 10px;
  }

  /* Mobile Overflow Protection (MUST) */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: 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;
  }
}
