/* ===== 深空青绿 =====
   与 ai-personal-website 保持矩阵视觉一致：近黑底 + 几何无衬线标题 + 青绿强调色。 */
@font-face {
  font-family: "Space Grotesk";
  src: url("/static/fonts/SpaceGrotesk-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/static/fonts/SpaceGrotesk-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #05050f;
  --bg-card: #0d1420;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e6edf3;
  --text-dim: #8b98a5;
  --teal: #38f9d7;
  --teal-dark: #1fb8a3;
  --teal-soft: rgba(56, 249, 215, 0.08);

  --display: "Space Grotesk", -apple-system, sans-serif;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-lift: 0 12px 30px rgba(56, 249, 215, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dark); text-decoration: underline; }

/* ===== 全页背景：星空（与Hub共用同一套算法） ===== */
.matrix-bg { position: fixed; inset: 0; z-index: 0; width: 100vw; height: 100vh; pointer-events: none; }
.cursor-glow { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 0.3s; }
.cursor-glow.active { opacity: 1; }
.cursor-glow::before {
  content: "";
  position: absolute;
  left: var(--mouse-x, 50vw);
  top: var(--mouse-y, 50vh);
  width: 420px;
  height: 420px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(56, 249, 215, 0.06), transparent 70%);
  border-radius: 50%;
}

header, main, footer { position: relative; z-index: 2; }

/* ===== 顶部导航 ===== */
.site-header {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-brand { font-family: var(--display); font-size: 1.15rem; font-weight: 700; color: var(--text); letter-spacing: 0.03em; }
.site-brand:hover { color: var(--teal); text-decoration: none; }
.site-nav { display: flex; gap: 1.2rem; align-items: center; }
.site-nav a { color: var(--text-dim); font-size: 0.9rem; }
.site-nav a:hover { color: var(--teal); }
.link-btn { background: none; border: none; cursor: pointer; padding: 0; color: var(--text-dim); font-size: 0.9rem; font-family: inherit; }
.link-btn:hover { color: var(--teal); }
.inline-form { display: inline; }

/* ===== 通用板块 ===== */
.section { max-width: 960px; margin: 0 auto; padding: 1.5rem; }
.section h2 { font-family: var(--display); font-size: 1.5rem; letter-spacing: 0.04em; color: var(--teal); margin-bottom: 1.2rem; }
.page-title { font-family: var(--display); font-size: 2rem; color: var(--text); max-width: 960px; margin: 1.5rem auto 0.5rem; padding: 0 1.5rem; }

.breadcrumb { max-width: 960px; margin: 1.5rem auto 0; padding: 0 1.5rem; font-size: 0.85rem; color: var(--text-dim); }
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--teal); text-decoration: none; }
/* 文章详情页正文是720px窄栏(利于阅读)，面包屑要跟着收窄，否则和960px的默认宽度左边缘对不齐 */
.breadcrumb--article { max-width: 720px; }

/* ===== Hero ===== */
.hero-block { max-width: 960px; margin: 3rem auto 2rem; padding: 0 1.5rem; }
.masthead { font-family: var(--display); color: var(--teal); letter-spacing: 0.4em; font-size: 0.95rem; margin-bottom: 1rem; }
.hero-block h1 { font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.5; margin-bottom: 1rem; }
.lede { color: var(--text-dim); margin-bottom: 1.5rem; max-width: 42rem; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--teal); color: var(--bg); box-shadow: 0 4px 12px rgba(56, 249, 215, 0.25); }
.btn-primary:hover { background: var(--teal-dark); color: var(--bg); }
.btn-ghost { border: 1.5px solid var(--text); color: var(--text); background: none; }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

/* ===== 卡片（文章预览 / 定价 / 审核） ===== */
.article-preview-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
a.card:hover { text-decoration: none; color: var(--text); transform: translateY(-4px); border-color: var(--teal); box-shadow: var(--shadow-lift); }
.card-no { font-family: var(--display); font-size: 1.1rem; font-weight: 700; color: var(--teal); }
.card h3 { font-family: var(--display); font-size: 1.05rem; }
.card p { color: var(--text-dim); font-size: 0.88rem; }
.card-tags span {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  background: var(--teal-soft);
  color: var(--teal);
  border-radius: 4px;
  font-size: 0.76rem;
  font-weight: 500;
}

