/* ═══════════════════════════════════════════════
   static.jaschen.life — 极简排版系统
   ═══════════════════════════════════════════════ */

:root {
  --bg: #fafbfc;
  --surface: #ffffff;
  --border: #e8eaed;
  --text: #1a1a2e;
  --text-secondary: #5f6368;
  --text-tertiary: #9aa0a6;
  --accent: #1a73e8;
  --accent-hover: #1557b0;
  --danger: #ea4335;
  --danger-hover: #c5221f;
  --code-bg: #f1f3f4;
  --code-dark: #1a1a2e;
  --code-dark-text: #e8eaed;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.1);
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
}

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

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Layout ───────────────────────────────── */

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 3rem 1.25rem;
  width: 100%;
  flex: 1;
}

/* ─── Typography ───────────────────────────── */

h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; color: var(--text); }
h2 { font-size: 1.15rem; font-weight: 650; letter-spacing: -.01em; color: var(--text); }
p  { color: var(--text-secondary); margin-bottom: .75rem; }
a  { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-hover); }
code {
  font-family: var(--font-mono);
  font-size: .88em;
  background: var(--code-bg);
  padding: .15em .4em;
  border-radius: 4px;
  color: var(--text);
}
pre code {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--code-dark);
  color: var(--code-dark-text);
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: .85rem;
  line-height: 1.55;
  margin: .75rem 0;
}

/* ─── Card ─────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.card h2 { margin-bottom: .35rem; }
.card p  { margin-bottom: .5rem; }
.card p:last-child { margin-bottom: 0; }

.card-accent {
  border-left: 3px solid var(--accent);
  background: #f8fbff;
}

/* ─── Hero ─────────────────────────────────── */

.hero {
  text-align: center;
  padding: 1.5rem 0 2rem;
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: .35rem;
}

.hero .subtitle {
  font-size: 1.05rem;
  color: var(--text-tertiary);
  font-weight: 400;
}

/* ─── Form ─────────────────────────────────── */

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-size: .88rem;
  font-weight: 550;
  color: var(--text);
  margin-bottom: .4rem;
}

.form-group input {
  width: 100%;
  padding: .65rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .95rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}

.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26,115,232,.15);
}

.form-group input::placeholder { color: var(--text-tertiary); }

.hint { font-size: .82rem; color: var(--text-tertiary); margin-top: .25rem; }

/* ─── Buttons ──────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .65rem 1.4rem;
  font-size: .92rem;
  font-weight: 550;
  font-family: var(--font);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  letter-spacing: .01em;
}

.btn-primary {
  width: 100%;
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 2px 8px rgba(26,115,232,.25);
}

.btn-danger {
  background: #fff;
  color: var(--danger);
  border: 1.5px solid #fce8e6;
}

.btn-danger:hover {
  background: #fce8e6;
  border-color: var(--danger);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: .4rem .85rem;
  font-size: .85rem;
  border: 1px solid transparent;
}

.btn-ghost:hover {
  background: var(--code-bg);
  border-color: var(--border);
  color: var(--text);
}

/* ─── Alert ────────────────────────────────── */

.alert {
  padding: .75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: .88rem;
  line-height: 1.45;
}

.alert-error {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
}

.alert-success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

/* ─── Steps ────────────────────────────────── */

.steps { display: flex; flex-direction: column; gap: .75rem; margin-top: .25rem; }

.step {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: .6rem .75rem;
  border-radius: 8px;
  transition: background .15s;
}

.step:hover { background: var(--code-bg); }

.step-num {
  width: 26px; height: 26px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 650;
  flex-shrink: 0;
}

.step strong { display: block; font-size: .92rem; font-weight: 600; color: var(--text); }
.step p { margin: .15rem 0 0; font-size: .85rem; color: var(--text-tertiary); }
.step code { font-size: .82rem; }

/* ─── API Key Display ──────────────────────── */

.api-key-display {
  text-align: center;
  padding: 1.25rem;
  margin: 1rem 0;
}

.api-key-display code {
  font-size: 1.05rem;
  background: var(--code-bg);
  padding: .55rem 1rem;
  border-radius: 8px;
  color: var(--accent);
  word-break: break-all;
  display: inline-block;
  max-width: 100%;
  font-family: var(--font-mono);
}

.api-key-display .hint { margin-top: .5rem; }

/* ─── Site List ────────────────────────────── */

.site-list { display: flex; flex-direction: column; gap: .6rem; }

.site-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: box-shadow .15s;
}

.site-item:hover { box-shadow: var(--shadow-sm); }

.site-info { flex: 1; min-width: 0; }

.site-title {
  font-weight: 600;
  font-size: .95rem;
  color: var(--text);
  margin-bottom: .2rem;
}

.site-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  font-size: .82rem;
  color: var(--text-tertiary);
}

.site-url {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .8rem;
}

.site-actions {
  display: flex;
  gap: .5rem;
  flex-shrink: 0;
  margin-left: 1rem;
}

/* ─── Header bar (dashboard) ───────────────── */

.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.header-bar h1 { font-size: 1.35rem; }

.header-bar .user-info {
  display: flex; align-items: center; gap: .75rem;
  font-size: .88rem; color: var(--text-secondary);
}

/* ─── Footer ───────────────────────────────── */

footer {
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--text-tertiary);
  font-size: .82rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

footer a { color: var(--text-secondary); }
footer a:hover { color: var(--text); }

/* ─── CLI install card ─────────────────────── */

.card-cli {
  background: #f8fafd;
  border-color: #d2e3fc;
}

.card-cli pre { margin: 0; }

/* ─── Lock/Unlock Icons ────────────────────── */

.lock-icon {
  display: inline-block;
  margin-left: .3rem;
  font-size: .85em;
}

.unlock-icon {
  font-size: 3rem;
  margin-bottom: .5rem;
}

/* ─── Responsive ───────────────────────────── */

@media (max-width: 480px) {
  .container { padding: 1.5rem 1rem; }
  .hero h1 { font-size: 1.6rem; }
  .hero .subtitle { font-size: .95rem; }
  .site-item { flex-direction: column; align-items: flex-start; gap: .75rem; }
  .site-actions { margin-left: 0; }
}
