:root {
  --bg: #fafafa;
  --card: #ffffff;
  --text: #0a0a0a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #000000;
  --code-bg: #0a0a0a;
  --code-text: #e5e7eb;
}

body.dark {
  --bg: #000000;
  --card: #000000;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: rgba(255,255,255,0.12);
  --accent: #ffffff;
  --code-bg: #000000;
  --code-text: #e5e7eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont,
               "Inter", "Segoe UI",
               "PingFang SC", "Microsoft YaHei",
               sans-serif;
}

/* 页面整体 */
.app {
  max-width: 760px;
  margin: 0 auto;
  padding: 4rem 1.2rem 2rem;
}

/* 头部 */
.header h1 {
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0;
}

.subtitle {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* 卡片（几乎不可见） */
.card {
  margin-top: 2.5rem;
}

/* 标签 */
.label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* 输入 */
.input, .select {
  width: 100%;
  padding: 0.65rem 0;
  margin-top: 0.5rem;
  margin-bottom: 1.4rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 1rem;
}

.input:focus, .select:focus {
  outline: none;
  border-color: var(--accent);
}

/* 工具栏 */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.6rem;
}

/* 镜像 */
.sources {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1.6rem;
}

.sources label {
  font-size: 0.9rem;
  padding: 0.4rem 0.2rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

/* 按钮 */
.actions {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1.6rem;
}

button {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
}

button.primary {
  border-color: var(--accent);
}

button:hover {
  background: rgba(0,0,0,0.04);
}

body.dark button:hover {
  background: rgba(255,255,255,0.06);
}

/* 输出 */
.output {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 1.1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  overflow-x: auto;
}

/* 提示 */
.hint {
  margin-top: 0.6rem;
  font-size: 0.75rem;
  color: var(--muted);
}

/* footer */
.footer {
  margin-top: 4rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}

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

.footer a:hover {
  text-decoration: underline;
}