
:root {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --bg-color: #08160F;
  --card-bg: #11271B;
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border-color: #2E7A4E;
  --glow-color: #57E38D;
  --gold-color: #F2C14E;
  --divider-color: #1E3A2A;
  --deep-green: #0A4B2C;

  /* Neon specific colors, derived from theme */
  --neon-primary: var(--glow-color); /* #57E38D */
  --neon-secondary: var(--gold-color); /* #F2C14E */
  --neon-accent: var(--primary-color); /* #11A84E */

  --header-offset: 166px; /* Desktop: 44 (marquee) + 68 (header-top) + 52 (main-nav) = 164 + 2px buffer */
}
body {
  padding-top: var(--header-offset);
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-color);
  overflow-x: hidden; /* Prevent body overflow on desktop */
}

/* 🚨 跑马灯区域样式（必须严格遵守，霓虹灯风格） */
.marquee-section {
  position: fixed; /* 固定在页面顶部 */
  top: 0;
  left: 0;
  width: 100%;
  height: 44px; /* 🚨 固定高度，禁止用随机/过大 min-height */
  box-sizing: border-box;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* 暗色背景 */
  color: #ffffff;
  overflow: hidden;
  /* 🚨 霓虹灯发光边框（必须使用动态颜色） */
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* 使用主题色动态变化 */
  box-shadow: 
    0 0 10px var(--neon-primary),
    0 0 20px var(--neon-primary),
    0 0 30px var(--neon-primary),
    inset 0 0 20px rgba(255, 0, 255, 0.1);
  z-index: 1001; /* 确保在页头之上 */
}

.marquee-container {
  width: 100%;
  max-width: 100%;
  height: 100%;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0 20px; /* 垂直由父级 44px 限定，勿再加过大上下 padding */
  box-sizing: border-box;
}

/* 🚨 动态喇叭提醒图标样式（必须严格遵守，霓虹灯风格） */
.marquee-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  z-index: 2;
  position: relative;
}

.marquee-icon-emoji {
  font-size: 24px;
  display: inline-block;
  animation: marquee-pulse 2s ease-in-out infinite, text-glow-flow 3s ease-in-out infinite alternate;
  /* 🚨 霓虹灯发光效果（必须使用动态颜色） */
  text-shadow: 
    0 0 5px var(--neon-primary),
    0 0 10px var(--neon-primary),
    0 0 15px var(--neon-primary);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* 🚨 喇叭脉冲动画（必须严格遵守） */
@keyframes marquee-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.9;
  }
}

.marquee-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.marquee-content {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: marquee-scroll 30s linear infinite;
  gap: 30px;
}

/* 🚨 跑马灯文字链接样式（必须严格遵守，霓虹灯风格） */
.marquee-text {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none; /* 移除下划线 */
  /* 🚨 霓虹灯发光文字（必须使用动态颜色） */
  text-shadow: 
    0 0 5px var(--neon-primary),
    0 0 10px var(--neon-primary),
    0 0 15px var(--neon-primary);
  line-height: 1.5;
  display: inline-block;
  vertical-align: middle;
  animation: text-glow-flow 3s ease-in-out infinite alternate;
  cursor: pointer; /* 显示手型光标 */
  transition: all 0.3s ease;
}

/* 🚨 跑马灯文字链接hover效果（必须严格遵守，增强发光效果） */
.marquee-text:hover {
  /* hover时增强发光效果 */
  text-shadow: 
    0 0 10px var(--neon-primary),
    0 0 20px var(--neon-primary),
    0 0 30px var(--neon-primary),
    0 0 40px var(--neon-primary);
  transform: scale(1.05); /* 轻微放大 */
  color: #ffffff;
}

.marquee-separator {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 15px;
  /* 🚨 霓虹灯发光效果 */
  text-shadow: 
    0 0 3px var(--neon-primary),
    0 0 6px var(--neon-primary);
}

/* 跑马灯滚动动画 */
@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Header styles */
.site-header {
  position: fixed;
  top: 44px; /* Fixed below marquee for desktop */
  left: 0;
  width: 100%;
  z-index: 1000;
  box-sizing: border-box;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  box-shadow: 
    0 0 10px var(--neon-primary),
    0 0 20px var(--neon-primary),
    inset 0 0 15px rgba(255, 255, 255, 0.1);
}

.header-top {
  box-sizing: border-box;
  min-height: 68px; /* Desktop fixed height */
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
}

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

