:root {
  --primary-color: #F2C14E;
  --secondary-color: #FFD36B;
  --button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  --card-bg: #111111;
  --body-bg: #0A0A0A;
  --text-main: #FFF6D6;
  --border-color: #3A2A12;
  --glow-color: #FFD36B;
  --header-offset: 122px; /* Desktop no marquee */
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Important for fixed header */
  background-color: var(--body-bg);
  color: var(--text-main);
}

/* Header Styles */
.site-header {
  background-color: var(--card-bg); /* Dark background for header */
  width: 100%;
  position: fixed;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); /* Subtle shadow for floating effect */
  min-height: 60px; /* Ensure content adaptation */
  display: flex; /* For centering header-container */
  align-items: center; /* For vertical alignment of header-container */
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 30px; /* Adjusted padding for desktop */
  display: flex;
  align-items: center;
  width: 100%; /* Ensure it spans max-width */
}

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

.main-nav {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 30px;
  flex: 1; /* Occupy middle space */
  order: 2;
}

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

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

/* Buttons */
.desktop-nav-buttons {
  display: flex; /* Default for desktop */
  gap: 12px;
  margin-left: auto; /* Push to the right */
  flex-shrink: 0;
  order: 3;
}

.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: 15px;
  color: var(--text-main); /* Text Main for button text */
  background: var(--button-gradient);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.btn-login {
  /* Specific styling if needed, otherwise uses .btn */
}

.btn-register {
  /* Specific styling if needed, otherwise uses .btn */
}

/* Hamburger menu (hidden by default on desktop) */
.hamburger-menu {
  display: none;
  background: none;
  border: none;
  font-size: 30px;
  color: var(--text-main);
  cursor: pointer;
  z-index: 1001; /* Above other header elements */
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  order: 1; /* For mobile: hamburger, logo, buttons */
}

/* Mobile menu 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; /* Below mobile menu, above content */
  transition: opacity 0.3s ease;
  opacity: 0;
}

.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);
  font-size: 14px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

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

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

.footer-description {
  line-height: 1.6;
  color: #a0a0a0; /* Slightly lighter for readability */
  word-wrap: break-word; /* Ensure long words break */
  overflow-wrap: break-word; /* Ensure long words break */
}

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

.footer-nav a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  color: #a0a0a0;
}

/* Ensure slot anchors are visible */
.footer-slot-anchor, .footer-slot-anchor-inner {
  display: block; /* Ensure visibility */
  min-height: 1px; /* Smallest possible height to be rendered */
}

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

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

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

  .site-header .header-container {
    width: 100%;
    max-width: none; /* Crucial: no max-width on mobile */
    padding: 10px 15px; /* Smaller padding for mobile */
    position: relative; /* For logo absolute positioning if needed */
    min-height: 50px;
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1;
    font-size: 24px; /* Adjust size for mobile */
    margin-right: 10px; /* Space between hamburger and logo */
    position: relative;
    z-index: 1001; /* Ensure it's clickable */
  }

  .logo {
    flex: 1 !important; /* Occupy space */
    display: flex !important; /* Use flex to center image/text */
    justify-content: center !important; /* Center horizontally */
    align-items: center !important; /* Center vertically */
    font-size: 24px; /* Adjust logo size for mobile */
    order: 2;
    max-width: calc(100% - 100px); /* Prevent logo from overlapping buttons/hamburger */
  }

  /* If logo is an image, ensure it scales */
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px; /* Max height for mobile logo */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 280px; /* Width of the mobile menu */
    height: calc(100% - var(--header-offset));
    background-color: var(--card-bg); /* Match header background */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    padding: 20px;
    z-index: 999; /* Below overlay, above content */
    overflow-y: auto; /* Allow scrolling for long menus */
    align-items: flex-start; /* Align links to the left */
    gap: 15px; /* Space between menu items */
  }

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

  .nav-link {
    width: 100%; /* Full width links */
    padding: 10px 0;
    font-size: 18px;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    gap: 8px;
    margin-left: auto; /* Push to the right */
    flex-shrink: 0;
    order: 3;
    z-index: 1001; /* Ensure buttons are clickable above overlay */
  }

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

  .footer-container {
    grid-template-columns: 1fr; /* Single column layout for footer on mobile */
    padding: 0 15px;
  }

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

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