:root {
  --bg: #07132a;
  --bg-soft: rgba(11, 24, 45, 0.7);
  --ink: #e6f0ff;
  --muted: #9eb3d1;
  --primary: #34d3ff;
  --primary-strong: #1a8dff;
  --accent: #3cffb2;
  --violet: #7b6dff;
  --line: rgba(130, 172, 255, 0.24);
  --ok: #30d490;
  --radius: 18px;
  --shadow: 0 24px 44px rgba(2, 8, 24, 0.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  color: var(--ink);
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(52, 211, 255, 0.2), transparent 40%),
    radial-gradient(circle at 82% 0%, rgba(123, 109, 255, 0.22), transparent 38%),
    radial-gradient(circle at 50% 85%, rgba(60, 255, 178, 0.12), transparent 44%),
    linear-gradient(135deg, #050d1d 0%, #08142d 45%, #061730 100%);
  min-height: 100%;
}

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

.cursor-glow,
.cursor-beam {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 220ms ease, transform 120ms ease-out;
  will-change: transform;
}

.cursor-glow {
  width: 380px;
  height: 380px;
  left: 0;
  top: 0;
  transform: translate3d(calc(var(--mx, 50vw) - 190px), calc(var(--my, 50vh) - 190px), 0);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.35) 0%, rgba(92, 237, 255, 0.25) 24%, rgba(92, 237, 255, 0.1) 44%, transparent 72%),
    radial-gradient(circle at 70% 68%, rgba(123, 109, 255, 0.22) 0%, transparent 56%);
  filter: blur(12px) saturate(1.08);
}

.cursor-beam {
  width: 240px;
  height: 240px;
  left: 0;
  top: 0;
  transform: translate3d(calc(var(--mx, 50vw) - 120px), calc(var(--my, 50vh) - 120px), 0) rotate(var(--ma, 20deg)) scale(1.1);
  border-radius: 50%;
  background:
    conic-gradient(from 240deg at 48% 50%, rgba(52, 211, 255, 0) 0deg, rgba(52, 211, 255, 0.32) 58deg, rgba(123, 109, 255, 0.2) 110deg, rgba(52, 211, 255, 0) 180deg, rgba(52, 211, 255, 0) 360deg),
    radial-gradient(circle at 55% 48%, rgba(52, 211, 255, 0.38) 0%, rgba(52, 211, 255, 0.16) 26%, rgba(52, 211, 255, 0) 62%);
  filter: blur(10px) saturate(1.1);
}

body.pointer-ready .cursor-glow,
body.pointer-ready .cursor-beam {
  opacity: 1;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
  background: rgba(7, 15, 31, 0.72);
  border-bottom: 1px solid var(--line);
}

.nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a:hover { color: #d7e9ff; }

.hero {
  padding: 76px 0 48px;
  text-align: center;
}

.hero h1 {
  margin: 0;
  line-height: 1.12;
  font-size: clamp(2rem, 4vw, 3.8rem);
}

.hero p {
  margin: 16px auto 0;
  max-width: 66ch;
  color: var(--muted);
  line-height: 1.75;
}

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

.btn {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

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

.btn-primary {
  background: linear-gradient(140deg, var(--primary) 0%, var(--primary-strong) 75%);
  color: #041327;
  font-weight: 700;
  box-shadow: 0 14px 26px rgba(52, 211, 255, 0.26);
}

.btn-secondary {
  background: rgba(8, 24, 48, 0.9);
  border-color: var(--line);
  color: #dce9ff;
}

.section { padding: 38px 0; }

.section h2 {
  margin: 0 0 12px;
  font-size: clamp(1.38rem, 3.2vw, 2rem);
  letter-spacing: 0.01em;
}

.section-lead {
  margin: 0;
  color: var(--muted);
  max-width: 62ch;
  line-height: 1.7;
}

.overview-shell {
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.overview-main {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(13, 28, 52, 0.85) 0%, rgba(10, 22, 40, 0.75) 100%);
  box-shadow: var(--shadow);
  padding: 18px;
}

.overview-side {
  display: grid;
  gap: 14px;
}

.badges {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(8, 23, 45, 0.78);
  color: #cae2ff;
  font-size: 0.85rem;
}

.grid {
  margin-top: 20px;
  display: grid;
  gap: 16px;
}

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

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(12, 28, 52, 0.84) 0%, rgba(8, 21, 40, 0.76) 100%);
  box-shadow: var(--shadow);
  padding: 18px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.card p { margin: 0; color: var(--muted); line-height: 1.65; }

.card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.75;
}

.card li + li { margin-top: 8px; }

