*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #090b10;
  --bg-2: #10131b;
  --card: #151924;
  --card-2: #1b2030;
  --ink: #f3f5f8;
  --muted: #8d95a8;
  --faint: #6b7386;
  --line: rgba(255, 255, 255, 0.08);
  --gold: #e7c36a;
  --gold-2: #f6e0a0;
  --gold-dim: rgba(231, 195, 106, 0.14);
  --ok: #3dcf8e;
  --ok-dim: rgba(61, 207, 142, 0.14);
  --warn: #e8b04a;
  --warn-dim: rgba(232, 176, 74, 0.14);
  --bad: #e86b6b;
  --bad-dim: rgba(232, 107, 107, 0.14);
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --font: "Noto Sans CJK SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Segoe UI", system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  width: 820px;
  height: 520px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(231, 195, 106, 0.16), transparent 70%);
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.topbar,
main,
.footer {
  width: min(920px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 8px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  display: flex;
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px rgba(231, 195, 106, 0.25));
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-text strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-text span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.badge-demo {
  flex-shrink: 0;
  border: 1px solid rgba(231, 195, 106, 0.4);
  background: var(--gold-dim);
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border-radius: 999px;
}

.hero {
  padding: 36px 0 12px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.hero h1 {
  margin: 0 auto;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.lead {
  margin: 16px auto 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 16px;
}

.search {
  margin: 32px auto 0;
  max-width: 640px;
  text-align: left;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box:focus-within {
  border-color: rgba(231, 195, 106, 0.55);
  box-shadow: var(--shadow), 0 0 0 4px rgba(231, 195, 106, 0.12);
}

.search-box.shake {
  animation: shake 0.42s ease;
  border-color: var(--bad);
}

@keyframes shake {
  20%, 80% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

.at {
  color: var(--gold);
  font-weight: 700;
  font-size: 18px;
}

#handle-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  height: 44px;
}

#handle-input::placeholder {
  color: #5d6578;
}

.btn {
  appearance: none;
  border: 0;
  background: linear-gradient(180deg, #f3d78a, #c9a246);
  color: #1a1406;
  font: inherit;
  font-weight: 800;
  font-size: 15px;
  padding: 0 18px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(201, 162, 70, 0.28);
}

.btn:hover {
  filter: brightness(1.05);
}

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

.btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.hint,
.form-error {
  margin: 12px 4px 0;
  font-size: 13px;
  color: var(--muted);
}

.form-error {
  color: #ff9a9a;
}

.linkish {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  color: var(--gold-2);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.loading-panel,
.report {
  margin: 28px 0 40px;
}

.loading-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--shadow);
}

.spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 16px;
  border: 3px solid rgba(231, 195, 106, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-title {
  margin: 0;
  font-weight: 700;
  font-size: 18px;
}

.loading-step {
  margin: 8px 0 0;
  color: var(--gold-2);
  font-size: 14px;
}

.loading-list {
  list-style: none;
  margin: 20px auto 0;
  padding: 0;
  max-width: 320px;
  text-align: left;
  color: var(--muted);
  font-size: 14px;
}

.loading-list li {
  padding: 6px 0 6px 22px;
  position: relative;
}

.loading-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3a4154;
}

.loading-list li.on::before {
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

.loading-list li.done::before {
  background: var(--ok);
  box-shadow: none;
}

.demo-banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: linear-gradient(90deg, rgba(232, 176, 74, 0.16), rgba(232, 107, 107, 0.08));
  border: 1px solid rgba(232, 176, 74, 0.35);
  color: #f8e2aa;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.demo-banner .dot {
  flex-shrink: 0;
  margin-top: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 10px var(--warn);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  animation: rise 0.5s ease both;
}

.card:nth-child(2) { animation-delay: 0.04s; }
.card:nth-child(3) { animation-delay: 0.08s; }
.card:nth-child(4) { animation-delay: 0.12s; }
.card:nth-child(5) { animation-delay: 0.16s; }
.card:nth-child(6) { animation-delay: 0.2s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.card h2 {
  margin: 0 0 14px;
  font-size: 18px;
  letter-spacing: 0.02em;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}

.card-head h2 {
  margin: 0;
}

.subtle {
  color: var(--muted);
  font-size: 13px;
}

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

.avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #1a1406;
  background: linear-gradient(180deg, #f3d78a, #c9a246);
  flex-shrink: 0;
}

.profile h2 {
  margin: 0;
  font-size: 20px;
}

.handle-line {
  color: var(--muted);
  font-size: 14px;
  margin: 2px 0 0;
}

.status-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  margin-top: 8px;
}

.status-pill.ok { background: var(--ok-dim); color: var(--ok); }
.status-pill.warn { background: var(--warn-dim); color: #f3c56a; }
.status-pill.bad { background: var(--bad-dim); color: #ff9a9a; }

.big-num {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.big-num span {
  font-size: 18px;
  color: var(--muted);
  font-weight: 600;
  margin-left: 4px;
}

.metric-list {
  display: grid;
  gap: 16px;
}

.metric {
  padding: 14px 0 4px;
  border-top: 1px solid var(--line);
}

.metric:first-child {
  border-top: 0;
  padding-top: 0;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.metric-name {
  font-weight: 700;
}

.metric-value {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.metric-note {
  margin: 4px 0 10px;
  color: var(--faint);
  font-size: 12px;
}

.bar {
  height: 10px;
  background: #232838;
  border-radius: 999px;
  overflow: hidden;
}

.bar > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #c9a246, #f3d78a);
  transition: width 0.9s ease;
}

.bar > i.ok { background: linear-gradient(90deg, #1fa86b, #3dcf8e); }
.bar > i.warn { background: linear-gradient(90deg, #c4891e, #e8b04a); }
.bar > i.bad { background: linear-gradient(90deg, #c44a4a, #e86b6b); }

.flag {
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 8px;
}

.flag.ok { background: var(--ok-dim); color: var(--ok); }
.flag.warn { background: var(--warn-dim); color: #f3c56a; }
.flag.bad { background: var(--bad-dim); color: #ff9a9a; }

.income {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: center;
}

.income-range {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--gold-2);
}

.income-unit {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

.callout {
  background: var(--gold-dim);
  border: 1px solid rgba(231, 195, 106, 0.2);
  border-radius: 12px;
  padding: 12px 14px;
  color: #efe1b6;
  font-size: 13px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  background: var(--gold-dim);
  color: var(--gold-2);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 700;
}

.type-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.type-list {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.type-name {
  width: 88px;
  flex-shrink: 0;
  font-size: 13px;
}

.type-bar {
  flex: 1;
  height: 8px;
  background: #232838;
  border-radius: 99px;
  overflow: hidden;
}

.type-bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #7aa2ff, #b9cdff);
  transition: width 0.9s ease;
}

.type-pct {
  width: 40px;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.hours {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  margin-top: 8px;
}

.hour-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
}

.hour-bar-track {
  height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
}

.hour-col b {
  display: block;
  width: 100%;
  background: #2a3144;
  border-radius: 4px 4px 0 0;
  height: 0;
  min-height: 0;
  transition: height 0.8s ease;
}

.hour-col.peak b {
  background: linear-gradient(180deg, #f3d78a, #c9a246);
}

.hour-col span {
  font-size: 9px;
  color: var(--faint);
  line-height: 1;
  text-align: center;
}

.posts {
  display: grid;
  gap: 10px;
}

.post {
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.post.flagged {
  border-color: rgba(232, 107, 107, 0.35);
  background: linear-gradient(180deg, rgba(232, 107, 107, 0.08), var(--card-2));
}

.post-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.post p {
  margin: 0;
  font-size: 14px;
}

.post-warn {
  margin-top: 8px;
  color: #ffb1b1;
  font-size: 12px;
}

.share-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(600px 200px at 100% 0%, rgba(231, 195, 106, 0.18), transparent 50%),
    linear-gradient(180deg, #1c2232, #12151e);
  border: 1px solid rgba(231, 195, 106, 0.28);
}

.share-watermark {
  position: absolute;
  right: -8px;
  top: 18px;
  transform: rotate(18deg);
  color: rgba(255, 255, 255, 0.06);
  font-size: 42px;
  font-weight: 800;
  pointer-events: none;
  letter-spacing: 0.1em;
}

.share-kicker {
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin: 0 0 8px;
}

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

.share-item .k {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.share-item .v {
  font-weight: 800;
  font-size: 18px;
}

.share-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.footer {
  padding: 8px 0 48px;
  color: var(--faint);
  font-size: 12px;
}

.footer a {
  color: #cfc09a;
}

.footer .copy {
  margin-top: 16px;
}

@media (max-width: 720px) {
  .topbar,
  main,
  .footer {
    width: min(920px, calc(100% - 24px));
  }

  .search-box {
    flex-wrap: wrap;
    padding: 10px;
  }

  #handle-input {
    width: calc(100% - 28px);
    flex: 1 1 auto;
  }

  .btn {
    width: 100%;
  }

  .status-hero,
  .income,
  .grid-2,
  .share-grid {
    grid-template-columns: 1fr;
  }

  .hour-bar-track {
    height: 88px;
  }

  .hero {
    padding-top: 24px;
    text-align: left;
  }
}
