:root {
  --bg: #f0eee6; /* Anthropic 象牙白 */
  --surface: #fbfaf7; /* 卡片：更浅的暖白 */
  --border: #e3e0d6; /* 暖色细线 */
  --text: #1f1e1d; /* 近黑暖色 */
  --text-dim: #73726c; /* 暖灰 */
  --accent: #d97452; /* 赤陶橙强调 */
  --accent-strong: #c5613f; /* 加深的同色系：图表线、聚焦 */
  --accent-ink: #a8492b; /* 最深同色系：小字 / 链接 */
  --danger: #c2453a;
  --radius: 12px;

  --font-sans: "Inter", system-ui, -apple-system, "PingFang SC",
    "Microsoft YaHei", sans-serif;
  --font-serif: "Source Serif 4", "Noto Serif SC", Georgia, "Songti SC", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text);
  background: radial-gradient(
      1100px 520px at 75% -15%,
      rgba(217, 116, 82, 0.16) 0%,
      transparent 60%
    ),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

.github-link {
  position: fixed;
  top: 16px;
  right: 18px;
  z-index: 10;
  line-height: 0;
  color: var(--text-dim);
  transition: color 0.15s ease, transform 0.15s ease;
}

.github-link:hover {
  color: var(--text);
  transform: scale(1.1);
}

.lang-toggle {
  position: fixed;
  top: 16px;
  left: 18px;
  z-index: 10;
  padding: 6px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.lang-toggle:hover {
  color: var(--text);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.hero {
  text-align: center;
  margin-bottom: 28px;
}

.hero h1 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 2.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.subtitle {
  margin: 0;
  color: var(--text-dim);
  font-size: 1.02rem;
}

.search {
  display: flex;
  gap: 10px;
  max-width: 680px;
  margin: 0 auto 16px;
}

.search input {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search input::placeholder {
  color: var(--text-dim);
}

.search input:focus {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px rgba(217, 116, 82, 0.28);
}

.search button {
  padding: 12px 26px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.05s ease;
}

.search button:hover:not(:disabled) {
  filter: brightness(0.95) saturate(1.1);
}

.search button:active:not(:disabled) {
  transform: translateY(1px);
}

.search button:disabled {
  opacity: 0.55;
  cursor: progress;
}

.status {
  min-height: 1.4em;
  text-align: center;
  margin: 0 0 16px;
  color: var(--text-dim);
}

.status.error {
  color: var(--danger);
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  margin-bottom: 18px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(31, 30, 29, 0.04), 0 10px 30px rgba(31, 30, 29, 0.05);
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  flex-shrink: 0;
  background: var(--bg);
}

.profile-meta {
  flex: 1;
  min-width: 0;
}

.persona {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 10px;
}

.persona:hover {
  color: var(--accent-ink);
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-ink);
}

.chart-wrap {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 16px;
  box-shadow: 0 1px 2px rgba(31, 30, 29, 0.04), 0 10px 30px rgba(31, 30, 29, 0.05);
}

.chart {
  width: 100%;
  height: 460px;
}

.note {
  margin: 8px 4px 0;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.footer {
  text-align: center;
  margin-top: 28px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.hidden {
  display: none !important;
}

@media (max-width: 560px) {
  .search {
    flex-direction: column;
  }
  .chart {
    height: 360px;
  }
  .hero h1 {
    font-size: 1.8rem;
  }
}
