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

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

/* Site Header - Fixed Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--background-color); /* Dark background for header */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); /* Suspended effect */
  z-index: 1000;
  min-height: 60px; /* Ensure minimum height */
  display: flex; /* For centering the container */
  align-items: center;
}

.header-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 15px 30px; /* Desktop padding */
  display: flex;
  align-items: center;
  justify-content: space-between; /* Distribute items */
}

/* Logo */
.logo {
  font-size: 2.2em;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  flex-shrink: 0; /* Prevent logo from shrinking */
  order: 1; /* Desktop: Logo first */
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  font-size: 2em;
  color: var(--text-main-color);
  cursor: pointer;
  padding: 5px;
  z-index: 1001; /* Above other elements */
}

/* Main Navigation */
.main-nav {
  display: flex; /* Desktop: Flex row */
  flex-direction: row;
  flex: 1; /* Take available space */
  justify-content: center; /* Center nav links */
  align-items: center;
  gap: 25px; /* Spacing between nav links */
  order: 2; /* Desktop: Nav in middle */
}

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

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

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

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

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

/* Mobile Navigation Buttons (Hidden on Desktop) */
.mobile-nav-buttons {
  display: none !important; /* Hidden on desktop, forced */
}

/* Buttons */
.btn {
  background: var(--button-gradient); /* Gradient background */
  color: var(--background-color); /* Dark text on bright button */
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4), 0 0 15px var(--glow-color); /* Add glow on hover */
}

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

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

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

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

.footer-logo {
  font-size: 2.5em;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-description {
  font-size: 0.9em;
  line-height: 1.8;
  color: rgba(255, 246, 214, 0.8);
  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-color);
  text-decoration: none;
  font-size: 0.95em;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  margin-top: 20px;
  font-size: 0.85em;
  color: rgba(255, 246, 214, 0.7);
}

/* Footer slot anchors - must be visible for content injection */
.footer-slot-anchor, .footer-slot-anchor-inner {
  /* Ensure these are not hidden by default */
  display: block;
  min-height: 1px; /* Smallest possible height to ensure it's rendered */
}

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

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

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

  .header-container {
    width: 100%; /* Full width on mobile */
    max-width: none; /* No max-width restriction */
    padding: 10px 15px; /* Mobile padding */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* For absolute positioning of logo if needed */
  }

  /* Hamburger Menu (Visible on Mobile) */
  .hamburger-menu {
    display: block; /* Show hamburger */
    order: 1; /* First item */
    flex-shrink: 0;
  }

  /* Logo (Centered on Mobile) */
  .logo {
    order: 2; /* Second item */
    flex: 1 !important; /* Take available space */
    display: flex !important; /* Use flex for centering content */
    justify-content: center !important; /* Center horizontally */
    align-items: center !important; /* Center vertically */
    font-size: 1.8em; /* Adjust font size for mobile */
    max-width: calc(100% - 100px); /* Ensure logo doesn't overlap buttons/hamburger */
  }
  /* If the logo was an image, this would be for the img tag inside .logo */
  .logo img {
      display: block !important;
      max-width: 100%;
      height: auto;
      max-height: 40px;
  }

  /* Main Navigation (Hidden by default, slide-in from left) */
  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Start below the header */
    left: 0;
    width: 280px; /* Width of the mobile menu */
    max-width: 80%; /* Max width for smaller screens */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--card-bg-color); /* Menu background */
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.4);
    transform: translateX(-100%); /* Initially off-screen to the left */
    transition: transform 0.3s ease;
    padding: 20px 0;
    align-items: flex-start; /* Align links to the left */
    gap: 15px;
    overflow-y: auto; /* Enable scrolling for long menus */
    z-index: 999; /* Below hamburger, above content */
  }

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

  .main-nav .nav-link {
    width: 100%;
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255, 246, 214, 0.1);
  }
  .main-nav .nav-link:last-child {
    border-bottom: none;
  }
  .main-nav .nav-link::after {
    display: none; /* Hide underline animation for mobile menu items */
  }

  /* Desktop Navigation Buttons (Hidden on Mobile) */
  .desktop-nav-buttons {
    display: none !important; /* Hidden on mobile, forced */
  }

  /* Mobile Navigation Buttons (Visible on Mobile) */
  .mobile-nav-buttons {
    display: flex !important; /* Visible on mobile, forced */
    gap: 8px;
    order: 3; /* Last item */
    flex-shrink: 0;
  }

  /* Overlay for mobile menu */
  .mobile-menu-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay */
    z-index: 998; /* Below menu, above content */
  }

  .mobile-menu-overlay.active {
    display: block; /* Show overlay when active */
  }

  /* Prevent body scroll when menu is open */
  body.no-scroll {
    overflow: hidden;
  }

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

  .footer-content {
    padding: 0 20px;
  }

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

  .footer-logo {
    font-size: 2em;
  }

  /* Mobile content area protection */
  .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;
  }
}
