/* General Body Styles */
:root {
  --primary-color: #F2C14E;
  --accent-color: #FFD36B;
  --button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  --card-bg: #111111;
  --page-bg: #0A0A0A;
  --text-main: #FFF6D6;
  --border-color: #3A2A12;
  --glow-color: #FFD36B;
  --header-offset: 122px; /* Desktop: 68px (top bar) + 52px (main nav) = 120px, +2px buffer */
}

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Fixed header offset */
  background-color: var(--page-bg);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll on desktop too */
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--card-bg); /* Use a dark background for contrast with gold */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  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; /* Adjust padding for desktop */
  display: flex;
  align-items: center;
  justify-content: space-between; /* Distribute items */
  width: 100%;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  flex-shrink: 0;
  display: block; /* Ensure logo is always visible */
  order: 1; /* For desktop, logo is left */
  text-shadow: 0 0 8px var(--glow-color);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  font-size: 30px;
  color: var(--text-main);
  cursor: pointer;
  padding: 5px;
  line-height: 1;
  order: 0; /* For mobile, hamburger is left */
}

.main-nav {
  display: flex; /* Displayed on desktop */
  flex-direction: row;
  justify-content: center; /* Center nav links */
  align-items: center;
  flex: 1; /* Takes available space */
  gap: 25px; /* Spacing between nav links */
  order: 2; /* For desktop, nav is center */
}

.main-nav .nav-link {
  color: var(--text-main);
  text-decoration: none;
  font-weight: bold;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
}

.main-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.main-nav .nav-link:hover {
  color: var(--primary-color);
}

.main-nav .nav-link:hover::after {
  width: 100%;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  text-decoration: none; /* Remove underline for buttons */
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn-login {
  background: var(--button-gradient);
  color: #3A2A12; /* Darker text for login button */
  box-shadow: 0 4px 15px rgba(255, 211, 107, 0.4);
}

.btn-login:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 211, 107, 0.6);
}

.btn-register {
  background: var(--primary-color);
  color: var(--page-bg);
  box-shadow: 0 4px 15px rgba(242, 193, 78, 0.4);
}

.btn-register:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(242, 193, 78, 0.6);
}

.desktop-nav-buttons {
  display: flex; /* Visible on desktop */
  gap: 12px;
  margin-left: auto; /* Push to the right */
  order: 3; /* For desktop, buttons are right */
  flex-shrink: 0;
}

.mobile-nav-buttons {
  display: none !important; /* Hidden on desktop */
  gap: 8px;
  flex-shrink: 0;
  order: 3; /* For mobile, buttons are right */
}

/* Mobile Navigation Overlay */
.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: var(--card-bg); /* Dark background for footer */
  color: var(--text-main);
  padding: 40px 20px 20px;
  border-top: 1px solid var(--border-color);
  font-size: 14px;
}

.footer-content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}

.footer-col {
  padding-right: 15px;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  margin-bottom: 15px;
  display: block;
  text-shadow: 0 0 5px var(--glow-color);
}

.footer-description {
  color: #bbb;
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

.footer-nav .nav-link {
  display: block;
  color: #bbb;
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.footer-nav .nav-link:hover {
  color: var(--primary-color);
}

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

.footer-bottom p {
  margin: 0;
}

/* Dynamic slot anchor styles - ensure visibility */
.footer-slot-anchor, .footer-slot-anchor-inner {
  min-height: 1px; /* Ensure it takes up space even if empty */
  width: 100%;
}

/* Mobile specific styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: 60px (top bar) + 48px (main nav) = 108px, +2px buffer */
  }

  body {
    padding-top: var(--header-offset);
    overflow-x: hidden; /* Prevent horizontal scroll */
  }

  .site-header {
    min-height: 50px; /* Adjust header height for mobile */
  }

  .header-container {
    width: 100%; /* Must be 100% */
    max-width: none; /* Must not have max-width */
    padding: 10px 15px; /* Smaller padding for mobile */
    justify-content: space-between;
    position: relative; /* For logo absolute positioning if needed */
  }

  .hamburger-menu {
    display: block; /* Visible on mobile */
    z-index: 1001; /* Above other elements */
    order: 0;
  }

  .logo {
    flex: 1 !important; /* Take available space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    order: 1;
    max-width: calc(100% - 100px); /* Adjust max-width if logo is image and takes too much space */
  }

  /* Mobile main nav (drawer) */
  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 280px; /* Drawer width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--card-bg);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    z-index: 999; /* Below hamburger, above overlay */
    padding: 20px;
    align-items: flex-start;
    gap: 15px;
    overflow-y: auto; /* Enable scrolling for long menus */
  }

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

  .main-nav .nav-link {
    width: 100%;
    padding: 10px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--border-color);
  }
  .main-nav .nav-link:last-child {
    border-bottom: none;
  }
  .main-nav .nav-link::after {
    display: none; /* Hide underline effect in mobile menu */
  }


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

  .mobile-nav-buttons {
    display: flex !important; /* Visible on mobile */
    order: 2;
    margin-left: auto; /* Push to the right */
    gap: 8px;
  }
  
  .mobile-menu-overlay.active {
    display: block;
    opacity: 1;
  }

  /* Footer mobile layout */
  .footer-container {
    grid-template-columns: 1fr; /* Single column on mobile */
  }

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

  .footer-col:last-child {
    margin-bottom: 0;
  }

  /* Mobile content overflow prevention */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
