/* ===== 全局变量 ===== */
:root {
  --primary: #1890ff;
  --primary-dark: #096dd9;
  --primary-light: #e6f7ff;
  --dark: #001529;
  --dark-medium: #003a70;
  --text: #333;
  --text-secondary: #666;
  --text-light: #999;
  --border: #f0f0f0;
  --bg-light: #f0f2f5;
  --white: #fff;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-hover: 0 12px 40px rgba(0,0,0,0.1);
  --transition: all 0.3s ease;
}

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
ul { list-style: none; }

/* ===== 头部导航 ===== */
.layui-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--dark);
  height: 60px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.layui-header .layui-container {
  display: flex;
  align-items: center;
  height: 100%;
}
.site-logo {
  display: flex;
  align-items: center;
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  white-space: nowrap;
}
.site-logo:hover { color: var(--white); opacity: 0.9; }

/* 桌面端导航 */
.site-nav.layui-nav {
  background: transparent;
  padding: 0;
}
.site-nav.layui-nav .layui-nav-item a {
  color: rgba(255,255,255,0.75);
  padding: 0 16px;
  transition: var(--transition);
}
.site-nav.layui-nav .layui-nav-item a:hover,
.site-nav.layui-nav .layui-nav-item a.layui-this {
  color: var(--white);
  background: rgba(24,144,255,0.2);
}
.site-nav.layui-nav .layui-nav-child {
  background: var(--white);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-radius: var(--radius);
  padding: 8px 0;
  min-width: 160px;
}
.site-nav.layui-nav .layui-nav-child dd a {
  color: var(--text);
  padding: 10px 20px;
}
.site-nav.layui-nav .layui-nav-child dd a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* 移动端菜单按钮 */
.site-menu-btn {
  color: var(--white);
  font-size: 24px;
  padding: 8px;
  display: inline-block;
}
.site-menu-btn:hover { color: var(--primary); }

/* 移动端侧边菜单 */
.site-mobile-nav {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1001;
  display: none;
}
.site-mobile-nav.layui-show { display: block; }
.mobile-nav-mask {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
}
.mobile-nav-content {
  position: absolute;
  top: 0; right: 0;
  width: 280px;
  height: 100%;
  background: var(--dark);
  padding: 20px 0;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.site-mobile-nav.layui-show .mobile-nav-content {
  transform: translateX(0);
}
.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px 16px;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.mobile-nav-close { color: var(--white); font-size: 20px; }
.mobile-nav-close:hover { color: var(--primary); }
.mobile-nav-list li a {
  display: block;
  color: rgba(255,255,255,0.75);
  padding: 14px 20px;
  font-size: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: var(--transition);
}
.mobile-nav-list li a:hover {
  color: var(--white);
  background: rgba(24,144,255,0.15);
}
.mobile-nav-divider {
  color: rgba(255,255,255,0.35);
  font-size: 0.8rem;
  padding: 12px 20px 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== 主体内容 ===== */
.layui-body { padding-top: 60px; flex: 1; }

/* ===== Hero Banner ===== */
.hero-banner {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-medium) 50%, var(--primary) 100%);
  color: var(--white);
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-banner::before {
  content: "";
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(24,144,255,0.1) 0%, transparent 60%);
  animation: heroGlow 8s ease-in-out infinite alternate;
}
@keyframes heroGlow {
  0% { transform: translate(0, 0); }
  100% { transform: translate(5%, 5%); }
}
.hero-banner .layui-container { position: relative; z-index: 1; }
.hero-banner h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.hero-banner p {
  font-size: 1.2rem;
  opacity: 0.85;
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.hero-cta {
  display: inline-block;
  padding: 14px 48px;
  background: var(--primary);
  color: var(--white) !important;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(24,144,255,0.4);
}
.hero-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(24,144,255,0.5);
  color: var(--white) !important;
}

/* ===== 区块标题 ===== */
.section { padding: 80px 0; }
.section-dark { background: var(--bg-light); }
.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
}
.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 48px;
  font-size: 1.05rem;
}