.meta {
  margin: 10px 0 0;
  font-family: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.8rem;
  color: #66d6ff;
}

.tool-links {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tool-links a {
  font-size: 0.88rem;
  color: #8fd6ff;
}

.tool-links a.btn { font-size: 1rem; }
.tool-links a.btn-primary { color: #041327; }
.tool-links a.btn-secondary { color: #dbe7ff; }

.tool-switch {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tool-tab {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(7, 23, 43, 0.82);
  color: #b7cff1;
  font-weight: 600;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.tool-tab:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 16px rgba(4, 16, 30, 0.55);
  color: #e6f2ff;
}

.tool-tab.active {
  background: linear-gradient(140deg, var(--primary), var(--primary-strong));
  color: #031429;
  border-color: transparent;
}

.tool-title-btn {
  display: inline-flex;
  margin-top: 12px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: linear-gradient(140deg, var(--primary), var(--violet));
  color: #031429;
  padding: 12px 20px;
  font-size: clamp(1.15rem, 2.5vw, 1.6rem);
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.tool-title-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 25px rgba(52, 211, 255, 0.22);
  filter: saturate(1.1);
}

.tool-title-btn::after {
  content: "->";
  font-family: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  opacity: 0.9;
}

.widget {
  padding: 16px;
}

.widget h3 {
  font-size: 1rem;
}

.stat-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-label {
  font-size: 0.8rem;
  color: #81a4ce;
}

.stat-value {
  margin-top: 4px;
  font-size: 1.5rem;
  color: #dff6ff;
  font-weight: 700;
}

.stat-subtitle {
  margin: 12px 0 8px;
  font-size: 0.85rem;
  color: #89a9cd;
}

.trend-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.trend-item {
  text-align: center;
}

.trend-bar {
  height: 64px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(52, 211, 255, 0.85), rgba(123, 109, 255, 0.45));
  min-height: 6px;
}
.trend-bar.l0 { height: 6px; }
.trend-bar.l1 { height: 12px; }
.trend-bar.l2 { height: 18px; }
.trend-bar.l3 { height: 26px; }
.trend-bar.l4 { height: 34px; }
.trend-bar.l5 { height: 42px; }
.trend-bar.l6 { height: 50px; }
.trend-bar.l7 { height: 58px; }
.trend-bar.l8 { height: 64px; }

.trend-label {
  margin-top: 6px;
  font-size: 0.7rem;
  color: #7699c3;
}

.download-top {
  display: grid;
  gap: 8px;
}

.download-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.85rem;
  color: #c7dcfa;
}

.download-empty {
  font-size: 0.84rem;
  color: #7595bf;
}

.widget-lead {
  font-size: 0.88rem;
  max-width: none;
}

.mood-options {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mood-btn {
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(8, 24, 48, 0.92);
  color: #c9ddfa;
  padding: 0 12px;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.mood-btn.active {
  background: linear-gradient(135deg, rgba(52, 211, 255, 0.92), rgba(60, 255, 178, 0.88));
  border-color: transparent;
  color: #031429;
  font-weight: 700;
}

.mood-current {
  margin-top: 10px;
  font-size: 0.85rem;
  color: #89a8cb;
}

.table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 24, 48, 0.92);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th, td {
  padding: 12px;
  border-bottom: 1px solid rgba(130, 172, 255, 0.2);
  text-align: left;
  font-size: 0.92rem;
}

th {
  background: rgba(15, 36, 68, 0.8);
  color: #c3dcfe;
}

.contact {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  align-items: center;
}

.qr {
  border-radius: 14px;
  border: 1px solid var(--line);
  width: 100%;
  background: #fff;
}

.site-footer {
  margin-top: 56px;
  padding: 26px 0 44px;
  border-top: 1px solid var(--line);
  color: #7fa3d2;
  font-size: 0.9rem;
}

.record-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.record-line img {
  width: 16px;
  height: auto;
}

@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .overview-shell {
    grid-template-columns: 1fr;
  }

  .overview-main {
    order: 1;
  }

  .overview-side {
    order: 2;
  }
}

@media (max-width: 720px) {
  .container {
    padding: 0 14px;
  }

  .nav {
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .nav-links {
    width: 100%;
    flex-wrap: wrap;
    gap: 10px;
  }

  .hero {
    padding-top: 52px;
  }

  .hero h1 {
    white-space: normal;
    font-size: clamp(1.75rem, 8vw, 2.6rem);
  }

  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .contact {
    grid-template-columns: 1fr;
  }

  .trend-bars {
    gap: 6px;
  }

  .trend-bar {
    height: 54px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html, body {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }

  .cursor-glow,
  .cursor-beam {
    display: none;
  }
}
