/* General Reset & Base Styles */
html {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--site-bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
*, *::before, *::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}
body {
  margin: 0;
  padding-top: var(--header-offset); /* Critical for fixed header */
  font-size: 16px;
  overflow-x: hidden; /* Prevent horizontal scroll from fixed elements */
}
a {
  text-decoration: none;
  color: var(--text-main);
  transition: color 0.3s ease;
}
a:hover {
  color: var(--primary-color);
}
ul {
  list-style: none;
}
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  margin-bottom: 0.5em;
  line-height: 1.2;
}

/* Color Variables */
:root {
  --primary-color: #F2C14E;
  --secondary-color: #FFD36B;
  --card-bg: #111111;
  --site-bg: #0A0A0A;
  --text-main: #FFF6D6;
  --border-color: #3A2A12;
  --glow-color: #FFD36B;
  --button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);

  /* Header Offset - No marquee for this version */
  --header-offset: 122px; /* 68px (header-top) + 52px (main-nav) + 2px buffer */
}

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  background-color: var(--site-bg); /* Base background for the entire header */
}

/* Header Top */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px; /* Fixed height for desktop */
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #1A1A1A; /* Darker background, distinct from main-nav */
  width: 100%;
}
.header-container {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px; /* Padding for logo and buttons */
}
.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block; /* Ensure it's not inline for flex alignment */
}
.logo img { /* If logo is an image */
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}
.desktop-nav-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Mobile Nav Buttons - Hidden by default on desktop */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px; /* Fixed height for mobile */
  background-color: #222222; /* Slightly different background for mobile button row */
  width: 100%;
  padding: 0 15px; /* Mobile padding */
  justify-content: center;
  align-items: center;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* Main Navigation */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px; /* Fixed height for desktop */
  display: flex; /* Desktop: visible, row layout */
  align-items: center;
  overflow: hidden;
  background-color: #2A2A2A; /* Lighter background, distinct from header-top */
  width: 100%;
}
.nav-container {
  box-sizing: border-box;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center; /* Center main nav links */
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap; /* Allow wrapping if many links, but generally should fit */
}
.nav-link {
  display: block;
  padding: 10px 15px;
  font-size: 15px;
  font-weight: bold;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  color: var(--primary-color);
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

/* Hamburger Menu (Desktop: hidden) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1001; /* Above header */
}
.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--text-main);
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}
.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 10px; }
.hamburger-menu span:nth-child(3) { top: 20px; }

/* Hamburger Menu Active State */
.hamburger-menu.active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}
.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999; /* Below menu, above main content */
  display: none; /* Hidden by default */
  transition: opacity 0.3s ease;
  opacity: 0;
}
.overlay.active {
  display: block;
  opacity: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  color: #111111; /* Dark text for light button gradient */
  background: var(--button-gradient);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  white-space: nowrap; /* Prevent text wrapping on desktop */
  text-decoration: none;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  color: #000000; /* Ensure text remains dark on hover */
}
.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Footer */
.site-footer {
  background-color: var(--card-bg); /* Footer background */
  padding: 40px 0 20px;
  color: var(--text-main);
  border-top: 1px solid var(--border-color);
}
.footer-top-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}
.footer-col {
  display: flex;
  flex-direction: column;
}
.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
}
.footer-description {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.7);
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.footer-col h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--secondary-color);
  text-transform: uppercase;
}
.footer-nav li {
  margin-bottom: 8px;
}
.footer-nav a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}
.footer-nav a:hover {
  color: var(--primary-color);
}
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 30px 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}
.footer-bottom p {
  margin: 0;
}

/* Footer Slot Anchors - Must be present but empty */
.footer-slot-anchor-inner {
  /* This container is for dynamic content injection, keep it empty and visible */
  min-height: 1px; /* Ensure it takes up minimal space if empty */
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* 60px (header-top) + 48px (main-nav) + 2px buffer */
  }

  body {
    overflow-x: hidden; /* Ensure no horizontal scroll on mobile */
  }

  /* Image overflow prevention in content area */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

  /* Header adjustments */
  .site-header {
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
  }

  .header-top {
    min-height: 60px !important;
    height: 60px !important; /* Fixed height for mobile */
    padding: 0 15px; /* Mobile padding */
    justify-content: space-between; /* Hamburger left, Logo center, empty right */
    position: relative; /* For absolute logo positioning if needed */
  }
  .header-container {
    padding: 0; /* Remove desktop padding */
    width: 100%;
    max-width: none; /* Crucial for mobile full width */
  }

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    order: -1; /* Place hamburger menu first */
  }

  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important; /* Center the logo */
    align-items: center !important;
    font-size: 24px;
    max-width: calc(100% - 100px); /* Leave space for hamburger and potential right element */
  }
  .logo img { /* If logo is an image */
    max-height: 56px !important; /* Fixed height for mobile */
  }
  .desktop-nav-buttons {
    display: none !important; /* Hide desktop buttons */
  }

  /* Mobile Nav Buttons - Always visible below header-top */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    height: auto; /* Allow height to adjust if text wraps */
    align-items: center;
    justify-content: center;
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding: 8px 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay in one row */
    box-shadow: 0 1px 5px rgba(0,0,0,0.3);
    background-color: #222222;
  }
  .mobile-nav-buttons .btn {
    flex: 1; min-width: 0;
    max-width: calc(50% - 5px); /* Ensure two buttons fit with gap */
    box-sizing: border-box;
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Main Navigation (Mobile) - Hidden by default, slides in */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below header */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px;
    height: calc(100vh - var(--header-offset)); /* Full height below header */
    background-color: #111111; /* Menu background */
    flex-direction: column; /* Vertical menu */
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease;
    z-index: 1000; /* Same as header or slightly above */
    overflow-y: auto; /* Enable scrolling for long menus */
    min-height: unset !important; /* Override fixed height */
    height: auto !important; /* Override fixed height */
  }
  .main-nav.active {
    display: flex; /* Show menu when active */
    transform: translateX(0); /* Slide into view */
  }
  .nav-container {
    flex-direction: column; /* Vertical menu items */
    justify-content: flex-start;
    align-items: flex-start;
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Full width for mobile container */
    height: auto;
  }
  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  /* Footer adjustments */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout for footer */
    padding: 0 20px;
  }
  .footer-col {
    margin-bottom: 20px;
  }
  .footer-bottom {
    padding: 15px 20px 0;
  }
}

/* No-scroll class for body */
body.no-scroll {
  overflow: 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;
  }
}
/* 内容保护（系统追加，请勿删除） */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}