/* ===== 产品卡片 ===== */
.product-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}
.product-card-icon {
  width: 64px; height: 64px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.product-card h3 { font-size: 1.2rem; color: var(--dark); margin-bottom: 10px; }
.product-card .version { font-size: 0.85rem; color: var(--text-light); margin-bottom: 12px; }
.product-card p { color: var(--text-secondary); font-size: 0.93rem; line-height: 1.7; flex: 1; margin-bottom: 20px; }
.product-card .layui-btn { align-self: flex-start; }

/* ===== 特色功能网格 ===== */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid transparent;
}
.feature-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  border-color: var(--primary-light);
}
.feature-icon {
  width: 48px; height: 48px;
  margin: 0 auto 16px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.feature-item h4 { font-size: 1.05rem; color: var(--dark); margin-bottom: 8px; }
.feature-item p { color: #888; font-size: 0.88rem; line-height: 1.6; }

/* ===== 产品详情页 Hero ===== */
.product-hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-medium) 100%);
  color: var(--white);
  padding: 80px 0 60px;
  text-align: center;
}
.product-hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 8px; }
.product-hero .product-tag {
  font-size: 1.1rem;
  opacity: 0.8;
  max-width: 600px;
  margin: 0 auto 16px;
  line-height: 1.7;
}
.product-hero .product-version {
  display: inline-block;
  padding: 6px 18px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* ===== 功能列表 ===== */
.feature-list { margin-top: 16px; }
.feature-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 10px;
  width: 6px; height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

/* ===== 系统要求 ===== */
.sys-req-grid { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }
.sys-req-item { text-align: center; width: 140px; }
.sys-req-item h4 { font-size: 0.9rem; color: var(--text-secondary); margin: 8px 0 4px; }
.sys-req-item p { font-size: 0.95rem; color: var(--text); font-weight: 500; }
.sys-req-icon {
  width: 48px; height: 48px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--primary);
}

/* ===== 下载卡片 ===== */
.download-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.download-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.download-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.download-card p { flex: 1; }
.download-card-icon {
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.download-card h3 { font-size: 1.15rem; color: var(--dark); margin-bottom: 6px; }
.download-card .version { color: var(--text-light); font-size: 0.85rem; }
.download-card .meta {
  display: flex; justify-content: center; gap: 20px;
  margin: 16px 0; font-size: 0.88rem; color: var(--text-secondary);
}
.download-card .layui-btn { width: 100%; margin-top: auto; }

/* ===== 教程列表 ===== */
.tutorial-list { padding-left: 20px; }
.tutorial-list li {
  list-style: decimal;
  margin-bottom: 12px;
  color: var(--text-secondary);
  line-height: 1.7;
  padding-left: 8px;
}
.tutorial-list code {
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--primary-dark);
}
.tutorial-list a { color: var(--primary); }

/* ===== 更新日志 ===== */
.changelog { max-width: 800px; margin: 0 auto; }
.changelog-item {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
  align-items: flex-start;
}
.changelog-version {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 120px;
}
.version-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
}
.version-date {
  font-size: 0.8rem;
  color: var(--text-light);
}
.changelog-content {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 24px;
  flex: 1;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.changelog-content .feature-list li::before {
  background: var(--text-light);
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.65);
  padding: 40px 0 20px;
  font-size: 0.9rem;
  margin-top: auto;
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding: 32px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-links h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 16px;
}
.footer-links ul li { margin-bottom: 8px; }
.footer-links ul li a { color: rgba(255,255,255,0.65); }
.footer-links ul li a:hover { color: var(--primary); }
.footer-links li { color: rgba(255,255,255,0.5); line-height: 1.7; }
.footer-bottom {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}
.footer-bottom p { margin-bottom: 4px; }
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: var(--primary); }
.footer-sep { margin: 0 8px; opacity: 0.4; }

/* ===== 动画 ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.6s ease-out; }

/* ===== 响应式 ===== */
@media (max-width: 1199px) {
  .product-cards, .download-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 991px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-links { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .changelog-item { flex-direction: column; gap: 12px; }
  .changelog-version { flex-direction: row; min-width: auto; }
}
@media (max-width: 768px) {
  .hero-banner h1 { font-size: 2rem; }
  .hero-banner p { font-size: 1rem; }
  .product-cards, .download-cards, .features-grid {
    grid-template-columns: 1fr;
  }
  .product-hero h1 { font-size: 1.8rem; }
  .section-title { font-size: 1.6rem; }
  .section { padding: 60px 0; }
  .site-brand { font-size: 1rem; }
  .sys-req-grid { gap: 20px; }
  .sys-req-item { width: 100px; }
  .footer-links { grid-template-columns: 1fr; gap: 20px; }
}


/* ===== 导航响应式（修复：移动端隐藏桌面导航，显示汉堡按钮）===== */
/* 移动端：隐藏桌面导航，显示移动端菜单按钮 */
@media (max-width: 768px) {
  .site-nav.layui-nav {
    display: none !important;
  }
  .site-menu-btn {
    display: inline-block !important;
  }
}

/* 桌面端：显示桌面导航，隐藏移动端菜单按钮 */
@media (min-width: 769px) {
  .site-menu-btn {
    display: none !important;
  }
}
