:root {
  --bg: #f4f7fc;
  --bg-elevated: #e9eef6;
  --bg-card: rgba(255, 255, 255, 0.72);
  --border: rgba(0, 128, 155, 0.16);
  --border-strong: rgba(0, 145, 189, 0.45);
  --primary: #0087b5;
  --primary-dim: rgba(0, 135, 181, 0.5);
  --accent: #5b3df0;
  --accent-dim: rgba(91, 61, 240, 0.5);
  --text: #0c1a28;
  --text-dim: #3f5468;
  --text-mute: #7c8fa3;
  --glow-cyan: 0 0 24px rgba(0, 135, 181, 0.2);
  --glow-purple: 0 0 24px rgba(91, 61, 240, 0.2);
  --glow-strong-cyan: 0 0 36px rgba(0, 135, 181, 0.35);
  --glow-inset: inset 0 0 18px rgba(0, 135, 181, 0.08);
  --nav-bg: rgba(255, 255, 255, 0.8);
  --nav-mobile-bg: rgba(255, 255, 255, 0.97);
  --hero-grad: linear-gradient(120deg, #0c1a28 0%, #0087b5 45%, #5b3df0 100%);
  --hero-glow: drop-shadow(0 0 30px rgba(0, 135, 181, 0.16));
  --type-glow: 0 0 14px rgba(0, 135, 181, 0.45);
  --grid-line: rgba(0, 135, 181, 0.07);
  --btn-primary-bg: linear-gradient(135deg, rgba(0, 135, 181, 0.12), rgba(91, 61, 240, 0.12));
  --btn-primary-shadow: 0 0 24px rgba(0, 135, 181, 0.18), inset 0 0 18px rgba(0, 135, 181, 0.05);
  --btn-primary-hover-shadow: 0 0 36px rgba(0, 135, 181, 0.32), inset 0 0 22px rgba(0, 135, 181, 0.1);
  --ghost-bg: rgba(12, 26, 40, 0.05);
  --icon-glow-cyan: 0 0 18px rgba(0, 135, 181, 0.55);
  --icon-glow-purple: 0 0 18px rgba(91, 61, 240, 0.55);
  --badge-new-color: #0087b5;
  --badge-new-border: rgba(0, 135, 181, 0.5);
  --badge-new-bg: rgba(0, 135, 181, 0.08);
  --badge-old-color: #5b3df0;
  --badge-old-border: rgba(91, 61, 240, 0.5);
  --badge-old-bg: rgba(91, 61, 240, 0.08);
  --copy-bg: rgba(12, 26, 40, 0.05);
  --toast-bg: rgba(18, 32, 48, 0.92);
  --selection-bg: rgba(0, 135, 181, 0.25);
  --brand-glow: 0 0 18px rgba(0, 135, 181, 0.45);
  --font-mono: "JetBrains Mono", "Fira Code", "Consolas", "Menlo", monospace;
}

html.dark {
  --bg: #05070d;
  --bg-elevated: #0a0f1a;
  --bg-card: rgba(13, 20, 33, 0.6);
  --border: rgba(64, 224, 255, 0.12);
  --border-strong: rgba(64, 224, 255, 0.35);
  --primary: #00e5ff;
  --primary-dim: rgba(0, 229, 255, 0.5);
  --accent: #7c5cff;
  --accent-dim: rgba(124, 92, 255, 0.5);
  --text: #e6f7ff;
  --text-dim: #8aa3b8;
  --text-mute: #5b7185;
  --glow-cyan: 0 0 24px rgba(0, 229, 255, 0.28);
  --glow-purple: 0 0 24px rgba(124, 92, 255, 0.28);
  --glow-strong-cyan: 0 0 36px rgba(0, 229, 255, 0.4);
  --glow-inset: inset 0 0 18px rgba(0, 229, 255, 0.08);
  --nav-bg: rgba(5, 7, 13, 0.78);
  --nav-mobile-bg: rgba(5, 7, 13, 0.96);
  --hero-grad: linear-gradient(120deg, #ffffff 0%, #00e5ff 45%, #7c5cff 100%);
  --hero-glow: drop-shadow(0 0 30px rgba(0, 229, 255, 0.25));
  --type-glow: 0 0 14px rgba(0, 229, 255, 0.5);
  --grid-line: rgba(0, 229, 255, 0.04);
  --btn-primary-bg: linear-gradient(135deg, rgba(0, 229, 255, 0.16), rgba(124, 92, 255, 0.16));
  --btn-primary-shadow: 0 0 24px rgba(0, 229, 255, 0.28), inset 0 0 18px rgba(0, 229, 255, 0.08);
  --btn-primary-hover-shadow: 0 0 36px rgba(0, 229, 255, 0.4), inset 0 0 22px rgba(0, 229, 255, 0.12);
  --ghost-bg: rgba(255, 255, 255, 0.02);
  --icon-glow-cyan: 0 0 18px rgba(0, 229, 255, 0.6);
  --icon-glow-purple: 0 0 18px rgba(124, 92, 255, 0.6);
  --badge-new-color: #00e5ff;
  --badge-new-border: rgba(0, 229, 255, 0.5);
  --badge-new-bg: rgba(0, 229, 255, 0.08);
  --badge-old-color: #c9b8ff;
  --badge-old-border: rgba(124, 92, 255, 0.5);
  --badge-old-bg: rgba(124, 92, 255, 0.08);
  --copy-bg: rgba(255, 255, 255, 0.03);
  --toast-bg: rgba(10, 18, 30, 0.92);
  --selection-bg: rgba(0, 229, 255, 0.3);
  --brand-glow: 0 0 18px rgba(0, 229, 255, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

body.no-scroll {
  overflow: hidden;
}

::selection {
  background: var(--selection-bg);
  color: #fff;
}

::-webkit-scrollbar {
  width: 9px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary-dim), var(--accent-dim));
  border-radius: 4px;
}

a {
  color: inherit;
  text-decoration: none;
}

.accent {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- 背景 ---------- */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  display: block;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 100%);
}

/* ---------- 导航 ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background 0.35s, padding 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
  background: transparent;
}

.navbar.scrolled {
  padding: 10px 0;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 1px;
}

.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--primary), var(--accent));
  box-shadow: var(--brand-glow);
  animation: pulse 2.4s ease-in-out infinite;
}

.brand-name {
  font-size: 19px;
}

.nav-links {
  display: flex;
  gap: 34px;
}

.nav-link {
  font-size: 15px;
  color: var(--text-dim);
  position: relative;
  padding: 4px 0;
  transition: color 0.25s;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.3s;
}

.nav-link:hover {
  color: var(--text);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* 主题切换按钮 */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--copy-bg);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.theme-toggle:hover {
  color: var(--primary);
  border-color: var(--border-strong);
  box-shadow: var(--glow-cyan);
  transform: rotate(15deg);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .icon-sun {
  display: none;
}

html.dark .theme-toggle .icon-moon {
  display: none;
}

html.dark .theme-toggle .icon-sun {
  display: block;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  padding: 120px 24px 80px;
}

.hero-content {
  animation: fadeUp 1s ease both;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--text-mute);
  margin-bottom: 22px;
}

