:root {
  --header-offset: 122px;
}

body {
  padding-top: var(--header-offset);
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #0A0A0A; /* Background */
  color: #FFF6D6; /* Text Main */
  overflow-x: hidden; /* Prevent horizontal scroll on desktop */
  min-height: 100vh; /* Ensure body takes full viewport height */
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #1a1a1a; /* Darker background for contrast with gold/red */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  min-height: 80px; /* Ensure sufficient height for content */
  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 {
  font-size: 2.2em;
  font-weight: bold;
  color: #F2C14E; /* Primary color */
  text-decoration: none;
  flex-shrink: 0;
  padding-right: 20px;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(242, 193, 78, 0.6);
}

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

.nav-link {
  color: #FFF6D6; /* Text Main */
  text-decoration: none;
  font-size: 1.1em;
  font-weight: 600;
  padding: 8px 12px;
  transition: color 0.3s ease, background-color 0.3s ease;
  border-radius: 5px;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: #0A0A0A; /* Dark text for contrast */
  background-color: #F2C14E; /* Primary color */
}

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

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

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

.btn-login {
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  box-shadow: 0 0 15px #FFD36B; /* Glow */
}

.btn-register {
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  box-shadow: 0 0 15px #FFD36B; /* Glow */
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), 0 0 20px #FFD36B;
}

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

.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: 50%; transform: translateY(-50%); }
.hamburger-icon:nth-child(3) { bottom: 0; }

.hamburger-menu.active .hamburger-icon:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}
.hamburger-menu.active .hamburger-icon:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active .hamburger-icon:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) 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: 999;
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

/* Footer Styles */
.site-footer {
  background-color: #111111; /* Card B G */
  padding: 40px 0 20px;
  border-top: 1px solid #3A2A12; /* Border */
  color: #FFF6D6; /* Text Main */
  text-align: center;
  margin-top: auto; /* Push footer to bottom */
}

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

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: left;
  margin-bottom: 40px;
}

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

.footer-logo {
  font-size: 1.8em;
  font-weight: bold;
  color: #F2C14E; /* Primary color */
  text-decoration: none;
  margin-bottom: 15px;
  display: block;
  letter-spacing: 1px;
  text-shadow: 0 0 5px rgba(242, 193, 78, 0.4);
}

.footer-description {
  font-size: 0.9em;
  line-height: 1.6;
  color: #ccc;
  word-wrap: break-word;
  overflow-wrap: break-word;
  margin-top: 15px;
}

.footer-title {
  font-size: 1.2em;
  color: #F2C14E; /* Primary color */
  margin-bottom: 20px;
  font-weight: bold;
}

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

.footer-nav .nav-link {
  color: #FFF6D6; /* Text Main */
  text-decoration: none;
  font-size: 0.95em;
  transition: color 0.3s ease;
  padding: 0;
  background-color: transparent;
  border-radius: 0;
  text-align: left;
}

.footer-nav .nav-link:hover {
  color: #FFD36B; /* Auxiliary color */
  background-color: transparent;
}

.footer-bottom {
  border-top: 1px solid #3A2A12; /* Border */
  padding-top: 20px;
  margin-top: 20px;
  font-size: 0.85em;
  color: #aaa;
}

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

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

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

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 1.8em;
    padding-right: 0;
    margin: 0 10px;
  }

  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 250px;
    height: calc(100% - var(--header-offset));
    background-color: #111111; /* Card B G */
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    box-sizing: border-box;
  }

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

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    font-size: 1em;
    border-bottom: 1px solid #3A2A12;
  }

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

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

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

  .hamburger-menu {
    display: block;
    order: -1; /* Place it at the beginning */
  }

  .mobile-menu-overlay {
    top: var(--header-offset);
    height: calc(100% - var(--header-offset));
  }

  .footer-cols {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }

  .footer-col {
    padding: 0;
  }

  .footer-nav .nav-link {
    text-align: center;
  }

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

  .footer-description {
    margin-top: 5px;
  }

  /* Mobile content overflow prevention */
  .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;
  }
}
