/* 与 easy 项目 (easy/src/index.css) 完全一致的 HSL 变量 */
:root {
  --background: hsl(40, 20%, 97%);
  --foreground: hsl(30, 10%, 15%);
  --card: hsl(40, 15%, 95%);
  --muted: hsl(35, 10%, 92%);
  --muted-foreground: hsl(30, 8%, 50%);
  --border: hsl(35, 12%, 88%);
  --ring: hsl(30, 10%, 15%);
  --destructive: hsl(0, 72%, 51%);
  --success: hsl(150, 35%, 40%);

  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: 'MiSans', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--foreground);
  text-decoration: underline;
  text-decoration-color: var(--muted-foreground);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: var(--foreground); }

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

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 32px;
}
.brand .dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--foreground);
  color: var(--background);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

h1 { font-size: 28px; font-weight: 600; margin: 0 0 12px; letter-spacing: -0.01em; }
h2 { font-size: 18px; font-weight: 600; margin: 0 0 12px; }
p  { margin: 0 0 12px; }
.muted { color: var(--muted-foreground); font-size: 13px; }

/* —— hero —— */
.hero {
  text-align: center;
  padding: 32px 0 24px;
}
.hero h1 { font-size: 34px; margin-bottom: 16px; }
.hero .lead {
  color: var(--muted-foreground);
  font-size: 15px;
  max-width: 420px;
  margin: 0 auto 24px;
}

/* —— cards —— */
.card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: 0 1px 5px rgba(0,0,0,0.07);
  padding: 28px;
  margin-bottom: 16px;
}
.card.compact { padding: 20px; }
.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

/* —— forms —— */
.field { margin-bottom: 12px; }
.field label {
  display: block;
  font-size: 12px;
  color: var(--muted-foreground);
  margin-bottom: 6px;
  margin-left: 4px;
}
.input {
  width: 100%;
  background: var(--muted);
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 14px;
  color: var(--foreground);
  font-family: inherit;
}
.input::placeholder { color: var(--muted-foreground); }
.input:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--ring);
}

/* —— buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-xl);
  padding: 14px 24px;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
}
.btn-primary {
  background: var(--foreground);
  color: var(--background);
  width: 100%;
}
.btn-primary:hover    { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--foreground);
  padding: 10px 16px;
}
.btn-ghost:hover { background: var(--muted); }

/* —— alerts —— */
.error {
  color: var(--destructive);
  font-size: 12px;
  min-height: 16px;
  margin: 6px 4px 0;
}
.success { color: var(--success); }

/* —— tabs (login/register switch) —— */
.tab-row {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.tab {
  flex: 1;
  padding: 10px 0;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: inherit;
}
.tab.active {
  color: var(--foreground);
  border-bottom-color: var(--foreground);
}

/* —— pill / status —— */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--muted);
  color: var(--muted-foreground);
}
.pill.ok   { background: hsl(150, 45%, 92%); color: hsl(150, 45%, 30%); }
.pill.fail { background: hsl(0, 70%, 95%);   color: var(--destructive); }

/* —— stack —— */
.stack-2 > * + * { margin-top: 8px; }
.stack-3 > * + * { margin-top: 12px; }
.stack-4 > * + * { margin-top: 16px; }
.stack-6 > * + * { margin-top: 24px; }

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

.center { text-align: center; }
.divider { height: 1px; background: var(--border); margin: 20px 0; }

ol.steps { padding-left: 20px; line-height: 1.9; }
ol.steps li::marker { color: var(--muted-foreground); }
code {
  background: var(--muted);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
