:root {
  color-scheme: light;
  --ink: #172022;
  --muted: #6c7778;
  --line: #e5e9e7;
  --paper: #fbfcfa;
  --mint: #dbf8eb;
  --mint-strong: #b8efd9;
  --green: #1c8b68;
  --green-dark: #106149;
  --orange: #ed7c3b;
  --orange-soft: #fff0e7;
  --red: #d84d53;
  --red-soft: #fff0f1;
  --shadow: 0 18px 60px rgba(35, 70, 55, 0.11);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 6%, rgba(184, 239, 217, 0.85), transparent 24rem),
    radial-gradient(circle at 92% 12%, rgba(255, 226, 185, 0.75), transparent 25rem),
    #f3f8f3;
}

button, textarea { font: inherit; }
button { cursor: pointer; }

.page-shell { max-width: 1080px; margin: 0 auto; padding: 28px 28px 28px; }
.site-header { align-items: center; display: flex; gap: 20px; justify-content: space-between; margin-bottom: 70px; }
.brand { color: var(--ink); font-size: 15px; font-weight: 800; letter-spacing: -.03em; text-decoration: none; }
.tool-nav { align-items: center; background: rgba(255,255,255,.62); border: 1px solid rgba(229,233,231,.9); border-radius: 14px; display: flex; gap: 3px; margin: 0 auto; padding: 4px; }
.tool-nav-item { align-items: center; border-radius: 10px; color: #72807a; display: inline-flex; font-size: 12px; font-weight: 700; gap: 7px; min-height: 36px; padding: 0 12px; text-decoration: none; transition: background .2s, color .2s, box-shadow .2s; white-space: nowrap; }
.tool-nav-item:hover { background: #f1f7f3; color: var(--green-dark); }
.tool-nav-item.is-active { background: #fff; box-shadow: 0 4px 12px rgba(35,70,55,.08); color: var(--green-dark); }
.tool-nav-icon { fill: none; height: 17px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 17px; }
.account-bar { align-items: center; display: flex; gap: 10px; }
.account-status { color: var(--muted); font-size: 12px; font-weight: 700; }
.account-status.logged-in { color: var(--green-dark); }
.button-small { min-height: 35px; padding: 0 13px; }
.hero { text-align: center; }
.eyebrow {
  align-items: center;
  color: var(--green-dark);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.eyebrow-dark { color: var(--green); }
.eyebrow-dot { background: var(--orange); border-radius: 50%; height: 7px; width: 7px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(42px, 6vw, 72px); letter-spacing: -.08em; line-height: 1.08; margin: 20px 0 14px; }
.hero-copy { color: var(--muted); font-size: 17px; line-height: 1.75; }

.input-card {
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 22px;
  box-shadow: var(--shadow);
  margin: 35px auto 0;
  max-width: 800px;
  padding: 22px;
  text-align: left;
}
.input-card-topline { display: flex; justify-content: space-between; margin: 0 3px 12px; }
.input-card-topline label { font-size: 14px; font-weight: 700; }
#count-label { color: var(--green); font-size: 13px; font-weight: 700; }
textarea {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  display: block;
  font-size: 14px;
  line-height: 1.8;
  outline: none;
  padding: 15px 16px;
  resize: vertical;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
textarea:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(28,139,104,.1); }
textarea::placeholder { color: #a0aaa7; }
.input-footer { align-items: center; display: flex; gap: 18px; justify-content: space-between; margin-top: 16px; }
.input-hint { color: var(--muted); font-size: 12px; }
.actions { display: flex; gap: 9px; }
.button { border: 0; border-radius: 11px; font-size: 13px; font-weight: 700; min-height: 43px; padding: 0 17px; }
.button-quiet { background: #eef3f0; color: var(--green-dark); }
.button-quiet:hover { background: #e2eee8; }
.button-primary { align-items: center; background: var(--green); color: #fff; display: inline-flex; gap: 16px; }
.button-primary:hover { background: var(--green-dark); }
.button-primary:disabled { cursor: wait; opacity: .65; }
.button-arrow { font-size: 19px; font-weight: 400; line-height: 0; }
.analysis-progress { background: #edf8f3; border: 1px solid var(--mint-strong); border-radius: 9px; color: var(--green-dark); font-size: 13px; line-height: 1.6; margin: 13px 3px 0; padding: 10px 11px; }
.analysis-progress-head { align-items: center; display: flex; gap: 12px; justify-content: space-between; }
.analysis-progress-label { min-width: 0; overflow-wrap: anywhere; }
.analysis-progress-percent { font-variant-numeric: tabular-nums; white-space: nowrap; }
.analysis-progress-track { background: #d8eee4; border-radius: 99px; height: 7px; margin-top: 8px; overflow: hidden; }
.analysis-progress-bar { background: var(--green); border-radius: inherit; display: block; height: 100%; transition: width .25s ease; width: 0; }
.analysis-progress-detail { color: #55706a; font-size: 12px; margin-top: 7px; overflow-wrap: anywhere; }
.form-error { color: var(--red); font-size: 13px; line-height: 1.6; margin: 13px 3px 0; }
.auth-dialog { background: transparent; border: 0; max-width: min(420px, calc(100vw - 30px)); padding: 0; width: 100%; }
.auth-dialog::backdrop { background: rgba(23, 32, 34, .35); backdrop-filter: blur(3px); }
.auth-form { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; padding: 27px; position: relative; }
.auth-form h2 { font-size: 26px; margin-top: 13px; }
.dialog-copy { color: var(--muted); font-size: 13px; line-height: 1.7; margin-top: 8px; }
.auth-form label { font-size: 13px; font-weight: 700; margin: 17px 0 7px; }
.auth-form input { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font: inherit; min-height: 43px; outline: none; padding: 0 12px; }
.auth-form input:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(28,139,104,.1); }
.dialog-close { background: transparent; border: 0; color: var(--muted); font-size: 26px; line-height: 1; padding: 2px 6px; position: absolute; right: 17px; top: 16px; }
.auth-submit { justify-content: center; margin-top: 20px; width: 100%; }
.query-options { border-top: 1px solid var(--line); display: grid; gap: 18px; margin-top: 20px; padding: 18px 3px 0; }
.option-group { border: 0; margin: 0; min-width: 0; padding: 0; }
.option-group legend { color: var(--ink); font-size: 12px; font-weight: 700; margin-bottom: 10px; padding: 0; }
.option-list { display: flex; flex-wrap: wrap; gap: 8px; }
.option-list-depth { display: grid; gap: 8px; }
.check-option { align-items: center; background: #f5f8f6; border: 1px solid transparent; border-radius: 9px; color: #4c5b56; cursor: pointer; display: inline-flex; font-size: 12px; gap: 8px; min-height: 36px; padding: 0 11px; transition: background .2s, border-color .2s, color .2s; }
.platform-choice-icon { align-items: center; border-radius: 6px; display: inline-flex; flex: 0 0 23px; height: 23px; justify-content: center; }
.platform-choice-icon svg { fill: none; height: 16px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 16px; }
.platform-choice-bilibili { background: #eaf4ff; color: #2386c9; }
.platform-choice-xiaohongshu { background: #fff0ef; color: #dd554e; }
.platform-choice-douyin { background: #e9f6f4; color: #137b76; }
.platform-choice-weibo { background: #fff1e8; color: #e66d35; }
.check-option:hover { border-color: var(--mint-strong); }
.check-option:has(input:checked) { background: var(--mint); border-color: var(--mint-strong); color: var(--green-dark); font-weight: 700; }
.check-option input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.check-mark { background: #fff; border: 1px solid #b8c6bf; border-radius: 4px; flex: 0 0 15px; height: 15px; position: relative; width: 15px; }
.radio-mark { background: #fff; border: 1px solid #b8c6bf; border-radius: 50%; flex: 0 0 15px; height: 15px; position: relative; width: 15px; }
.check-option input:focus-visible + .check-mark { box-shadow: 0 0 0 3px rgba(28,139,104,.18); }
.check-option input:focus-visible + .radio-mark { box-shadow: 0 0 0 3px rgba(28,139,104,.18); }
.check-option input:checked + .check-mark { background: var(--green); border-color: var(--green); }
.check-option input:checked + .check-mark::after { border: solid #fff; border-width: 0 2px 2px 0; content: ''; height: 7px; left: 4px; position: absolute; top: 2px; transform: rotate(45deg); width: 3px; }
.check-option input:checked + .radio-mark { background: var(--green); border-color: var(--green); }
.check-option input:checked + .radio-mark::after { background: #fff; border-radius: 50%; content: ''; height: 5px; left: 4px; position: absolute; top: 4px; width: 5px; }
.check-option-wide { align-items: flex-start; line-height: 1.55; min-height: 0; padding: 9px 11px; }
.check-option-wide .check-mark { margin-top: 2px; }
.check-option small { color: var(--muted); font-size: 11px; font-weight: 400; }
.check-option em { color: var(--muted); display: block; font-size: 11px; font-style: normal; font-weight: 400; }
.trust-row { color: #78837f; display: flex; flex-wrap: wrap; font-size: 12px; gap: 22px; justify-content: center; margin-top: 22px; }
.trust-icon { color: var(--green); font-weight: 800; margin-right: 5px; }
.extractor-card { background: rgba(255,255,255,.74); border: 1px solid rgba(229,233,231,.95); border-radius: 20px; margin: 50px auto 0; max-width: 800px; padding: 21px 22px; text-align: left; }
.extractor-heading { align-items: end; display: flex; gap: 18px; justify-content: space-between; }
.extractor-heading h2 { font-size: 22px; margin-top: 10px; }
.extractor-copy { color: var(--muted); font-size: 12px; line-height: 1.6; margin-top: 7px; }
.extractor-count { color: var(--green); font-size: 12px; font-weight: 700; white-space: nowrap; }
.extractor-card textarea { margin-top: 16px; }
.extractor-actions { display: flex; gap: 9px; justify-content: flex-end; margin-top: 11px; }
.extractor-output-label { color: #5e6b67; font-size: 12px; font-weight: 700; margin: 18px 2px -4px; }
.extractor-bottom { align-items: center; display: flex; gap: 18px; justify-content: space-between; margin-top: 13px; }
.extractor-bottom .actions { align-items: center; }
.extractor-card .button-primary { min-height: 39px; }
.extractor-card .button-quiet { min-height: 39px; }
.extractor-card button:disabled { cursor: not-allowed; opacity: .5; }

.results-section { margin-top: 86px; }
.results-heading { align-items: end; display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.result-controls { align-items: center; display: flex; flex-direction: column; gap: 11px; justify-self: center; }
.result-filters { display: flex; gap: 8px; }
.result-filter { background: #fff; border: 2px solid var(--green); box-shadow: 0 7px 18px rgba(28,139,104,.14); color: var(--green-dark); font-size: 13px; font-weight: 800; min-height: 46px; padding: 0 14px; white-space: nowrap; }
.result-filter:hover { background: var(--mint); border-color: var(--green-dark); }
.result-filter:has(input:checked) { background: var(--mint); border-color: var(--green-dark); box-shadow: 0 7px 20px rgba(28,139,104,.2); }
.result-export { align-items: center; display: flex; gap: 8px; }
.result-export-label { color: var(--muted); font-size: 11px; }
.result-export-actions { display: flex; gap: 6px; }
.result-export-button { min-height: 32px; padding: 0 10px; }
.result-export-button:disabled { cursor: not-allowed; opacity: .45; }
h2 { font-size: 28px; letter-spacing: -.04em; margin-top: 13px; }
.result-time { color: var(--muted); font-size: 12px; }
.result-meta { align-items: flex-end; display: flex; flex-direction: column; gap: 5px; justify-self: end; }
.result-usage { color: var(--green-dark); font-size: 12px; text-align: right; }
.summary-grid { display: grid; gap: 13px; grid-template-columns: repeat(4, 1fr); margin-top: 25px; }
.summary-card { background: rgba(255,255,255,.78); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.summary-label { color: var(--muted); font-size: 12px; }
.summary-value { color: var(--ink); font-size: 28px; font-weight: 800; letter-spacing: -.04em; margin-top: 8px; }
.summary-card.warning .summary-value { color: var(--orange); }
.summary-card.danger .summary-value { color: var(--red); }

.link-results { display: grid; gap: 16px; margin-top: 20px; }
.link-card { background: rgba(255,255,255,.88); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.link-card-header { align-items: center; background: #fff; border-bottom: 1px solid var(--line); display: flex; gap: 13px; justify-content: space-between; padding: 17px 19px; }
.link-meta { min-width: 0; }
.platform-name { align-items: center; display: flex; font-size: 15px; font-weight: 800; gap: 8px; }
.platform-badge { align-items: center; border-radius: 7px; display: inline-flex; font-size: 11px; font-weight: 800; height: 23px; justify-content: center; width: 23px; }
.platform-douyin { background: #e9f6f4; color: #137b76; }
.platform-xiaohongshu { background: #fff0ef; color: #dd554e; }
.platform-bilibili { background: #eaf4ff; color: #2386c9; }
.platform-weibo { background: #fff1e8; color: #e66d35; }
.source-url { color: var(--muted); display: block; font-size: 11px; margin-top: 6px; max-width: 650px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-pill { border-radius: 99px; font-size: 11px; font-weight: 700; padding: 7px 10px; white-space: nowrap; }
.status-success { background: var(--mint); color: var(--green-dark); }
.status-blocked, .status-error { background: var(--red-soft); color: var(--red); }
.status-no_comments { background: var(--orange-soft); color: #b65b27; }
.link-note { color: var(--muted); font-size: 12px; line-height: 1.65; padding: 15px 19px 0; }
.link-note strong { color: var(--ink); }
.comment-table-wrap { overflow-x: auto; padding: 14px 19px 19px; }
.comment-table { border-collapse: collapse; min-width: 650px; width: 100%; }
.comment-table th { color: #84908b; font-size: 11px; font-weight: 700; padding: 0 10px 10px; text-align: left; }
.comment-table td { border-top: 1px solid #edf0ee; font-size: 13px; padding: 13px 10px; vertical-align: top; }
.comment-table td:first-child, .comment-table th:first-child { padding-left: 0; width: 42px; }
.comment-table td:last-child, .comment-table th:last-child { padding-right: 0; width: 220px; }
.comment-index { color: #9aa49f; font-variant-numeric: tabular-nums; }
.username { font-weight: 700; white-space: nowrap; }
.comment-text { color: #43504d; line-height: 1.6; max-width: 560px; }
.comment-row-reply td { background: #f7fbf9; }
.comment-row-reply td:first-child { border-left: 2px solid var(--green); padding-left: 10px; }
.comment-row-reply .comment-text { border-left: 2px solid #d6ebe2; padding-left: 12px; }
.reply-index { color: var(--green-dark); display: inline-block; font-size: 16px; line-height: 1; }
.comment-user-cell { align-items: center; display: flex; flex-wrap: wrap; gap: 6px; }
.comment-kind { border-radius: 4px; font-size: 10px; font-weight: 700; padding: 3px 5px; white-space: nowrap; }
.comment-kind-reply { background: #e3f4ed; color: var(--green-dark); }
.flags { display: flex; flex-wrap: wrap; gap: 5px; }
.flag { border-radius: 5px; font-size: 10px; padding: 4px 6px; white-space: nowrap; }
.flag-user, .flag-content { background: var(--orange-soft); color: #bd5e29; }
.duplicate-source { color: var(--muted); display: flex; flex-basis: 100%; font-size: 10px; gap: 3px; line-height: 1.45; margin-top: 1px; }
.source-list { display: grid; gap: 2px; min-width: 0; }
.source-link { color: var(--green-dark); display: block; max-width: 210px; overflow: hidden; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.source-link:hover { text-decoration: underline; }
.empty-state { color: var(--muted); font-size: 13px; padding: 0 19px 19px; }
.page-footer { color: #8a9691; display: flex; font-size: 11px; justify-content: space-between; margin-top: 74px; padding: 17px 2px; }

@media (max-width: 680px) {
  .page-shell { padding: 45px 16px 20px; }
  .site-header { flex-wrap: wrap; margin-bottom: 52px; }
  .tool-nav { flex: 1 0 100%; justify-content: center; margin: 0; order: 3; }
  .tool-nav-item { flex: 1 1 0; justify-content: center; }
  .hero-copy { font-size: 15px; }
  .input-card { border-radius: 17px; padding: 15px; }
  .input-footer, .page-footer { align-items: flex-start; flex-direction: column; }
  .results-heading { align-items: flex-start; gap: 17px; grid-template-columns: 1fr; }
  .input-footer { gap: 13px; }
  .actions, .button { width: 100%; }
  .actions .button { justify-content: center; }
  .query-options { gap: 15px; }
  .option-list-platforms { display: grid; grid-template-columns: repeat(2, 1fr); }
  .check-option { justify-content: flex-start; }
  .trust-row { align-items: flex-start; flex-direction: column; gap: 9px; padding-left: 10px; }
  .extractor-card { border-radius: 17px; margin-top: 38px; padding: 16px 15px; }
  .extractor-heading, .extractor-bottom { align-items: flex-start; flex-direction: column; }
  .extractor-heading h2 { font-size: 20px; }
  .extractor-bottom { gap: 13px; }
  .extractor-bottom .actions, .extractor-bottom .button { width: 100%; }
  .extractor-bottom .actions .button { justify-content: center; }
  .results-section { margin-top: 58px; }
  h2 { font-size: 24px; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .summary-card { padding: 14px; }
  .summary-value { font-size: 24px; }
  .link-card-header { align-items: flex-start; flex-direction: column; }
  .source-url { max-width: calc(100vw - 74px); }
  .status-pill { align-self: flex-start; }
  .result-controls { align-items: stretch; justify-self: stretch; }
  .result-filters { flex-wrap: wrap; justify-content: center; }
  .result-filter { flex: 1 1 170px; justify-content: center; }
  .result-export { align-items: stretch; flex-direction: column; }
  .result-export-label { text-align: center; }
  .result-export-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .result-export-button { width: 100%; }
  .result-meta { align-items: flex-start; justify-self: start; }
  .result-usage { text-align: left; }
  .page-footer { gap: 7px; margin-top: 52px; }
}
