/* ============================================================
 * QVMConsole 官网 - 布局样式
 * 导航栏 / Hero / 技术跑马灯 / 页脚 / 回到顶部
 * ============================================================ */

/* ================= 导航栏 ================= */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  transition: transform .45s var(--ease-out), background .35s ease, box-shadow .35s ease, border-color .35s ease;
  border-bottom: 1px solid transparent;
}
#navbar.scrolled {
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 32px -12px rgba(12, 20, 37, .12);
}
/* 向下滚动时自动隐藏，向上滚动出现 */
#navbar.nav-hidden { transform: translateY(-100%); }
.nav-progress {
  position: absolute;
  left: 0; top: 0;
  height: 2.5px;
  width: 100%;
  transform-origin: left;
  transform: scaleX(0);
  background: var(--qvm-grad);
}
.nav-container {
  width: min(100% - 48px, 1280px);
  margin-inline: auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-logo { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
.nav-logo-img { width: 34px; height: 34px; object-fit: contain; transition: transform .5s var(--ease-spring); }
.nav-logo:hover .nav-logo-img { transform: rotate(-8deg) scale(1.08); }
.nav-menu { display: flex; gap: 6px; margin-left: 12px; }
.nav-link {
  position: relative;
  padding: 8px 14px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: 10px;
  transition: color .3s ease, background .3s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--qvm-grad);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .35s var(--ease-out);
}
.nav-link:hover, .nav-link.active { color: var(--ink-1); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.nav-github {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  border: 1px solid var(--line);
  background: var(--card);
  transition: all .3s ease;
}
.nav-github:hover { color: var(--ink-1); border-color: var(--ink-3); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.nav-github .star-count { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3); }
.nav-cta {
  padding: 9px 20px;
  font-size: 14px;
}
.menu-btn {
  display: none;
  width: 42px; height: 42px;
  border-radius: 12px;
  font-size: 18px;
  color: var(--ink-1);
  border: 1px solid var(--line);
  background: var(--card);
}

/* 移动端菜单 */
#mobileMenu {
  position: fixed;
  top: var(--nav-h); left: 12px; right: 12px;
  z-index: calc(var(--z-nav) - 1);
  border-radius: var(--r-lg);
  padding: 14px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-14px) scale(.98);
  pointer-events: none;
  transition: opacity .35s ease, transform .35s var(--ease-out);
}
#mobileMenu.open { opacity: 1; transform: none; pointer-events: auto; }
#mobileMenu .nav-link { display: block; padding: 12px 16px; font-size: 15.5px; }
#mobileMenu .nav-link::after { display: none; }

/* ================= Hero ================= */
#home {
  position: relative;
  min-height: 100svh;
  padding: calc(var(--nav-h) + 72px) 0 90px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
