/* ============================================================
   MindFlow · GitMind 风格主题（白底 + 蓝绿主色 + 珊瑚橙点缀）
   ============================================================ */
:root {
  --brand: #11b5a4;        /* 主品牌 青绿 */
  --brand-600: #0e9c8f;
  --brand-700: #0b7d73;
  --brand-soft: #e6f7f4;
  --blue: #2f80ed;         /* 辅助蓝 */
  --coral: #ff7a59;        /* 珊瑚橙点缀（领主签名色） */
  --coral-soft: #fff1ec;
  --ink: #1f2a37;
  --ink-2: #4b5563;
  --ink-3: #8a94a6;
  --line: #e8ecf1;
  --bg: #f6f9fb;
  --card: #ffffff;
  --shadow-sm: 0 1px 3px rgba(16,30,54,.06), 0 1px 2px rgba(16,30,54,.04);
  --shadow-md: 0 6px 20px rgba(16,30,54,.08);
  --shadow-lg: 0 16px 48px rgba(16,30,54,.12);
  --radius: 14px;
  --radius-sm: 10px;
  --grad: linear-gradient(135deg, #11b5a4 0%, #2f80ed 100%);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; transition: all .18s ease; white-space: nowrap;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(17,181,164,.28); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(17,181,164,.36); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-700); }
.btn-soft { background: var(--brand-soft); color: var(--brand-700); }
.btn-soft:hover { background: #d6f1ec; }
.btn-danger { background: #fff; color: #e5484d; border-color: #f3c2c4; }
.btn-danger:hover { background: #fdeced; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 14px 28px; background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: .3px; }
.nav .logo .dot { width: 26px; height: 26px; border-radius: 8px; background: var(--grad); box-shadow: 0 4px 10px rgba(17,181,164,.35); }
.nav .logo b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav .spacer { flex: 1; }
.nav a.link { color: var(--ink-2); font-weight: 500; font-size: 15px; }
.nav a.link:hover { color: var(--brand-700); }
.nav .avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--grad);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
}

/* ---------- 容器 ---------- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section.tight { padding: 40px 0; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 72px 0 40px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% 0 auto 0; height: 460px;
  background: radial-gradient(60% 60% at 50% 0, rgba(17,181,164,.16), transparent 70%);
  pointer-events: none;
}
.hero h1 { font-size: 46px; line-height: 1.2; margin: 0 0 16px; font-weight: 800; letter-spacing: -.5px; }
.hero h1 .hl { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 18px; color: var(--ink-2); max-width: 640px; margin: 0 auto 28px; }
.hero .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .sub { margin-top: 14px; font-size: 13px; color: var(--ink-3); }

/* ---------- 标题 ---------- */
.h2 { font-size: 30px; font-weight: 800; text-align: center; margin: 0 0 8px; }
.h2-sub { text-align: center; color: var(--ink-2); margin: 0 0 36px; }

/* ---------- 模板/卡片网格 ---------- */
.grid { display: grid; gap: 20px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 920px) { .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }

.tpl-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm); transition: all .18s ease; cursor: pointer; position: relative; overflow: hidden;
}
.tpl-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #cfe9e4; }
.tpl-card .thumb {
  height: 96px; border-radius: var(--radius-sm); margin-bottom: 14px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eafaf7, #eef4ff); color: var(--brand-700);
}
.tpl-card .thumb svg { width: 54px; height: 54px; }
.tpl-card h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.tpl-card .desc { margin: 0; font-size: 13px; color: var(--ink-3); }
.tpl-card .badge {
  position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 700; color: #fff;
  background: var(--coral); padding: 2px 8px; border-radius: 999px;
}
.tag { display: inline-block; font-size: 12px; color: var(--brand-700); background: var(--brand-soft); padding: 2px 10px; border-radius: 999px; font-weight: 600; }

/* ---------- 特性条 ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 880px){ .features { grid-template-columns: repeat(2,1fr);} }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.feature .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-700); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.feature h4 { margin: 0 0 6px; font-size: 16px; }
.feature p { margin: 0; font-size: 13px; color: var(--ink-3); }

/* ---------- 表单 / 鉴权页 ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(70% 50% at 50% 0, rgba(17,181,164,.12), transparent 70%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 34px; box-shadow: var(--shadow-lg); }
.auth-card .logo { display: flex; align-items: center; gap: 10px; justify-content: center; font-weight: 800; font-size: 22px; margin-bottom: 6px; }
.auth-card .logo .dot { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); }
.auth-card h2 { text-align: center; margin: 6px 0 4px; font-size: 22px; }
.auth-card .lead { text-align: center; color: var(--ink-3); font-size: 14px; margin: 0 0 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 15px; background: #fcfdfe; transition: border-color .15s, box-shadow .15s; color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(17,181,164,.15); background: #fff; }
.auth-card .btn { width: 100%; margin-top: 6px; }
.auth-card .foot { text-align: center; margin-top: 18px; font-size: 14px; color: var(--ink-3); }
.auth-card .foot a { color: var(--brand-700); font-weight: 600; }
.auth-error { color: #e5484d; font-size: 13px; margin: -6px 0 12px; min-height: 16px; }

/* ---------- 仪表盘 ---------- */
.dash-head { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; flex-wrap: wrap; }
.dash-head h1 { font-size: 26px; margin: 0; font-weight: 800; }
.dash-head .spacer { flex: 1; }
.seg { display: inline-flex; background: #eef2f6; border-radius: 999px; padding: 4px; }
.seg button { border: none; background: transparent; padding: 7px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.seg button.active { background: #fff; color: var(--brand-700); box-shadow: var(--shadow-sm); }

.map-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: all .18s ease; display: flex; flex-direction: column; }
.map-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.map-card .preview { height: 130px; background: linear-gradient(135deg, #eafaf7, #eef4ff); display: flex; align-items: center; justify-content: center; color: var(--brand-700); position: relative; }
.map-card .preview svg { width: 60px; height: 60px; opacity: .85; }
.map-card .meta { padding: 14px 16px; }
.map-card .meta h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.map-card .meta .time { font-size: 12px; color: var(--ink-3); }
.map-card .meta .pub { font-size: 11px; color: var(--brand-700); background: var(--brand-soft); padding: 1px 8px; border-radius: 999px; font-weight: 700; }
.map-card .acts { display: flex; gap: 8px; padding: 0 16px 16px; flex-wrap: wrap; }
.map-card .acts .btn { flex: 1; }
.empty { text-align: center; padding: 60px 20px; color: var(--ink-3); }
.empty svg { width: 72px; height: 72px; opacity: .5; margin-bottom: 12px; }

/* ---------- 弹层 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(16,30,54,.42); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: #fff; border-radius: 18px; padding: 26px; width: 100%; max-width: 440px; box-shadow: var(--shadow-lg); }
.modal h3 { margin: 0 0 16px; font-size: 19px; }
.modal .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.modal .type-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.modal .type-grid .opt { border: 1px solid var(--line); border-radius: 12px; padding: 16px 10px; text-align: center; cursor: pointer; transition: all .15s; }
.modal .type-grid .opt:hover { border-color: var(--brand); background: var(--brand-soft); }
.modal .type-grid .opt.sel { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(17,181,164,.18); }
.modal .type-grid .opt .ic { color: var(--brand-700); margin-bottom: 6px; }
.modal .type-grid .opt span { font-size: 13px; font-weight: 600; }

footer.site { border-top: 1px solid var(--line); padding: 28px 0; color: var(--ink-3); font-size: 13px; text-align: center; margin-top: 40px; }
