:root {
  --bg: #05070a;
  --bg-elevated: #0b0f14;
  --surface: #111821;
  --surface-glass: rgba(17, 24, 33, 0.72);
  --border: rgba(148, 163, 184, 0.12);
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.45);
  --accent: #22d3ee;
  --accent-glow: rgba(34, 211, 238, 0.35);
  --danger: #f43f5e;
  --success: #34d399;
  --radius: 14px;
  --header-h: 68px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei UI", "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

::-webkit-scrollbar-corner {
  background: var(--bg);
}

#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

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

.container {
  width: min(1440px, 94%);
  margin: 0 auto;
}

/* Mouse glow effect */
.feature-card,
.tech-item,
.platform-btn,
.user-card,
.info-item,
.panel,
.stat-box {
  position: relative;
  overflow: hidden;
}

.feature-card::before,
.tech-item::before,
.platform-btn::before,
.user-card::before,
.info-item::before,
.panel::before,
.stat-box::before {
  content: "";
  position: absolute;
  top: var(--y, 50%);
  left: var(--x, 50%);
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.38), transparent 68%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 0;
}

.feature-card:hover::before,
.tech-item:hover::before,
.platform-btn:hover::before,
.user-card:hover::before,
.info-item:hover::before,
.panel:hover::before,
.stat-box:hover::before {
  opacity: 1;
}

.feature-card,
.tech-item,
.platform-btn,
.user-card,
.info-item,
.panel,
.stat-box {
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.feature-card:hover,
.tech-item:hover,
.platform-btn:hover:not(.disabled),
.user-card:hover,
.info-item:hover,
.panel:hover,
.stat-box:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.25),
    0 0 28px rgba(99, 102, 241, 0.12);
}

.feature-card > *,
.tech-item > *,
.platform-btn > *,
.user-card > *,
.info-item > *,
.panel > *,
.stat-box > * {
  position: relative;
  z-index: 1;
}

/* Gradient border highlight */
.feature-card::after,
.tech-item::after,
.platform-btn::after,
.user-card::after,
.info-item::after,
.panel::after,
.stat-box::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -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.25s ease;
  pointer-events: none;
  z-index: 2;
}

.feature-card:hover::after,
.tech-item:hover::after,
.platform-btn:hover:not(.disabled)::after,
.user-card:hover::after,
.info-item:hover::after,
.panel:hover::after,
.stat-box:hover::after {
  opacity: 1;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 1000;
  background: linear-gradient(180deg, rgba(5, 7, 10, 0.92), rgba(5, 7, 10, 0.6));
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.nav-wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 1.1rem;
  box-shadow: 0 0 20px var(--primary-glow);
}

.logo-text {
  letter-spacing: 0.5px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.95rem;
}

.main-nav a {
  color: var(--text-secondary);
  transition: color 0.2s;
  position: relative;
}

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

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

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

.nav-admin {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.nav-admin:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

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

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: 0.3s;
}

/* Hero */
.hero {
  position: relative;
  padding: 140px 0 90px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 60px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.2);
  margin-bottom: 22px;
}

.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.1;
  font-weight: 800;
  margin: 0 0 22px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px var(--primary-glow));
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-bottom: 42px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 10px;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  color: #fff;
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 12px 36px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hero-stats {
  display: flex;
  gap: 34px;
}

.hero-stats div {
  display: flex;
  flex-direction: column;
}

.hero-stats strong {
  font-size: 1.2rem;
  color: var(--text);
}

