:root {
  --bg: #0b0f1a;
  --text: #e0e0ff;
  --muted: #9aa3c7;
  --line: rgba(255, 255, 255, 0.08);
  --card: rgba(255, 255, 255, 0.04);
  --purple: #a855f7;
  --cyan: #06b6d4;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans SC", system-ui, sans-serif;
  line-height: 1.65;
}
h1, h2, h3, .brand-name, .eyebrow {
  font-family: "ZCOOL KuaiLe", cursive, sans-serif;
  letter-spacing: 0.04em;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 420px at 15% -10%, rgba(168, 85, 247, 0.22), transparent 55%),
    radial-gradient(700px 380px at 90% 0%, rgba(6, 182, 212, 0.16), transparent 50%);
  z-index: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  background: rgba(11, 15, 26, 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 22px; }
.brand-mark {
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  display: block;
  border: none;
  border-radius: 7px;
  overflow: hidden;
  line-height: 0;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.nav { display: flex; gap: 22px; font-size: 15px; }
.nav a {
  color: var(--muted);
  position: relative;
  padding-bottom: 6px;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #7c3aed, #06b6d4);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.nav a:hover, .nav a.active { color: #fff; }
.nav a.active::after { transform: scaleX(1); }
.menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  width: 40px; height: 40px;
  border-radius: 8px;
  cursor: pointer;
}

main { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 0 24px 72px; }
.hero, .page-hero { padding: 88px 0 48px; }
.eyebrow {
  color: var(--cyan);
  margin-bottom: 12px;
}
h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.2; margin-bottom: 16px; }
h2 { font-size: 32px; margin-bottom: 10px; }
h3 { font-size: 22px; margin-bottom: 8px; }
.lead, .muted { color: var(--muted); max-width: 640px; }
.cta-row { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
}
.btn.primary {
  background: linear-gradient(90deg, #7c3aed, #06b6d4);
  color: #fff;
}
.btn.ghost {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
}
.btn {
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.btn.primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.12);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}
.btn.ghost:hover {
  transform: translateY(-1px);
  border-color: rgba(6, 182, 212, 0.45);
}
.link { color: #c084fc; font-size: 14px; }

.section { margin-top: 24px; padding: 24px 0 8px; }
.section-head { margin-bottom: 22px; }
.grid-3, .grid-2 { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card, .panel, .list-item, .faq {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
}
.card, .tool-tile, .qr-card, .panel {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card::after, .tool-tile::after, .qr-card::after, .panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(180px 180px at var(--spot-x, 50%) var(--spot-y, 50%), rgba(168, 85, 247, 0.22), transparent 55%);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.card:hover, .tool-tile:hover, .qr-card:hover, .panel:hover {
  transform: translateY(-3px);
  border-color: rgba(168, 85, 247, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}
.card:hover::after, .tool-tile:hover::after, .qr-card:hover::after, .panel:hover::after {
  opacity: 1;
}
.card-icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  margin-bottom: 14px;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.18);
  color: #d8b4fe;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
}
.ticks { margin-top: 16px; color: var(--muted); }
.ticks li { margin: 8px 0; padding-left: 8px; }
.panel-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.tag {
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.12);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
}
.muted-tag { color: var(--muted); background: rgba(255,255,255,0.06); }

.stack { display: grid; gap: 12px; }
.list-item { display: grid; grid-template-columns: 120px 1fr; gap: 16px; }
.list-item time { color: var(--cyan); }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin-top: 10px; color: var(--muted); }

.tools-page .page-hero { padding: 40px 0 12px; }
.tools-page .page-hero h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 8px; }
.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.tool-tile {
  aspect-ratio: 3 / 1;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  min-height: 0;
}
.tool-tile h3 {
  font-size: 16px;
  margin: 0;
  grid-column: 2;
  grid-row: 1;
}
.tool-tile p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin: 0;
  grid-column: 2;
  grid-row: 2;
}
.tool-tile .btn {
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 8px;
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
  justify-self: end;
}
.tool-tile .mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  margin-bottom: 0;
  background: rgba(139, 92, 246, 0.18);
  color: #d8b4fe;
  grid-column: 1;
  grid-row: 1 / 3;
  font-size: 11px;
  font-family: "ZCOOL KuaiLe", cursive, sans-serif;
  overflow: hidden;
}
.tool-tile .mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 6px; color: var(--muted); font-size: 14px; }
.form input, .form textarea {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
}

.footer {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 48px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.footer-links { display: flex; gap: 16px; }

@media (max-width: 860px) {
  .nav {
    display: none;
    position: absolute;
    right: 16px;
    top: 64px;
    flex-direction: column;
    background: #12182a;
    border: 1px solid var(--line);
    padding: 14px 18px;
    border-radius: 12px;
  }
  .nav.open { display: flex; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .grid-3, .grid-2, .split, .list-item { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .hero, .page-hero { padding-top: 48px; }
  .footer { flex-direction: column; }
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}
.qr-card {
  position: relative;
  width: min(360px, 86vw);
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid rgba(230, 126, 34, 0.35);
  box-shadow: 0 0 40px rgba(230, 126, 34, 0.18);
}
.qr-card h3 { text-align: center; margin-bottom: 14px; color: #ffb36a; }
.qr-ring {
  position: relative;
  padding: 3px;
  border-radius: 18px;
}
.qr-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: conic-gradient(from 0deg, transparent 0 68%, rgba(255, 179, 106, 0.15) 78%, rgba(230, 122, 34, 0.85) 88%, transparent 100%);
  animation: qrspin 10s linear infinite;
}
.qr-board {
  position: relative;
  z-index: 1;
  aspect-ratio: 1;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
}
@keyframes qrspin {
  to { transform: rotate(360deg); }
}
.qr-grid {
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-columns: repeat(37, 1fr);
  grid-template-rows: repeat(37, 1fr);
  gap: 0;
}
.qr-grid i {
  display: block;
  border-radius: 1px;
}
.qr-grid i.on {
  background: #e67a22;
}
.qr-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22%;
  height: 22%;
  transform: translate(-50%, -50%);
  border-radius: 18%;
  background: #e67a22;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 4px #fff;
  color: #fff;
  font-family: "ZCOOL KuaiLe", cursive, sans-serif;
  font-size: clamp(18px, 4.6vw, 28px);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}
.qr-hint { margin-top: 12px; text-align: center; color: var(--muted); font-size: 13px; }

.hero .eyebrow, .hero h1, .hero .lead, .hero .cta-row,
.page-hero .eyebrow, .page-hero h1, .page-hero .lead,
.section-head, .card, .tool-tile, .contact-layout > * {
  animation: risein 0.65s ease both;
}
.hero h1, .page-hero h1 { animation-delay: 0.06s; }
.hero .lead, .page-hero .lead { animation-delay: 0.12s; }
.hero .cta-row { animation-delay: 0.18s; }
.card:nth-child(1), .tool-tile:nth-child(1) { animation-delay: 0.08s; }
.card:nth-child(2), .tool-tile:nth-child(2) { animation-delay: 0.14s; }
.card:nth-child(3), .tool-tile:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4), .tool-tile:nth-child(4) { animation-delay: 0.26s; }
.card:nth-child(n+5), .tool-tile:nth-child(n+5) { animation-delay: 0.32s; }
@keyframes risein {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.trail-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: screen;
}
@media (max-width: 860px) {
  .contact-layout { grid-template-columns: 1fr; }
  .qr-card { margin: 0 auto; }
}