.hero-title {
  font-size: clamp(64px, 14vw, 150px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 10px;
  background: var(--hero-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: var(--hero-glow);
  margin-bottom: 26px;
}

.hero-type {
  font-family: var(--font-mono);
  font-size: clamp(15px, 2.6vw, 21px);
  color: var(--primary);
  min-height: 34px;
  margin-bottom: 24px;
  text-shadow: var(--type-glow);
}

.type-cursor {
  display: inline-block;
  width: 10px;
  height: 1.2em;
  vertical-align: text-bottom;
  margin-left: 3px;
  background: var(--primary);
  animation: blink 0.9s step-end infinite;
}

.hero-sub {
  font-size: clamp(14px, 2.2vw, 17px);
  color: var(--text-dim);
  max-width: 620px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 13px 34px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s, border-color 0.25s;
  cursor: pointer;
}

.btn-primary {
  background: var(--btn-primary-bg);
  border: 1px solid var(--border-strong);
  color: var(--primary);
  box-shadow: var(--btn-primary-shadow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--btn-primary-hover-shadow);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: var(--ghost-bg);
}

.btn-ghost:hover {
  transform: translateY(-3px);
  border-color: var(--accent-dim);
  color: var(--text);
  box-shadow: var(--glow-purple);
}

.scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: block;
  height: 46px;
  width: 26px;
}

.scroll-line {
  display: block;
  width: 2px;
  height: 100%;
  margin: 0 auto;
  background: linear-gradient(180deg, transparent, var(--primary));
  position: relative;
  animation: scrollDrop 1.8s ease-in-out infinite;
}

@keyframes scrollDrop {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }
  50% {
    transform: scaleY(1);
    transform-origin: top;
  }
  51% {
    transform-origin: bottom;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

/* ---------- Section 通用 ---------- */
.section {
  padding: 110px 0;
  position: relative;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--primary);
  margin-bottom: 12px;
  opacity: 0.85;
}

.section-title {
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 56px;
}

/* ---------- 卡片 ---------- */
.glow-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

.glow-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 1px;
  background: linear-gradient(135deg, var(--primary-dim), transparent 40%, transparent 60%, var(--accent-dim));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.glow-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--glow-cyan);
}