/* ===== 目录列表(替代卡片网格，更适合按序扫读21篇) ===== */
.article-list { display: flex; flex-direction: column; }
.list-row {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1rem 0.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  transition: background 0.15s, padding-left 0.15s;
}
.list-row:hover { text-decoration: none; color: var(--text); background: var(--teal-soft); padding-left: 0.9rem; }
.list-row:last-child { border-bottom: none; }

.list-no { flex-shrink: 0; width: 2rem; font-family: var(--display); font-weight: 700; color: var(--teal); font-size: 1rem; }

.list-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.list-title { font-family: var(--display); font-size: 1rem; color: var(--text); }
.list-row:hover .list-title { color: var(--teal); }
.list-summary { font-size: 0.85rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.list-status {
  flex-shrink: 0;
  font-size: 0.78rem;
  color: var(--text-dim);
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  white-space: nowrap;
}
.list-row:hover .list-status { border-color: var(--teal); color: var(--teal); }

@media (max-width: 700px) {
  .list-row { align-items: flex-start; gap: 0.8rem; }
  .list-summary { white-space: normal; }
  .list-status { display: none; }
}

.pricing-card { max-width: 24rem; margin: 1.5rem; text-align: center; gap: 0.8rem; }
.pricing-tier { color: var(--text-dim); letter-spacing: 0.1em; }
.pricing-amount { font-family: var(--display); font-size: 2.4rem; color: var(--teal); }

/* ===== 文章正文 ===== */
.article-body { max-width: 720px; margin: 1.5rem auto; padding: 0 1.5rem; }
.article-body.is-preview { user-select: text; }
.article-body:not(.is-preview) { user-select: none; }
.article-body pre, .article-body code { user-select: text; background: var(--bg-card); border-radius: 4px; padding: 0.1rem 0.3rem; }
.article-body h1 { font-family: var(--display); font-size: 1.8rem; margin-bottom: 1rem; color: var(--text); }
.article-body h2 { font-family: var(--display); font-size: 1.3rem; margin: 1.5rem 0 0.8rem; color: var(--teal); }
.article-body p { margin-bottom: 1rem; }
.article-body blockquote { border-left: 3px solid var(--teal); padding-left: 1rem; color: var(--text-dim); margin: 1rem 0; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.article-body th, .article-body td { border: 1px solid var(--border); padding: 0.5rem; text-align: left; font-size: 0.92rem; }
.article-body ul, .article-body ol { margin: 0 0 1rem 1.4rem; }
.paywall { margin-top: 1.5rem; padding: 1.5rem; background: var(--teal-soft); border: 1px solid var(--border); border-radius: 10px; text-align: center; }

/* ===== 表单 ===== */
.auth-form, .order-table, .qr-row, .admin-order-card { max-width: 32rem; margin: 1.5rem; }
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-form label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.92rem; color: var(--text-dim); }
.auth-form input, .auth-form select, .auth-form textarea {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--bg-card);
  color: var(--text);
}
.auth-form input:focus, .auth-form select:focus, .auth-form textarea:focus { outline: none; border-color: var(--teal); }
.form-error { color: #ff8a80; margin: 1rem 1.5rem 0; }
.form-hint { margin: 1rem 1.5rem 0; color: var(--text-dim); font-size: 0.9rem; }

.qr-row { display: flex; gap: 2rem; text-align: center; }
.qr { width: 160px; height: 160px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }

.order-table { width: calc(100% - 3rem); border-collapse: collapse; }
.order-table th, .order-table td { border-bottom: 1px solid var(--border); padding: 0.6rem 0.5rem; text-align: left; font-size: 0.9rem; color: var(--text); }
.order-table th { color: var(--text-dim); font-weight: 500; }

.admin-order-card { max-width: 40rem; }
.proof-thumb { max-width: 100%; border-radius: 8px; border: 1px solid var(--border); }
.admin-order-actions { display: flex; gap: 0.75rem; margin-top: 0.5rem; }

/* ===== 页脚 ===== */
.site-footer { max-width: 960px; margin: 3rem auto 1.5rem; padding: 1.5rem; text-align: center; color: var(--text-dim); font-size: 0.85rem; border-top: 1px solid var(--border); }

@media (prefers-reduced-motion: reduce) {
  .masthead, .hero-block h1, .hero-actions { animation: none; }
}

@media (max-width: 700px) {
  .article-preview-list { grid-template-columns: 1fr; }
  .site-header { flex-direction: column; gap: 0.8rem; align-items: flex-start; }
  .qr-row { gap: 1rem; }
}