.logo {
  color: var(--text-main); /* Regular color, no neon */
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  display: block; /* Ensure visibility */
  flex-shrink: 0;
}
.logo img {
  display: block;
  max-height: 60px; /* Desktop max height */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

.desktop-nav-buttons {
  display: flex; /* Desktop buttons visible */
  gap: 15px;
  margin-left: auto;
}

.btn {
  position: relative;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Custom button gradient */
  padding: 10px 20px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  text-shadow: 
    0 0 5px #ffffff,
    0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-size: 15px;
  font-weight: bold;
  white-space: nowrap;
  box-sizing: border-box;
}

.btn:hover {
  animation-duration: 2s; /* hover时加快颜色变化速度 */
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 0 15px var(--neon-primary),
    0 0 25px var(--neon-primary),
    inset 0 0 15px rgba(255, 255, 255, 0.2);
}

.mobile-nav-buttons {
  display: none; /* Desktop hidden */
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px; /* Desktop fixed height */
  height: 52px;
  display: flex; /* Desktop menu visible */
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Different dark background for menu */
  border-top: 1px solid var(--divider-color);
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite reverse; /* Dynamic border color, reversed animation */
  box-shadow: 
    0 0 8px var(--neon-secondary),
    0 0 16px var(--neon-secondary),
    inset 0 0 10px rgba(255, 255, 255, 0.05);
}

.nav-container {
  box-sizing: border-box;
  height: 100%;
  width: 100%;
  max-width: 1200px; /* Desktop container max-width */
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

.nav-link {
  color: var(--text-main);
  text-decoration: none;
  padding: 10px 15px;
  font-size: 16px;
  font-weight: 500;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--neon-primary);
  text-shadow: 0 0 5px var(--neon-primary);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
}

.mobile-menu-overlay {
  display: none; /* Hidden on desktop */
}

/* Footer styles */
.site-footer {
  background-color: var(--bg-color); /* #08160F */
  color: var(--text-secondary); /* #A7D9B8 */
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.8;
  border-top: 1px solid var(--divider-color); /* #1E3A2A */
  box-sizing: border-box;
}

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

.footer-col h3 {
  color: var(--text-main); /* #F2FFF6 */
  font-size: 18px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--divider-color);
  padding-bottom: 8px;
}

.footer-logo {
  color: var(--text-main); /* #F2FFF6 */
  font-size: 22px;
  font-weight: bold;
  text-decoration: none;
  margin-bottom: 15px;
  display: block;
}

.footer-description {
  margin-top: 15px;
  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 {
  color: var(--text-secondary); /* #A7D9B8 */
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--primary-color); /* #11A84E */
}

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

.footer-bottom p {
  margin: 0;
  color: var(--text-secondary);
}

/* Dynamic glow animations */
@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-primary);
    box-shadow: 
      0 0 10px var(--neon-primary),
      0 0 20px var(--neon-primary),
      inset 0 0 10px rgba(87, 227, 141, 0.3); /* Using neon-primary's derived color */
  }
  33% {
    border-color: var(--neon-secondary);
    box-shadow: 
      0 0 10px var(--neon-secondary),
      0 0 20px var(--neon-secondary),
      inset 0 0 10px rgba(242, 193, 78, 0.3); /* Using neon-secondary's derived color */
  }
  66% {
    border-color: var(--neon-accent);
    box-shadow: 
      0 0 10px var(--neon-accent),
      0 0 20px var(--neon-accent),
      inset 0 0 10px rgba(17, 168, 78, 0.3); /* Using neon-accent's derived color */
  }
}