.glow-card:hover::before {
  opacity: 1;
}

/* ---------- 关于 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.about-card {
  padding: 38px 30px;
}

.about-card:hover {
  box-shadow: var(--glow-purple);
}

.card-icon {
  font-size: 30px;
  color: var(--primary);
  margin-bottom: 20px;
  text-shadow: var(--icon-glow-cyan);
}

.about-card h3 {
  font-size: 19px;
  margin-bottom: 14px;
  letter-spacing: 1px;
}

.about-card p {
  font-size: 14px;
  color: var(--text-dim);
}

/* ---------- 产品 ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.product-card {
  display: block;
  padding: 34px 30px;
  overflow: hidden;
}

.product-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.product-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}

.badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 1px;
}

.badge-new {
  color: var(--badge-new-color);
  border: 1px solid var(--badge-new-border);
  background: var(--badge-new-bg);
}

.badge-old {
  color: var(--badge-old-color);
  border: 1px solid var(--badge-old-border);
  background: var(--badge-old-bg);
}

.product-card h3 {
  font-size: 21px;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.product-tagline {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--primary);
  margin-bottom: 14px;
}

.product-desc {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 24px;
  min-height: 66px;
}

.product-link {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-mute);
  transition: color 0.25s;
}

.product-card:hover .product-link {
  color: var(--primary);
}

/* ---------- 联系 ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.contact-card {
  text-align: center;
  padding: 36px 22px;
}

.contact-icon {
  font-size: 28px;
  color: var(--accent);
  margin-bottom: 18px;
  text-shadow: var(--icon-glow-purple);
}

.contact-card h3 {
  font-size: 16px;
  margin-bottom: 10px;
  letter-spacing: 2px;
  color: var(--text-dim);
}

.contact-value {
  font-family: var(--font-mono);
  font-size: 17px;
  color: var(--text);
  margin-bottom: 18px;
  word-break: break-all;
}

.copy-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  padding: 8px 20px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--copy-bg);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.25s;
}

.copy-btn:hover {
  color: var(--primary);
  border-color: var(--border-strong);
  box-shadow: var(--glow-cyan);
}

.link-btn {
  display: inline-block;
}

.contact-note {
  text-align: center;
  margin-top: 50px;
  color: var(--text-mute);
  font-size: 14px;
  letter-spacing: 1px;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 30px;
  text-align: center;
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: 3px;
  margin-bottom: 8px;
}

.footer p {
  color: var(--text-mute);
  font-size: 13px;
  letter-spacing: 1px;
}

.footer-links {
  margin-top: 10px;
}

.footer-links a {
  color: var(--text-dim);
  transition: color 0.25s;
}

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

.sep {
  margin: 0 8px;
  color: var(--text-mute);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 46px;
  transform: translateX(-50%) translateY(20px);
  background: var(--toast-bg);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 14px;
  padding: 12px 28px;
  border-radius: 8px;
  box-shadow: var(--glow-cyan);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 200;
  backdrop-filter: blur(10px);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- 动画 ---------- */
@keyframes pulse {
  0%, 100% {
    box-shadow: var(--brand-glow);
  }
  50% {
    box-shadow: 0 0 40px rgba(0, 135, 181, 0.4);
  }
}

html.dark .brand-mark {
  animation: pulse-dark 2.4s ease-in-out infinite;
}

@keyframes pulse-dark {
  0%, 100% {
    box-shadow: var(--brand-glow);
  }
  50% {
    box-shadow: 0 0 40px rgba(0, 229, 255, 0.55);
  }
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 滚动显现 */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .about-grid,
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 220px;
    flex-direction: column;
    justify-content: center;
    gap: 34px;
    background: var(--nav-mobile-bg);
    border-left: 1px solid var(--border);
    padding-left: 40px;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 99;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-link {
    font-size: 18px;
  }

  .about-grid,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-desc {
    min-height: 0;
  }

  .hero-title {
    letter-spacing: 4px;
  }
}
