:root {
  --header-offset: 122px; /* Desktop without marquee */
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #FFF6D6;
  background-color: #0A0A0A;
  padding-top: var(--header-offset);
  overflow-x: hidden; /* Prevent horizontal scroll on desktop too */
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #0A0A0A; /* Background color */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  min-height: 60px; /* Ensure content adaptation */
  display: flex;
  align-items: center;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 30px;
  display: flex;
  align-items: center;
  width: 100%; /* Ensure it spans 100% of its parent before max-width applies */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #F2C14E; /* Primary color for logo */
  text-decoration: none;
  flex-shrink: 0;
  line-height: 1;
  display: block; /* Ensure logo is always visible */
}

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

.nav-link {
  color: #FFF6D6; /* Text Main */
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: #FFD36B; /* Glow */
}

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

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

.btn {
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 15px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  color: #FFF6D6; /* Text Main for button text */
  white-space: nowrap;
}

.btn-login {
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  border: 1px solid #DDA11D;
}

.btn-login:hover {
  background: linear-gradient(180deg, #FFE080 0%, #E6B02A 100%);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
}

.btn-register {
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  border: 1px solid #DDA11D;
}

.btn-register:hover {
  background: linear-gradient(180deg, #FFE080 0%, #E6B02A 100%);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
}

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001; /* Above other header elements */
  flex-shrink: 0;
}

.hamburger-icon {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #F2C14E; /* Primary color */
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-icon:nth-child(1) { top: 0; }
.hamburger-icon:nth-child(2) { top: 10px; }
.hamburger-icon:nth-child(3) { top: 20px; }

.hamburger-menu.active .hamburger-icon:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}
.hamburger-menu.active .hamburger-icon:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active .hamburger-icon:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

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

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

/* Footer Styles */
.site-footer {
  background-color: #0A0A0A; /* Background color */
  padding: 40px 0 20px;
  color: #FFF6D6;
  font-size: 14px;
  border-top: 1px solid #3A2A12; /* 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 h3 {
  color: #F2C14E; /* Primary color for headings */
  font-size: 18px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

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

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

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

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

.footer-nav a {
  color: #FFF6D6; /* Text Main */
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #FFD36B; /* Glow */
}

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

/* Ensure slot anchors are visible and not hidden */
.footer-slot-anchor,
.footer-slot-anchor-inner {
  /* These elements are placeholders, they should not have styles that hide content */
  display: block; /* Ensure they take up space if needed */
  min-height: 1px; /* Smallest possible height to be present */
  visibility: visible; /* Ensure visibility */
  opacity: 1; /* Ensure full opacity */
  overflow: visible; /* Ensure content is not clipped */
}

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

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

  .hamburger-menu {
    display: block;
  }

  .logo {
    flex: 1;
    text-align: center;
    font-size: 24px;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 80%;
    max-width: 300px; /* Limit mobile menu width */
    height: calc(100vh - var(--header-offset));
    background-color: #111111; /* Card BG */
    flex-direction: column;
    padding: 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
  }

  .main-nav.active {
    display: flex; /* Must be flex to show items */
    transform: translateX(0);
  }

  .nav-link {
    padding: 15px 0;
    font-size: 18px;
    border-bottom: 1px solid #3A2A12; /* 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 */
    gap: 8px;
    flex-shrink: 0;
  }

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

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

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

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

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

  .footer-nav li {
    display: inline-block;
    margin: 0 10px 10px 10px;
  }
}

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;
  }
}
