: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 */
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  background-color: var(--page-bg);
  color: var(--text-main);
  overflow-x: hidden; /* Prevent horizontal scroll */
  min-height: 100vh; /* Ensure body takes full viewport height */
}

a {
  text-decoration: none;
  color: var(--text-main);
}

a.btn {
  text-decoration: none; /* Remove underline for buttons */
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--card-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); /* Suspended effect */
  z-index: 1000;
  min-height: 68px; /* Base height for header content */
  display: flex;
  align-items: center;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px; /* Desktop padding */
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 52px; /* Main nav bar height */
}

.logo, .footer-logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 0;
  flex-shrink: 0;
  display: block; /* Ensure logo is visible by default */
}

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

.main-nav {
  flex: 1;
  display: flex; /* Desktop: flex row */
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 25px; /* Desktop menu item spacing */
  padding: 0 20px;
}

.main-nav .nav-link {
  font-size: 17px;
  font-weight: bold;
  color: var(--text-main);
  padding: 10px 0;
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevent wrapping */
}

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

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

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

.btn {
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  border: none;
}

.btn-login, .btn-register {
  background: var(--button-gradient);
  color: var(--card-bg); /* Dark text on light button */
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(var(--glow-color), 0.4);
}

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

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

/* Footer Styles */
.site-footer {
  background-color: var(--card-bg);
  padding: 40px 0 20px;
  color: var(--text-main);
  border-top: 1px solid var(--border-color);
}

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

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

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

.footer-about .footer-logo {
  font-size: 24px;
  margin-bottom: 15px;
  display: inline-block;
  color: var(--primary-color);
}

.footer-description {
  font-size: 14px;
  line-height: 1.6;
  color: #BBB; /* Slightly lighter text for description */
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

.footer-nav a {
  font-size: 15px;
  color: #BBB;
  transition: color 0.3s ease;
}

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

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

.footer-slot-anchor, .footer-slot-anchor-inner {
  min-height: 1px; /* Ensure they occupy space */
  width: 100%;
}

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

  body {
    padding-top: var(--header-offset);
    overflow-x: hidden;
  }
  
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

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

  .header-container {
    padding: 0 15px; /* Mobile padding */
    max-width: none; /* Remove max-width on mobile */
    width: 100%; /* Ensure full width */
    position: relative; /* For logo absolute positioning if needed */
    min-height: 48px; /* Mobile main nav bar height */
  }

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    order: 1; /* First element */
    z-index: 1001;
  }

  .logo {
    order: 2; /* Second element */
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px; /* Adjust logo size for mobile */
    padding: 5px 0;
  }
  
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px; /* Control image logo height */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Start below header */
    left: 0;
    width: 280px; /* Sidebar width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--card-bg);
    padding: 20px;
    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: 1000;
    align-items: flex-start; /* Align nav items to start */
    gap: 15px;
    overflow-y: auto; /* Allow scrolling for many nav items */
  }

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

  .main-nav .nav-link {
    width: 100%; /* Full width for mobile nav items */
    padding: 12px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--border-color);
  }
  .main-nav .nav-link:last-child {
    border-bottom: none;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    order: 3; /* Third element */
    gap: 8px;
    flex-shrink: 0;
    z-index: 1000; /* Ensure buttons are above overlay */
  }

  .mobile-nav-buttons .btn {
    padding: 8px 15px; /* Smaller buttons for mobile */
    font-size: 14px;
    border-radius: 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }

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

  .footer-about .footer-logo {
    margin-bottom: 10px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
