/* ===== 更新日志页（update.html）样式：复用下载站设计令牌 ===== */
:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-soft: #dbeafe;
  --color-text: #1f2937;
  --color-text-muted: #6b7280;
  --color-bg: #f4f7fb;
  --color-card: #ffffff;
  --color-border: #e5e7eb;
  --color-success: #16a34a;
  --color-success-soft: #dcfce7;
  --color-warn: #d97706;
  --color-warn-soft: #fef3c7;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(37, 99, 235, 0.08);
  --shadow-hover: 0 14px 38px rgba(37, 99, 235, 0.16);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--color-text);
  background: linear-gradient(180deg, #eef3fb 0%, var(--color-bg) 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ===== 顶部品牌栏 + 导航 ===== */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-logo { display: block; border-radius: 8px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }

.brand-name { font-size: 18px; font-weight: 700; color: var(--color-text); }

.brand-sub {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--color-text-muted);
  text-transform: lowercase;
}

.site-nav { display: flex; gap: 8px; }

.site-nav a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 7px 14px;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease;
}

.site-nav a:hover { background: var(--color-primary-soft); color: var(--color-primary); }

.site-nav a.active { background: var(--color-primary); color: #fff; }

/* ===== 主体容器 ===== */
.container {
  flex: 1;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 36px 20px 56px;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 6px;
  text-align: center;
}

.page-desc {
  margin: 0 0 28px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 15px;
}

.state { animation: fade-in 0.35s ease both; }
.hidden { display: none !important; }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin-bottom: 22px;
}

.card h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card h2 .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-primary);
}

/* ===== 通用按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.05s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); box-shadow: var(--shadow-hover); }

.btn-ghost {
  background: #fff;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}
.btn-ghost:hover { background: var(--color-primary-soft); }

.btn-disabled {
  background: #eef2f7;
  color: #9aa3af;
  cursor: not-allowed;
}

/* ===== 功能说明 ===== */
.note-list { margin: 0; padding-left: 18px; color: var(--color-text-muted); font-size: 14px; line-height: 1.8; }
.note-list li { margin-bottom: 4px; }

/* ===== 最新更新包卡片 ===== */
.updater-card {
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--color-card);
  padding: 22px 24px;
  margin-bottom: 22px;
}

.updater-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.updater-title { font-size: 20px; font-weight: 700; margin: 0; }

.updater-version {
  font-size: 13px; font-weight: 600; color: var(--color-primary);
  background: var(--color-primary-soft); padding: 2px 10px; border-radius: 999px;
}

.updater-notes { color: var(--color-text); font-size: 15px; line-height: 1.7; margin: 0 0 16px; }

.updater-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--color-text-muted); margin-bottom: 16px; }

.updater-meta .sha { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.updater-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ===== 变更文件列表 ===== */
.changes {
  margin: 16px 0 4px;
  border-top: 1px dashed var(--color-border);
  padding-top: 14px;
}

.changes h3 { font-size: 14px; font-weight: 700; margin: 0 0 10px; color: var(--color-text); }

.change-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; padding: 4px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.change-tag {
  flex: 0 0 auto;
  font-size: 11px; font-weight: 700;
  padding: 1px 8px; border-radius: 6px; min-width: 48px; text-align: center;
}
.change-add { background: var(--color-success-soft); color: var(--color-success); }
.change-modify { background: var(--color-primary-soft); color: var(--color-primary); }
.change-delete { background: var(--color-warn-soft); color: var(--color-warn); }

.change-path { color: var(--color-text); word-break: break-all; }

/* ===== 版本历史表 ===== */
.history-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.history-table th, .history-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--color-border); }
.history-table th { color: var(--color-text-muted); font-weight: 600; font-size: 13px; }
.history-table td.version-cell { font-weight: 700; }
.history-table tr:last-child td { border-bottom: none; }

.history-date { color: var(--color-text-muted); font-size: 13px; }
.history-notes { color: var(--color-text); max-width: 320px; }

.dl-link { font-size: 13px; font-weight: 600; text-decoration: none; color: var(--color-primary); }
.dl-link:hover { text-decoration: underline; }
.dl-link.disabled { color: #9aa3af; cursor: not-allowed; text-decoration: none; }

/* ===== 在线更新步骤 ===== */
.steps { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; counter-reset: step; list-style: none; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.step-num {
  flex: 0 0 auto;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--color-primary-soft); color: var(--color-primary);
  font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.step-text { font-size: 14px; line-height: 1.7; color: var(--color-text); }

/* ===== 加载 / 空态 ===== */
.loading-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 48px 0; color: var(--color-text-muted); }
.spinner { width: 36px; height: 36px; border: 3px solid var(--color-primary-soft); border-top-color: var(--color-primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty-card { text-align: center; padding: 40px 28px; }
.empty-card h2 { justify-content: center; }
.empty-card p { color: var(--color-text-muted); font-size: 15px; line-height: 1.7; margin: 0 0 20px; }

/* ===== 页脚 ===== */
.site-footer {
  text-align: center;
  padding: 20px;
  font-size: 13px;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.6);
}

/* ===== 响应式 ===== */
@media (max-width: 560px) {
  .page-title { font-size: 24px; }
  .history-table thead { display: none; }
  .history-table, .history-table tbody, .history-table tr, .history-table td { display: block; width: 100%; }
  .history-table tr { margin-bottom: 12px; border: 1px solid var(--color-border); border-radius: 12px; padding: 6px 10px; }
  .history-table td { border: none; padding: 6px 4px; }
  .site-nav { width: 100%; justify-content: center; }
}