.hero-stats span {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Hero visual */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.app-window {
  position: relative;
  width: min(520px, 100%);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(99, 102, 241, 0.08),
    0 0 60px rgba(99, 102, 241, 0.15);
  transform: perspective(1200px) rotateY(-8deg) rotateX(6deg);
  animation: float 6s ease-in-out infinite;
  z-index: 2;
}

@keyframes float {
  0%, 100% { transform: perspective(1200px) rotateY(-8deg) rotateX(6deg) translateY(0); }
  50% { transform: perspective(1200px) rotateY(-8deg) rotateX(6deg) translateY(-14px); }
}

.window-titlebar {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.window-dots span:nth-child(1) { background: #f87171; }
.window-dots span:nth-child(2) { background: #fbbf24; }
.window-dots span:nth-child(3) { background: #34d399; }

.window-title {
  flex: 1;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.window-body {
  display: flex;
  height: 310px;
  padding: 14px;
  gap: 14px;
}

.mock-sidebar {
  width: 64px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mock-bay {
  height: 42px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mock-bay.active {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.2);
}

.mock-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mock-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mock-chip {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  background: rgba(99, 102, 241, 0.18);
  color: var(--primary);
}

.chip-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.mock-spacer {
  flex: 1;
}

.mock-btn-sm {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.7rem;
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  color: #fff;
}

.mock-cards {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mock-card {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.mock-log {
  height: 70px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mock-log div {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  width: var(--w, 80%);
}

.mock-log div:nth-child(1) { --w: 60%; }
.mock-log div:nth-child(2) { --w: 85%; }
.mock-log div:nth-child(3) { --w: 45%; }

.glow-orb {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-glow), transparent 70%);
  filter: blur(50px);
  top: 10%;
  right: -10%;
  z-index: 1;
  animation: pulse 7s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.15); }
}

/* Sections */
.section {
  position: relative;
  padding: 110px 0;
  z-index: 2;
}

.section-head {
  text-align: center;
  margin-bottom: 60px;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 14px;
}

.section-head p {
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

/* Features */
.features {
  background: linear-gradient(180deg, transparent, rgba(99, 102, 241, 0.04), transparent);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  position: relative;
  padding: 30px;
  border-radius: var(--radius);
  background: var(--surface-glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.35),
    0 0 30px rgba(99, 102, 241, 0.15),
    0 20px 50px rgba(0, 0, 0, 0.35);
}

.feature-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  margin-bottom: 20px;
  color: #fff;
}

.feature-icon svg {
  width: 26px;
  height: 26px;
}

.icon-purple { background: linear-gradient(135deg, #6366f1, #8b5cf6); --glow: rgba(99, 102, 241, 0.25); }
.icon-blue { background: linear-gradient(135deg, #3b82f6, #06b6d4); --glow: rgba(59, 130, 246, 0.25); }
.icon-cyan { background: linear-gradient(135deg, #06b6d4, #22d3ee); --glow: rgba(34, 211, 238, 0.25); }
.icon-pink { background: linear-gradient(135deg, #ec4899, #f43f5e); --glow: rgba(236, 72, 153, 0.25); }
.icon-green { background: linear-gradient(135deg, #10b981, #34d399); --glow: rgba(16, 185, 129, 0.25); }
.icon-orange { background: linear-gradient(135deg, #f59e0b, #f97316); --glow: rgba(245, 158, 11, 0.25); }

.feature-card h3 {
  font-size: 1.15rem;
  margin: 0 0 10px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin: 0;
}

/* Demo */
.demo-stage {
  max-width: 960px;
  margin: 0 auto;
}

.demo-tabs {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

.demo-tab {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.95rem;
  cursor: pointer;
  transition: 0.2s;
}

.demo-tab:hover {
  color: var(--text);
}

.demo-tab.active {
  background: rgba(99, 102, 241, 0.18);
  color: var(--text);
  box-shadow: 0 0 18px rgba(99, 102, 241, 0.18);
}

.demo-window {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(99, 102, 241, 0.06);
}

.demo-window-bar {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.demo-window-bar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.demo-window-bar span:nth-child(1) { background: #f87171; }
.demo-window-bar span:nth-child(2) { background: #fbbf24; }
.demo-window-bar span:nth-child(3) { background: #34d399; }

.demo-window-title {
  flex: 1;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.demo-viewport {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #080a0d;
}

.demo-viewport iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: var(--bg);
}

/* Tech */
.tech {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.tech-item {
  padding: 28px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  text-align: center;
  transition: 0.25s;
}

.tech-item:hover {
  transform: translateY(-4px);
}

.tech-logo {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 1.5rem;
  background: rgba(99, 102, 241, 0.12);
}

.tech-item h4 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.tech-item p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Download */
.download-card {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 50px;
  align-items: center;
  padding: 60px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(34, 211, 238, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.18);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.download-info h2 {
  margin: 12px 0 10px;
}

#download-version {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 600;
}

.download-note {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 14px;
}

.download-platforms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.platform-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  transition: 0.25s;
}

.platform-btn:hover:not(.disabled) {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.12);
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(99, 102, 241, 0.2);
}

.platform-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.platform-btn svg {
  width: 34px;
  height: 34px;
}

.platform-btn span {
  font-weight: 600;
}

.platform-btn small {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 50px 0 30px;
  background: rgba(0, 0, 0, 0.25);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 24px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

.footer-copy {
  width: 100%;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 24px;
}

/* Scroll reveal */
.section > .container {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.section.visible > .container {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 980px) {
  .hero-grid,
  .download-card {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

  .app-window {
    transform: none;
    animation: none;
  }

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

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

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 16px 24px;
    background: rgba(5, 7, 10, 0.97);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    transition: 0.3s;
    pointer-events: none;
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav a {
    display: block;
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  .main-nav a::after {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .hero-stats {
    flex-direction: column;
    gap: 16px;
  }

  .feature-grid,
  .tech-grid,
  .download-platforms {
    grid-template-columns: 1fr;
  }

  .download-card {
    padding: 34px;
  }
}
