/* ==========================================================================
   时光·课表 站点样式（纯手写、无外部依赖，可直接替换配色）
   主色：--brand / --brand-2；暗色区块：--ink
   ========================================================================== */

:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --ink: #0b1220;
  --ink-soft: #1e293b;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e6e9f0;
  --brand: #2563eb;
  --brand-2: #7c3aed;
  --ok: #10b981;
  --warn: #f59e0b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -12px rgba(15, 23, 42, .12);
  --maxw: 1080px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { line-height: 1.25; letter-spacing: -.01em; margin: 0; }
h1 { font-size: clamp(30px, 4.4vw, 46px); }
h2 { font-size: clamp(22px, 2.6vw, 28px); }
h3 { font-size: 17px; }
p { margin: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; gap: 24px; height: 62px;
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 26px; border-radius: 7px; }
.nav-links { display: flex; gap: 6px; margin-left: auto; }
.nav-links a {
  color: var(--muted); font-size: 14px; padding: 8px 12px; border-radius: 8px;
}
.nav-links a:hover { color: var(--text); background: #eef1f7; text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--text); background: #eef1f7; font-weight: 600; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 11px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; box-shadow: 0 10px 22px -12px rgba(37, 99, 235, .8);
}
.btn-primary:hover { box-shadow: 0 14px 26px -12px rgba(37, 99, 235, .9); }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: #cbd5e1; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 9px; }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: #0b1220;
  border-radius: 0 0 28px 28px;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55;
}
.hero::before { width: 460px; height: 460px; background: #2563eb; top: -180px; right: -100px; }
.hero::after { width: 380px; height: 380px; background: #7c3aed; bottom: -200px; left: -80px; }
.hero-inner {
  position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto;
  padding: 64px 20px 72px;
}
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px; font-size: 13px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16);
  color: #dbeafe;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(16, 185, 129, .18); }
.hero h1 { margin: 20px 0 14px; max-width: 20ch; }
.hero .lead { color: #b9c4d8; font-size: 17px; max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-actions .btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .18); }
.hero-actions .btn-ghost:hover { background: rgba(255, 255, 255, .14); }
.hero-meta { margin-top: 16px; font-size: 13px; color: #93a4bf; font-variant-numeric: tabular-nums; }
.hero-meta code { font-family: var(--mono); color: #c7d2fe; }

/* ---------- 通用区块 ---------- */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.section-head p { color: var(--muted); font-size: 14px; }
.section-head .more { margin-left: auto; font-size: 14px; }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14px; }
.icon {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(124, 58, 237, .12));
  color: var(--brand); margin-bottom: 14px;
}
.icon svg { width: 20px; height: 20px; }

/* ---------- 发布说明 ---------- */
.release {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px;
}
.notes { margin: 14px 0 0; padding-left: 20px; color: var(--ink-soft); font-size: 14.5px; }
.notes li { margin: 6px 0; }
.notes li::marker { color: var(--brand); }
.kv { display: grid; gap: 10px; margin-top: 4px; }
.kv-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.kv-row:last-child { border-bottom: 0; padding-bottom: 0; }
.kv-row span:first-child { color: var(--muted); }
.kv-row span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- 代码块 ---------- */
.grid > *, .release > *, .dl-grid > * { min-width: 0; }

pre {
  margin: 14px 0 0; padding: 16px 18px; overflow: auto; max-width: 100%;
  background: #0b1220; color: #d7e0f0; border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.7;
}
pre .c { color: #7f8ea8; }
pre .s { color: #93c5fd; }
code.inline {
  font-family: var(--mono); font-size: 12.5px; background: #eef1f7;
  padding: 2px 6px; border-radius: 6px; color: #334155;
}

/* ---------- 下载页 ---------- */
.page-head { padding: 44px 0 8px; }
.page-head h1 { font-size: clamp(26px, 3.4vw, 34px); }
.page-head p { color: var(--muted); margin-top: 10px; }

.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.dl-card { position: relative; display: flex; flex-direction: column; }
.dl-card.is-recommended { border-color: rgba(37, 99, 235, .45); box-shadow: 0 0 0 3px rgba(37, 99, 235, .08), var(--shadow); }
.dl-card .tag {
  position: absolute; top: 14px; right: 14px; font-size: 11px; font-weight: 600;
  color: var(--brand); background: #eef4ff; border-radius: 999px; padding: 3px 9px;
}
.dl-os { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.dl-os svg { width: 20px; height: 20px; color: var(--ink-soft); }
.dl-meta { margin: 10px 0 16px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dl-card .btn { margin-top: auto; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
tbody tr:hover { background: #fafbfe; }
td.mono { font-family: var(--mono); font-size: 12px; color: #475569; }
.sha { display: flex; align-items: center; gap: 8px; }
.sha code { font-family: var(--mono); font-size: 11.5px; color: #475569; word-break: break-all; }
.copy {
  border: 1px solid var(--line); background: #fff; border-radius: 7px;
  padding: 3px 8px; font-size: 11.5px; color: var(--muted); cursor: pointer; white-space: nowrap;
}
.copy:hover { color: var(--text); border-color: #cbd5e1; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 4px 18px 10px; }

/* ---------- 时间线 ---------- */
.timeline { position: relative; margin-top: 24px; padding-left: 26px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(#c7d2fe, #ede9fe, transparent);
}
.tl-item { position: relative; padding: 0 0 26px; }
.tl-item::before {
  content: ""; position: absolute; left: -25px; top: 6px; width: 10px; height: 10px;
  border-radius: 50%; background: #fff; border: 2px solid var(--brand);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
}
.tl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tl-head strong { font-size: 16px; }
.tl-date { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.badge-beta { background: #fef3c7; color: #92400e; }
.badge-force { background: #fee2e2; color: #b91c1c; }
.badge-new { background: #dcfce7; color: #166534; }

/* ---------- 页脚 ---------- */
footer {
  margin-top: 48px; padding: 34px 0; border-top: 1px solid var(--line);
  background: #fff; color: var(--muted); font-size: 13.5px;
}
.foot-inner { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.foot-inner .sep { flex: 1; }
.foot-inner .icp { color: inherit; white-space: nowrap; }
.foot-inner .icp:hover { color: var(--text); }

/* ---------- 公告条（下载暂停等） ---------- */
.notice {
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
  border-radius: 12px; padding: 12px 16px; font-size: 14px; line-height: 1.6;
  max-width: var(--maxw); margin: 0 auto 18px;
}
.notice strong { color: #78350f; }

/* ---------- 提示条 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 13.5px; opacity: 0; pointer-events: none; transition: all .22s ease; z-index: 99;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.skeleton { color: var(--muted); }
.err { color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; padding: 12px 14px; font-size: 13.5px; }

/* ---------- 首页 Hero：左文案 + 右课表预览 ---------- */
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 48px; align-items: center;
}
.hero-copy { max-width: 560px; }
.grad {
  background: linear-gradient(100deg, #93c5fd, #c4b5fd 60%, #f0abfc);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.preview { position: relative; perspective: 900px; }
.preview-card {
  background: #fff; color: var(--text); border-radius: 18px; padding: 18px;
  box-shadow: 0 30px 60px -24px rgba(2, 6, 23, .65), 0 0 0 1px rgba(255, 255, 255, .1);
  transform: rotate(-1.5deg);
}
.preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.preview-head strong { font-size: 15px; }
.preview-sub { display: block; color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.preview-badge {
  font-size: 11px; font-weight: 600; color: #166534; background: #dcfce7;
  border-radius: 999px; padding: 3px 9px; white-space: nowrap;
}
.tt { display: grid; gap: 5px; font-size: 11px; }
.tt-row { display: grid; grid-template-columns: 20px repeat(5, 1fr); gap: 5px; align-items: stretch; }
.tt-row span { color: var(--muted); font-size: 10.5px; display: grid; place-items: center; }
.tt-row.tt-head span { padding-bottom: 2px; }
.tt-t { font-variant-numeric: tabular-nums; }
.tt-row b {
  font-weight: 600; text-align: center; padding: 7px 2px; border-radius: 6px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.tt-last b { opacity: .85; }
.c1 { background: #dbeafe; color: #1e40af; }
.c2 { background: #ede9fe; color: #5b21b6; }
.c3 { background: #dcfce7; color: #166534; }
.c4 { background: #fef3c7; color: #92400e; }
.c5 { background: #fee2e2; color: #991b1b; }
.c6 { background: #e2e8f0; color: #334155; font-weight: 500 !important; }
.preview-foot {
  display: flex; justify-content: space-between; gap: 12px; margin-top: 14px;
  padding-top: 12px; border-top: 1px dashed var(--line);
  color: var(--muted); font-size: 11.5px;
}
.preview-foot .dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; vertical-align: 1px; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(16, 185, 129, .16); }

/* ---------- 三列网格 / 步骤 ---------- */
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.section-band { background: linear-gradient(180deg, #eef2ff, rgba(238, 242, 255, 0)); }
.step { position: relative; padding-top: 26px; }
.step-num {
  position: absolute; top: 18px; right: 22px;
  font-size: 30px; font-weight: 800; letter-spacing: -.04em;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: .35;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .release { grid-template-columns: 1fr; }
  .dl-grid { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .preview { max-width: 460px; }
}
@media (max-width: 640px) {
  .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .nav-inner { gap: 12px; height: 56px; }
  .nav-links a { padding: 7px 9px; font-size: 13px; }
  .hero-inner { padding: 44px 20px 52px; }
  .section { padding: 40px 0; }
  .nav-links .hide-sm { display: none; }
  .preview { display: none; }
}