/* 极光氛围背景 */
.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
  will-change: transform;
}
.aurora-1 {
  width: 620px; height: 620px;
  top: -180px; left: -120px;
  background: radial-gradient(circle, rgba(45, 212, 191, .55), transparent 65%);
  animation: auroraDrift1 22s ease-in-out infinite alternate;
}
.aurora-2 {
  width: 560px; height: 560px;
  top: 8%; right: -160px;
  background: radial-gradient(circle, rgba(139, 92, 246, .45), transparent 65%);
  animation: auroraDrift2 26s ease-in-out infinite alternate;
}
.aurora-3 {
  width: 520px; height: 520px;
  bottom: -220px; left: 32%;
  background: radial-gradient(circle, rgba(56, 189, 248, .5), transparent 65%);
  animation: auroraDrift3 24s ease-in-out infinite alternate;
}
@keyframes auroraDrift1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(120px, 90px) scale(1.18); }
}
@keyframes auroraDrift2 {
  0% { transform: translate(0, 0) scale(1.1) rotate(0deg); }
  100% { transform: translate(-140px, 110px) scale(.92) rotate(30deg); }
}
@keyframes auroraDrift3 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-90px, -120px) scale(1.22); }
}
/* 网格纹理 */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(12, 20, 37, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 20, 37, .05) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 75%);
}
/* 粒子网络画布 */
#heroCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.hero-inner { position: relative; z-index: 2; text-align: center; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.hero-badge .pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, .5);
  animation: pulseDot 2s ease-out infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .45); }
  70% { box-shadow: 0 0 0 9px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
  margin-top: 26px;
  font-size: clamp(38px, 6.6vw, 74px);
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: -.03em;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .char { display: inline-block; will-change: transform; }
/* 品牌名流光 */
.hero-title .brand {
  background: linear-gradient(110deg, #2dd4bf 15%, #38bdf8 38%, #8b5cf6 62%, #38bdf8 85%, #2dd4bf 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: brandShine 5.5s linear infinite;
}
@keyframes brandShine {
  0% { background-position: 0% 0; }
  100% { background-position: 220% 0; }
}

.hero-subtitle {
  max-width: 720px;
  margin: 24px auto 0;
  font-size: clamp(15.5px, 1.8vw, 18px);
  color: var(--ink-2);
}
.hero-subtitle strong { color: var(--ink-1); font-weight: 700; }

.hero-actions {
  margin-top: 38px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* 兼容系统 + 统计 */
.hero-meta {
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  flex-wrap: wrap;
}
.compat { display: flex; align-items: center; gap: 12px; }
.compat-label { font-size: 13px; color: var(--ink-3); letter-spacing: .06em; }
.compat-icons { display: flex; gap: 10px; }
.compat-item {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease-spring), box-shadow .35s ease;
}
.compat-item:hover { transform: translateY(-4px) rotate(-4deg); box-shadow: var(--shadow-md); }
.compat-item img { width: 22px; height: 22px; }
.hero-stats { display: flex; gap: 30px; }
.hstat { text-align: left; }
.hstat-num {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  background: var(--qvm-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hstat-label { font-size: 12.5px; color: var(--ink-3); letter-spacing: .04em; }
.hero-meta .divider { width: 1px; height: 40px; background: var(--line-strong); }

/* Hero 截图区 */
.hero-showcase {
  position: relative;
  margin-top: 74px;
  perspective: 1400px;
}
.hero-shot {
  position: relative;
  max-width: 1020px;
  margin-inline: auto;
  transform-style: preserve-3d;
  will-change: transform;
}
.hero-shot .shot-frame { border-radius: var(--r-xl); }
/* 仅在缺图占位时固定比例撑开高度；有图时容器随图片原始比例自适应 */
.hero-shot .shot-frame.is-empty { aspect-ratio: 16 / 10; }
.hero-shot-glow {
  position: absolute;
  inset: -8% -12%;
  z-index: -1;
  background:
    radial-gradient(45% 55% at 30% 40%, rgba(45, 212, 191, .35), transparent 70%),
    radial-gradient(45% 55% at 72% 60%, rgba(139, 92, 246, .32), transparent 70%);
  filter: blur(46px);
  animation: glowBreath 6s ease-in-out infinite;
}
@keyframes glowBreath {
  0%, 100% { opacity: .75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
/* 浏览器窗栏 */
.shot-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 251, 254, .9);
}
.shot-bar .dot { width: 11px; height: 11px; border-radius: 50%; }
.shot-bar .dot-r { background: #ff5f57; }
.shot-bar .dot-y { background: #febc2e; }
.shot-bar .dot-g { background: #28c840; }
.shot-bar .shot-url {
  margin-left: 14px;
  flex: 1;
  max-width: 380px;
  padding: 5px 14px;
  border-radius: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 漂浮装饰卡（纯 CSS 模拟 UI，非图片） */
.float-card {
  position: absolute;
  z-index: 3;
  border-radius: var(--r-md);
  padding: 14px 18px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  will-change: transform;
  animation: floatY 5.2s ease-in-out infinite;
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-13px); }
}
.fc-vm { left: -7%; top: 6%; animation-delay: -1.2s; }
.fc-task { right: -6%; top: 16%; animation-delay: -2.6s; }
.fc-net { right: -3%; bottom: 8%; animation-delay: -.6s; }
.fc-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.fc-head .qvm-dot { width: 8px; height: 8px; border-radius: 50%; }
.qvm-dot.run { background: var(--ok); box-shadow: 0 0 8px rgba(16, 185, 129, .8); animation: tagPulse 2s infinite; }
.qvm-dot.warn { background: var(--warn); box-shadow: 0 0 8px rgba(245, 158, 11, .8); }
.fc-body { margin-top: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.fc-progress { margin-top: 9px; height: 6px; border-radius: 6px; background: var(--bg-deep); overflow: hidden; }
.fc-progress i {
  display: block; height: 100%;
  border-radius: 6px;
  background: var(--qvm-grad);
  animation: fcProgress 3.4s var(--ease-in-out) infinite;
}
@keyframes fcProgress {
  0% { width: 12%; }
  55% { width: 82%; }
  100% { width: 12%; }
}
.fc-spark { display: flex; align-items: flex-end; gap: 3px; height: 30px; margin-top: 10px; }
.fc-spark i {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--qvm-blue), var(--qvm-violet));
  opacity: .75;
  animation: sparkBar 1.8s ease-in-out infinite;
}
.fc-spark i:nth-child(2) { animation-delay: -.3s; }
.fc-spark i:nth-child(3) { animation-delay: -.6s; }
.fc-spark i:nth-child(4) { animation-delay: -.9s; }
.fc-spark i:nth-child(5) { animation-delay: -1.2s; }
.fc-spark i:nth-child(6) { animation-delay: -1.5s; }
.fc-spark i:nth-child(7) { animation-delay: -.45s; }
.fc-spark i:nth-child(8) { animation-delay: -.75s; }
@keyframes sparkBar {
  0%, 100% { transform: scaleY(.35); }
  50% { transform: scaleY(1); }
}
.fc-spark { transform-origin: bottom; }
.fc-spark i { transform-origin: bottom; height: 100%; }

/* 滚动提示 */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  font-size: 12px;
  letter-spacing: .2em;
  text-indent: .2em;
}
.scroll-hint .mouse {
  width: 24px; height: 38px;
  border: 2px solid var(--ink-4);
  border-radius: 14px;
  position: relative;
}
.scroll-hint .mouse::before {
  content: "";
  position: absolute;
  left: 50%; top: 7px;
  width: 4px; height: 8px;
  margin-left: -2px;
  border-radius: 4px;
  background: var(--qvm-blue);
  animation: wheelDrop 1.8s ease-in-out infinite;
}
@keyframes wheelDrop {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ================= 技术栈跑马灯 ================= */
.tech-strip {
  position: relative;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
}
.tech-strip::before, .tech-strip::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 140px;
  z-index: 2;
  pointer-events: none;
}
.tech-strip::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.tech-strip::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.marquee { display: flex; overflow: hidden; user-select: none; }
.marquee-track {
  display: flex;
  align-items: center;
  gap: 54px;
  padding-right: 54px;
  flex-shrink: 0;
  min-width: 100%;
  animation: marqueeX 30s linear infinite;
}
.tech-strip:hover .marquee-track { animation-play-state: paused; }
@keyframes marqueeX {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
.tech-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink-3);
  white-space: nowrap;
  transition: color .3s ease;
}
.tech-item:hover { color: var(--ink-1); }
.tech-item i { font-size: 17px; color: var(--qvm-blue); }
.tech-item .t-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--qvm-grad); }

/* ================= 页脚 ================= */
#footer {
  position: relative;
  padding: 64px 0 34px;
  background:
    radial-gradient(700px 300px at 15% 0%, rgba(45, 212, 191, .08), transparent 60%),
    radial-gradient(700px 300px at 85% 10%, rgba(139, 92, 246, .08), transparent 60%),
    var(--bg-soft);
  border-top: 1px solid var(--line);
}
#footer::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 2px;
  background: var(--qvm-grad);
  opacity: .8;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 44px;
}
.footer-brand img { width: 40px; height: 40px; }
.footer-brand .fname { margin-top: 12px; font-size: 18px; font-weight: 800; }
.footer-brand p { margin-top: 10px; font-size: 14px; color: var(--ink-3); max-width: 300px; }
.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--ink-1);
  margin-bottom: 16px;
}
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  position: relative;
  font-size: 14px;
  color: var(--ink-3);
  transition: color .3s ease;
}
.footer-col a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1.5px;
  background: var(--qvm-grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease-out);
}
.footer-col a:hover { color: var(--ink-1); }
.footer-col a:hover::after { transform: scaleX(1); }
.footer-bottom {
  margin-top: 52px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-3);
}
.footer-bottom .beian { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-bottom a:hover { color: var(--ink-1); }

/* ================= 回到顶部 ================= */
#toTop {
  position: fixed;
  right: 26px; bottom: 26px;
  z-index: var(--z-totop);
  width: 50px; height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(18px) scale(.9);
  pointer-events: none;
  transition: opacity .35s ease, transform .35s var(--ease-spring), color .3s ease;
}
#toTop.show { opacity: 1; transform: none; pointer-events: auto; }
#toTop:hover { color: var(--qvm-blue); }
#toTop svg.ring { position: absolute; inset: -1px; transform: rotate(-90deg); }
#toTop .ring-bg { fill: none; stroke: var(--line-strong); stroke-width: 2.5; }
#toTop .ring-fg {
  fill: none;
  stroke: url(#toTopGrad);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
}
#toTop i { font-size: 16px; }

/* ================= 响应式 ================= */
@media (max-width: 1180px) {
  .fc-vm { left: -2%; }
  .fc-task { right: -1%; }
  .fc-net { right: 0; }
}
@media (max-width: 960px) {
  .nav-menu { display: none; }
  .menu-btn { display: grid; place-items: center; }
  .nav-actions .nav-github span:last-child { display: none; }
  .float-card { display: none; }
  .section { padding: 84px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .hero-stats { gap: 20px; }
  .hero-meta { gap: 22px; }
  .hero-meta .divider { display: none; }
  .nav-actions .nav-cta { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { justify-content: center; text-align: center; }
}