@keyframes text-glow-flow {
  0% {
    text-shadow: 
      0 0 5px var(--neon-primary),
      0 0 10px var(--neon-primary),
      0 0 15px var(--neon-primary);
    color: #ffffff;
  }
  50% {
    text-shadow: 
      0 0 5px var(--neon-secondary),
      0 0 10px var(--neon-secondary),
      0 0 15px var(--neon-secondary);
    color: #ffffff;
  }
  100% {
    text-shadow: 
      0 0 5px var(--neon-accent),
      0 0 10px var(--neon-accent),
      0 0 15px var(--neon-accent);
    color: #ffffff;
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  :root {
    --header-offset: 146px; /* Mobile: 36 (marquee) + 60 (header-top) + 48 (main-nav) = 144 + 2px buffer */
  }
  body {
    overflow-x: hidden;
  }

  /* Marquee mobile adaptation */
  .marquee-section {
    height: 36px !important; /* Mobile fixed height */
  }
  .marquee-container {
    gap: 10px !important;
    padding: 0 12px !important;
  }
  .marquee-icon {
    width: 20px !important;
    height: 20px !important;
  }
  .marquee-icon-emoji {
    font-size: 14px !important;
  }
  .marquee-text {
    font-size: 14px !important;
  }
  .marquee-separator {
    font-size: 14px !important;
    margin: 0 10px !important;
  }
  .marquee-content {
    animation: marquee-scroll 25s linear infinite; /* Adjust speed for mobile */
  }

  /* Header mobile adaptation */
  .site-header {
    top: 36px; /* Fixed below marquee for mobile */
  }
  .header-top {
    min-height: 60px !important; /* Mobile fixed height */
    height: 60px !important;
  }
  .header-container {
    width: 100%;
    max-width: none; /* Mobile container full width */
    padding: 0 15px;
    justify-content: space-between; /* Hamburger left, Logo center, right empty */
  }

  .logo {
    flex: 1 !important; /* Allow logo to take remaining space */
    display: flex !important;
    justify-content: center !important; /* Center logo horizontally */
    align-items: center !important;
    font-size: 20px;
  }
  .logo img {
    max-height: 56px !important; /* Mobile max height */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Mobile buttons visible */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    gap: 10px; /* Spacing between buttons */
    justify-content: center;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
    border-bottom: 1px solid var(--divider-color);
  }
  .mobile-nav-buttons .btn {
    flex: 1; /* Equal width for buttons */
    min-width: 0;
    max-width: calc(50% - 5px); /* Account for gap */
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
  }

  .hamburger-menu {
    display: flex; /* Hamburger visible on mobile */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 1002; /* Above logo and overlay */
    flex-shrink: 0;
  }
  .hamburger-icon {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--neon-primary);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
    position: relative;
    box-shadow: 
      0 0 5px var(--neon-primary),
      0 0 10px var(--neon-primary);
    animation: theme-colors-bg 4s ease-in-out infinite; /* Dynamic color */
  }
  .hamburger-icon::before,
  .hamburger-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: var(--neon-primary);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
    box-shadow: 
      0 0 5px var(--neon-primary),
      0 0 10px var(--neon-primary);
    animation: theme-colors-bg 4s ease-in-out infinite; /* Dynamic color */
  }
  .hamburger-icon::before {
    top: -10px;
  }
  .hamburger-icon::after {
    top: 10px;
  }

  .hamburger-menu.active .hamburger-icon {
    background-color: transparent;
    box-shadow: none;
  }
  .hamburger-menu.active .hamburger-icon::before {
    top: 0;
    transform: rotate(45deg);
  }
  .hamburger-menu.active .hamburger-icon::after {
    top: 0;
    transform: rotate(-45deg);
  }

  /* Mobile main-nav (hamburger menu content) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Below header-top and mobile buttons */
    left: 0;
    width: 80%;
    max-width: 300px;
    height: calc(100vh - var(--header-offset));
    background: linear-gradient(180deg, #0a0a0a, #16213e); /* Dark background */
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px 0;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease-in-out;
    z-index: 1000; /* Above overlay */
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    overflow-y: auto; /* Allow scrolling if menu content is long */
  }
  .main-nav.active {
    display: flex; /* Display when active */
    transform: translateX(0); /* Slide into view */
  }

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 15px;
    max-width: none;
  }
  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid var(--divider-color);
    font-size: 17px;
  }
  .nav-link:first-child {
    border-top: 1px solid var(--divider-color);
  }

  .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.7);
    z-index: 999; /* Below menu, above content */
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
  }
  .mobile-menu-overlay.active {
    display: block;
    opacity: 1;
  }

  /* Footer mobile adaptation */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout on mobile */
  }
  .footer-col {
    margin-bottom: 20px;
  }
  .footer-col:last-child {
    margin-bottom: 0;
  }

  /* Image overflow prevention */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  /* body overflow-x already set to hidden globally */
}

/* Animation for hamburger icon background */
@keyframes theme-colors-bg {
  0%, 100% { background-color: var(--neon-primary); }
  33% { background-color: var(--neon-secondary); }
  66% { background-color: var(--neon-accent); }
}

/* Body no-scroll for mobile menu */
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;
  }
}
