:root { --header-offset: 122px; }
body {
  padding-top: var(--header-offset);
  margin: 0;
  font-family: Arial, sans-serif;
  color: #FFF6D6;
  background-color: #0A0A0A;
  overflow-x: hidden;
}

/* Site Header - Fixed Navigation */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #0A0A0A; /* Dark background for header */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  min-height: 60px;
  display: flex;
  align-items: center;
}

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

.logo {
  color: #F2C14E;
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 20px;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  font-size: 30px;
  color: #F2C14E;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  z-index: 1001;
}

.main-nav {
  flex: 1;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 25px;
}

.main-nav .nav-link {
  color: #FFF6D6;
  text-decoration: none;
  font-size: 17px;
  padding: 8px 0;
  position: relative;
  transition: color 0.3s ease;
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
  color: #FFD36B;
}

.main-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: #FFD36B;
  transition: width 0.3s ease, left 0.3s ease;
}

.main-nav .nav-link:hover::after,
.main-nav .nav-link.active::after {
  width: 100%;
  left: 0;
}

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

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

.btn {
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #FFF6D6;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-login,
.btn-register {
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  color: #0A0A0A;
}

.btn-login:hover,
.btn-register:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 15px #FFD36B;
}

.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;
  backdrop-filter: blur(3px);
}

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

/* Site Footer */
.site-footer {
  background-color: #111111; /* Card BG color */
  color: #FFF6D6;
  padding: 40px 0 20px;
  font-size: 15px;
  line-height: 1.6;
}

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

.footer-col {
  margin-bottom: 20px;
}

.footer-logo {
  color: #F2C14E;
  font-size: 26px;
  font-weight: bold;
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-description {
  font-size: 14px;
  color: #FFF6D6;
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-title {
  font-size: 18px;
  color: #FFD36B;
  margin-bottom: 20px;
  position: relative;
}

.footer-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 40px;
  height: 2px;
  background-color: #FFD36B;
}

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

.footer-nav .nav-link {
  color: #FFF6D6;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav .nav-link:hover {
  color: #FFD36B;
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #3A2A12; /* Border color */
  font-size: 14px;
  color: #FFF6D6;
}

.footer-bottom p {
  margin: 0;
}

.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure visibility for content injection */
}

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

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

  .hamburger-menu {
    display: block;
    flex-shrink: 0;
    margin-right: 15px;
  }

  .logo {
    flex: 1;
    text-align: center;
    margin: 0; /* Remove desktop margin */
    font-size: 24px;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 80%; /* Menu width */
    height: calc(100% - var(--header-offset));
    background-color: #111111; /* Card BG for menu */
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.4);
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease-out;
    z-index: 1000;
    padding: 20px;
    align-items: flex-start;
    gap: 15px;
    overflow-y: auto;
  }

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

  .main-nav .nav-link {
    font-size: 18px;
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid #3A2A12;
  }

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

  .main-nav .nav-link::after {
    display: none; /* Hide underline animation on mobile menu */
  }

  .desktop-nav-buttons {
    display: none !important;
  }

  .mobile-nav-buttons {
    display: flex !important;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 15px; /* Space from logo */
  }

  .btn {
    padding: 8px 15px;
    font-size: 14px;
  }

  .footer-container {
    grid-template-columns: 1fr;
    padding: 0 15px;
  }

  .footer-col {
    margin-bottom: 30px;
  }

  .footer-title {
    font-size: 17px;
  }

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

/* Ensure body padding-top is applied once */
body { padding-top: var(--header-offset); }
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
