:root {
  --primary-color: #F2C14E;
  --secondary-color: #FFD36B;
  --card-bg-color: #111111;
  --background-color: #0A0A0A;
  --text-main-color: #FFF6D6;
  --border-color: #3A2A12;
  --glow-color: #FFD36B;
  --header-offset: 122px; /* Desktop without marquee */
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  background-color: var(--background-color);
  color: var(--text-main-color);
  line-height: 1.6;
  overflow-x: hidden; /* Global for mobile safety */
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 25px;
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  color: #1A1A1A; /* Darker text for contrast on bright button */
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4), 0 0 15px var(--glow-color);
}

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--background-color); /* Use a darker background for the header for contrast */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  min-height: 60px; /* Ensure minimum height */
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  flex-shrink: 0;
  order: 1; /* For desktop layout */
}

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  font-size: 30px;
  color: var(--primary-color);
  cursor: pointer;
  padding: 5px;
  line-height: 1;
  z-index: 1001;
  order: 0; /* For mobile layout */
}

.main-nav {
  display: flex;
  flex-direction: row; /* Desktop horizontal */
  justify-content: center;
  align-items: center;
  gap: 25px;
  flex: 1; /* Occupy central space */
  order: 2; /* For desktop layout */
}

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

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

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

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

.desktop-nav-buttons {
  display: flex; /* Visible on desktop */
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
  order: 3; /* For desktop layout */
}

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

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

  body {
    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: 50px; /* Adjust for mobile */
  }

  .header-container {
    padding: 10px 15px; /* Smaller padding for mobile */
    max-width: none; /* Remove max-width for mobile */
    width: 100%; /* Ensure full width */
    justify-content: space-between;
  }

  .hamburger-menu {
    display: block;
    order: 0; /* Leftmost */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    order: 1; /* Center */
    max-width: calc(100% - 120px); /* Ensure space for buttons/hamburger */
  }

  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    gap: 8px;
    order: 2; /* Rightmost */
    margin-left: auto; /* Push to right */
  }

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

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

  .main-nav .nav-link {
    width: 100%;
    padding: 10px 0;
    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 for mobile menu items */
  }

  .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.6);
    z-index: 998;
    transition: opacity 0.3s ease-out;
    opacity: 0;
  }

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

  body.no-scroll {
    overflow: hidden;
  }
}

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

.footer-main-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 30px;
  text-align: left;
}

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

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

.footer-description {
  font-size: 14px;
  line-height: 1.8;
  color: #CCCCCC;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
  color: #AAAAAA;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
}

/* Anchor points visibility check */
.footer-slot-anchor, .footer-slot-anchor-inner {
  display: block;
  visibility: visible;
  opacity: 1;
  height: auto;
  max-height: none;
  overflow: visible;
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
