:root {
  --bg: #0b1220;
  --bg-soft: #111827;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #4f46e5;
  --primary-2: #6366f1;
  --accent: #06b6d4;
  --ok: #059669;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --top: 64px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: #f4f6fb;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.app-shell { min-height: 100%; display: flex; flex-direction: column; }
.main { flex: 1; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--top);
  backdrop-filter: blur(14px);
  background: rgba(255,255,255,0.88);
  border-bottom: 1px solid rgba(226,232,240,0.9);
}
.topbar-inner {
  max-width: 1280px; margin: 0 auto; height: 100%;
  padding: 0 20px;
  display: flex; align-items: center; gap: 18px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; letter-spacing: 0.02em; white-space: nowrap;
}
.brand i { color: var(--primary); font-size: 22px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav-link {
  padding: 8px 14px; border-radius: 999px; color: #334155; font-weight: 600; font-size: 14px;
}
.nav-link:hover, .nav-link.active { background: #eef2ff; color: var(--primary); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; border: 0; background: #eef2ff; color: var(--primary); width: 40px; height: 40px; border-radius: 12px; }

.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 12px; border: 0; cursor: pointer; font-weight: 700;
  padding: 10px 18px; transition: .2s ease;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; box-shadow: 0 10px 24px rgba(79,70,229,.28); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost { background: #fff; color: #334155; border: 1px solid var(--line); }
.btn-primary.lg, .btn-ghost.lg { padding: 14px 22px; font-size: 15px; }
.btn-primary.block { width: 100%; }
.linkish { background: none; border: 0; color: var(--primary); cursor: pointer; padding: 0; font-weight: 700; }

.hero {
  position: relative; overflow: hidden;
  min-height: calc(100vh - var(--top));
  display: grid; place-items: center;
  color: #fff;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(1000px 500px at 15% 20%, rgba(99,102,241,.55), transparent 60%),
    radial-gradient(800px 480px at 85% 30%, rgba(6,182,212,.35), transparent 55%),
    linear-gradient(160deg, #0b1220 0%, #111827 45%, #1e1b4b 100%);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px; opacity: .35;
}
.hero-content { position: relative; z-index: 1; max-width: 900px; padding: 72px 24px; text-align: center; }
.eyebrow { display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.1); font-size: 13px; letter-spacing: .08em; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 18px 0 12px; line-height: 1.15; font-weight: 900; }
.hero h1 em { font-style: normal; color: #a5b4fc; }
.lead { color: rgba(226,232,240,.9); font-size: clamp(1rem, 2vw, 1.2rem); margin: 0 auto 28px; max-width: 34em; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.section { max-width: 1280px; margin: 0 auto; padding: 64px 20px; }
.section.narrow { max-width: 1100px; }
.section-head { text-align: center; margin-bottom: 28px; }
.section-head.left { text-align: left; }
.section-head h2 { margin: 0 0 8px; font-size: clamp(1.5rem, 3vw, 2rem); }
.section-head p, .muted { color: var(--muted); }

.product-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.product-card {
  position: relative; overflow: hidden;
  background: var(--panel); border-radius: 24px; padding: 28px;
  box-shadow: var(--shadow); border: 1px solid rgba(226,232,240,.8);
  display: flex; flex-direction: column; gap: 10px; min-height: 240px;
}
.product-card h3 { margin: 0; font-size: 1.35rem; }
.product-card p { margin: 0; color: var(--muted); flex: 1; }
.price { font-size: 1.8rem; font-weight: 900; color: var(--primary); }
.price span { font-size: .9rem; font-weight: 600; color: var(--muted); }
.card-glow {
  position: absolute; width: 180px; height: 180px; right: -40px; top: -50px; border-radius: 50%; opacity: .18;
}
.tone-indigo .card-glow { background: #6366f1; }
.tone-sky .card-glow { background: #0ea5e9; }
.tone-amber .card-glow { background: #f59e0b; }

.features {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-top: 0;
}
.feature {
  background: #fff; border-radius: 18px; padding: 22px; border: 1px solid var(--line);
}
.feature i { color: var(--primary); font-size: 22px; margin-bottom: 10px; }
.feature h4 { margin: 0 0 6px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

.quote-layout {
  min-height: calc(100vh - var(--top) - 180px);
  display: grid; grid-template-columns: 280px 1fr; gap: 0;
  max-width: 1400px; margin: 0 auto; padding: 16px 16px 40px;
}
.quote-side {
  background: #0f172a; color: #cbd5e1; border-radius: 20px 0 0 20px; overflow: hidden;
  display: flex; flex-direction: column; min-height: 70vh;
}
.side-head { padding: 16px 18px; font-weight: 800; border-bottom: 1px solid rgba(255,255,255,.08); }
.side-scroll { overflow: auto; padding: 10px; flex: 1; }
.side-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #64748b; padding: 10px 10px 6px; }
.side-item {
  display: flex; justify-content: space-between; gap: 8px; align-items: center;
  padding: 10px 12px; border-radius: 12px; color: #e2e8f0; font-size: 14px;
}
.side-item small { color: #94a3b8; }
.side-item:hover, .side-item.active { background: rgba(99,102,241,.25); color: #fff; }
.quote-main { background: #fff; border-radius: 0 20px 20px 0; border: 1px solid var(--line); border-left: 0; }
.quote-panel { padding: 28px; }
.quote-head h1 { margin: 0 0 6px; font-size: clamp(1.4rem, 3vw, 2rem); }
.spec-block h3 { margin: 22px 0 10px; font-size: 14px; color: #475569; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: #f8fafc; border-radius: 999px;
  padding: 8px 14px; cursor: pointer; font-weight: 600; color: #334155;
}
.chip.on { background: #eef2ff; border-color: #c7d2fe; color: var(--primary); }
.price-bar {
  margin-top: 28px; padding: 18px 20px; border-radius: 18px;
  background: linear-gradient(135deg, #eef2ff, #ecfeff);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.price-bar .label { font-size: 13px; color: var(--muted); }
.price-bar .amount { font-size: 2rem; font-weight: 900; color: var(--primary); }

.upload-card, .user-panel, .news-item {
  background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow);
}
.upload-card { text-align: center; display: grid; gap: 12px; justify-items: center; }
.upload-card i { font-size: 42px; color: var(--primary); }
.user-layout { display: grid; grid-template-columns: 220px 1fr; gap: 16px; }
.user-nav { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 10px; height: fit-content; }
.user-nav a { display: block; padding: 10px 12px; border-radius: 12px; color: #334155; font-weight: 600; }
.user-nav a.on, .user-nav a:hover { background: #eef2ff; color: var(--primary); }
.empty { text-align: center; color: #94a3b8; padding: 40px 10px; }
.empty i { display: block; font-size: 28px; margin-bottom: 8px; }
.news-list { display: grid; gap: 12px; }
.news-item h3 { margin: 0 0 6px; }

.footer { background: #0b1220; color: #cbd5e1; margin-top: auto; }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 40px 20px 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.foot-brand { color: #fff; margin-bottom: 8px; }
.footer h4 { margin: 0 0 8px; color: #fff; }
.footer a:hover { color: #a5b4fc; }
.copy { margin-top: 28px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; color: #64748b; }

.modal[hidden] { display: none !important; }
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15,23,42,.55); display: grid; place-items: center; padding: 16px;
}
.modal-card {
  width: min(420px, 100%); background: #fff; border-radius: 20px; padding: 28px; position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,.3);
}
.modal-card h3 { margin: 0 0 4px; }
.modal-card label { display: block; margin: 12px 0 6px; font-size: 13px; font-weight: 700; color: #475569; }
.modal-card input {
  width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--line); padding: 0 12px;
}
.modal-x {
  position: absolute; right: 12px; top: 10px; border: 0; background: transparent; font-size: 28px; cursor: pointer; color: #94a3b8;
}
.tip { margin-top: 14px; font-size: 12px; }
body.modal-open { overflow: hidden; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav, .topbar-actions { display: none; }
  body.nav-open .nav, body.nav-open .topbar-actions {
    display: flex; flex-direction: column; position: absolute; left: 12px; right: 12px; top: calc(var(--top) + 8px);
    background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px; box-shadow: var(--shadow);
  }
  body.nav-open .topbar-actions { top: calc(var(--top) + 210px); }
  .product-grid, .features, .footer-grid, .user-layout, .quote-layout { grid-template-columns: 1fr; }
  .quote-side, .quote-main { border-radius: 18px; border: 1px solid var(--line); }
  .quote-layout { gap: 12px; }
  .quote-side { min-height: auto; max-height: 280px; }
  .hero { min-height: calc(100svh - var(--top)); }
}
