/* ===== css/style.css ===== */
/* ==========================================================================
   下载中心 · 门户首页样式
   流行浅色系 / 柔和白底 · 靛蓝紫渐变 · Slate 中性 / 玻璃拟态 / 响应式
   ========================================================================== */

:root {
  --bg: #F7F8FC;
  --bg-subtle: #EEF1F8;
  --surface: #FFFFFF;
  --surface-soft: #F4F6FB;
  --text: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border: #E6EAF3;
  --border-strong: #CBD5E1;
  --accent: #6366F1;
  --accent-hover: #4F46E5;
  --accent-soft: rgba(99,102,241,.10);
  --accent-text: #4F46E5;
  --gradient: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  --shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 2px 8px rgba(15,23,42,.05);
  --shadow-md: 0 4px 14px rgba(15,23,42,.06), 0 12px 32px rgba(15,23,42,.07);
  --shadow-lg: 0 20px 44px rgba(15,23,42,.10), 0 8px 20px rgba(15,23,42,.06);
  --radius-md: 12px;
  --radius-lg: 20px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}
[data-theme="dark"] {
  --bg: #0F172A;
  --bg-subtle: #1A2540;
  --surface: #1E293B;
  --surface-soft: #172033;
  --text: #F1F5F9;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  --border: #2C3B57;
  --border-strong: #405270;
  --accent: #818CF8;
  --accent-hover: #A5B4FC;
  --accent-soft: rgba(129,140,248,.16);
  --accent-text: #A5B4FC;
  --gradient: linear-gradient(135deg, #6366F1 0%, #A855F7 100%);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.2);
  --shadow-md: 0 4px 14px rgba(0,0,0,.28), 0 12px 32px rgba(0,0,0,.24);
  --shadow-lg: 0 20px 44px rgba(0,0,0,.4), 0 8px 20px rgba(0,0,0,.3);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s ease, color .3s ease;
}
h1,h2,h3,p { margin: 0; }
a { color: inherit; text-decoration: none; }
svg { display: block; width: 100%; height: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.container { width: min(1120px, 100% - 48px); margin-inline: auto; }

/* 系统状态条 */
.sys-status { position: relative; border-bottom: 1px solid var(--border); background: var(--surface-soft); }
.sys-status-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 34px; }
.sys-status-left, .sys-status-right { display: flex; align-items: center; gap: 12px; }
.sys-pulse { position: relative; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; flex: none; }
.sys-pulse::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 1px solid #22c55e; animation: sysPing 2s ease-out infinite; }
@keyframes sysPing { 0% { transform: scale(.7); opacity: .9; } 80%, 100% { transform: scale(1.9); opacity: 0; } }
.sys-label, .sys-metric, .sys-live {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px; font-weight: 600; letter-spacing: .08em; color: var(--text-secondary);
}
.sys-label { color: #16a34a; }
.sys-divider { width: 1px; height: 13px; background: var(--border-strong); }
.sys-desc { color: var(--text-muted); font-size: 11.5px; }
.sys-metric b { color: var(--accent-text); font-weight: 700; font-variant-numeric: tabular-nums; }
.sys-live { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-text); }
.sys-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
@media (max-width: 640px) { .sys-desc, .sys-divider { display: none; } .sys-status-right { gap: 9px; } }
@media (prefers-reduced-motion: reduce) { .sys-pulse::after { animation: none; } }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 76px 0 44px; text-align: center; }
.hero-grid { position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(99,102,241,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(99,102,241,.06) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%); mask-image: linear-gradient(to bottom, #000, transparent 85%); }
.hero-orb { position: absolute; border-radius: 50%; opacity: .12; pointer-events: none; }
.hero-orb-1 { width: 340px; height: 340px; top: -170px; left: 8%; background: rgba(129,140,248,.28); }
.hero-orb-2 { width: 300px; height: 300px; top: -120px; right: 8%; background: rgba(192,132,252,.22); }
.hero-inner { position: relative; z-index: 1; }
.hero-badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface); color: var(--accent-text); font-size: 12.5px; font-weight: 600; box-shadow: var(--shadow-sm); }
.hero-badge svg { width: 14px; height: 14px; }

/* 科技感时钟样式见 shared/css/clock.css（三站统一） */

.hero h1 { margin: 22px 0 16px; font-size: clamp(34px, 5.4vw, 54px); font-weight: 800; line-height: 1.18; letter-spacing: -.035em; }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 字符画豹头（替换原文字标题）：灰色渐变文字，等宽显示，居中 */
.hero-leopard { margin: 14px 0 6px !important; }
.leopard-art {
  margin: 0 auto;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace);
  font-size: clamp(7px, 1.15vw, 12px);
  line-height: 1.06;
  letter-spacing: 0;
  font-weight: 700;
  white-space: pre;
  background: linear-gradient(160deg, #111111 0%, #2b2b2b 28%, #4d4d4d 50%, #8a8a8a 68%, #000000 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  text-align: left;
}
[data-theme="dark"] .leopard-art {
  background: linear-gradient(160deg, #6b6b6b 0%, #a8a8a8 30%, #e8e8e8 52%, #a8a8a8 72%, #4a4a4a 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* 站点纯文字列表（带框线 / 无卡片 / 无图片 / 无动画，轻量优先） */
.sites { padding: 22px 0 56px; }
.sites-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.sites-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.sites-head p { color: var(--text-muted); font-size: 13px; }
.site-list { display: flex; flex-direction: column; gap: 4px; }
.site-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 12px; border: 1px solid var(--border); border-radius: 6px;
  background: transparent; line-height: 1.5;
}
.site-row:hover { border-color: var(--border-strong); background: var(--bg-subtle); }
.row-index {
  flex: none; width: 42px; color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; text-align: right; font-variant-numeric: tabular-nums;
}
.row-main { flex: 1; min-width: 0; }
.row-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.row-name { font-size: 15px; font-weight: 700; }
.row-name a:hover { color: var(--accent-text); }
.row-version { color: var(--text-muted); font-size: 11.5px; }
.row-meta { margin-top: 3px; color: var(--text-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { flex: none; }
.row-enter {
  padding: 5px 10px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg-subtle); color: var(--text); font-size: 12px; font-weight: 600; white-space: nowrap;
}
.row-enter:hover { border-color: var(--accent); color: var(--accent-text); }

/* 说明条 */

/* 页脚 */

@media (max-width: 640px) {
  .container { width: min(100% - 32px, 1120px); }
  .hero { padding: 56px 0 32px; }
  .sites-head { flex-direction: column; gap: 4px; }
  .site-row { gap: 8px; padding: 12px 8px; }
  .row-index { width: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ===== shared/css/sites.css ===== */
/* ==========================================================================
   统一站点栏
   注入到门户与两个子站顶部，提供跨站点切换
   ========================================================================== */

:root {
  --hub-accent: #6366f1;
  --hub-accent-2: #8b5cf6;
  --hub-bar-h: 46px;
}

.hub-bar {
  position: sticky; top: 0; z-index: 100;
  height: var(--hub-bar-h);
  background: rgba(255,255,255,.86);
  -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid #e6eaf3;
  color: #0f172a;
}
[data-theme="dark"] .hub-bar { background: rgba(15,23,42,.88); border-bottom-color: #2c3b57; color: #f1f5f9; }

.hub-bar-inner {
  width: min(1180px, 100% - 48px); height: 100%; margin-inline: auto;
  display: flex; align-items: center; justify-content: flex-end; gap: 16px;
}

.hub-nav { display: flex; align-items: center; gap: 4px; }
.hub-nav a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 9px; font-size: 12.5px; font-weight: 600;
  color: #64748b; transition: color .2s ease, background .2s ease; white-space: nowrap;
}
.hub-nav a:hover { color: var(--hub-accent); background: rgba(99,102,241,.09); }
.hub-nav a svg { width: 14px; height: 14px; }
.hub-nav a[aria-current="page"] { color: var(--hub-accent); background: rgba(99,102,241,.12); }
[data-theme="dark"] .hub-nav a { color: #94a3b8; }
[data-theme="dark"] .hub-nav a[aria-current="page"] { color: #a5b4fc; background: rgba(129,140,248,.16); }
[data-theme="dark"] .hub-nav a:hover { color: #a5b4fc; background: rgba(129,140,248,.12); }

/* 门户站点栏右侧主题按钮 */
.hub-theme-btn {
  display: grid; place-items: center; width: 32px; height: 32px; padding: 7px;
  border: 1px solid #e6eaf3; border-radius: 9px; background: #fff; color: #64748b;
  transition: all .2s ease;
}
.hub-theme-btn:hover { border-color: var(--hub-accent); color: var(--hub-accent); }
.hub-theme-btn svg { width: 100%; height: 100%; }
[data-theme="dark"] .hub-theme-btn { background: #1e293b; border-color: #2c3b57; color: #94a3b8; }
[data-theme="dark"] .hub-theme-btn .icon-sun { display: block; }
[data-theme="dark"] .hub-theme-btn .icon-moon { display: none; }
.hub-theme-btn .icon-sun { display: none; }

/* 子站已黏顶的 header 下移到站点栏之下；锚点滚动留出空间 */
body[data-site="software"] .site-header,
body[data-site="windows"] .site-header { top: var(--hub-bar-h); }
body[data-site="software"] html,
body[data-site="windows"] html { scroll-padding-top: calc(var(--hub-bar-h) + 88px); }

@media (max-width: 640px) {
  .hub-bar-inner { width: min(100% - 28px, 1180px); }
  .hub-nav a { padding: 7px 9px; font-size: 12px; }
  .hub-nav a .hub-label-en { display: none; }
}

/* ===== shared/css/clock.css ===== */
/* ==========================================================================
   顶部站点栏时钟 —— 三站统一，注入在 hub-nav 最右侧
   深浅主题自动适配；窄屏逐步精简，只保留时间
   ========================================================================== */

.hub-clock {
  display: inline-flex; align-items: center; gap: 7px;
  margin-left: 6px; padding-left: 12px;
  border-left: 1px solid var(--border-strong);
  color: var(--text-secondary);
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 11.5px; white-space: nowrap;
}
.clock-live {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  color: var(--accent-text, var(--primary-text, #4F46E5));
}
.clock-dot { position: relative; width: 6px; height: 6px; border-radius: 50%; background: #22c55e; }
.clock-dot::after {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  border: 1px solid #22c55e; animation: clockPulse 2s ease-out infinite;
}
@keyframes clockPulse { 0% { transform: scale(.7); opacity: .9; } 80%, 100% { transform: scale(1.8); opacity: 0; } }
.clock-icon { width: 13px; height: 13px; color: var(--accent, var(--primary, #6366F1)); flex: none; }
.hub-clock time { font-variant-numeric: tabular-nums; }
#clockTime {
  color: var(--accent-text, var(--primary-text, #4F46E5));
  font-weight: 700; letter-spacing: .03em;
}
@media (max-width: 900px) { .hub-clock .clock-live, .hub-clock .clock-icon { display: none; } }
@media (max-width: 640px) { .hub-clock #clockDate { display: none; } }
@media (prefers-reduced-motion: reduce) { .clock-dot::after { animation: none; } }

/* ===== shared/css/visitor-counter.css ===== */
/* 共享组件：站点访问统计 / VISITOR COUNTER
 * 三站共用（门户 / 软件站 / Windows 镜像站）
 * 设计：低调的一行小字信息条，所有内容排在同一行；无渐变线、无光晕、无动画、无高斯模糊。
 * --font-mono 缺失时回退到系统等宽字体。
 */
.visit-counter { padding: 4px 0 44px; }

.counter-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
}

.counter-head { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.counter-status {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Consolas, monospace);
  font-size: 10px; font-weight: 500; letter-spacing: .04em; color: var(--text-muted);
  white-space: nowrap;
}
.counter-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--text-muted); opacity: .8; flex: none; }
.counter-label {
  font-size: 10px; font-weight: 500; letter-spacing: .02em; color: var(--text-muted);
  white-space: nowrap;
}

.counter-main { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; white-space: nowrap; }
.counter-primary { display: inline-flex; align-items: baseline; gap: 6px; }
.counter-caption { font-size: 10px; color: var(--text-muted); letter-spacing: .02em; }
.counter-number-wrap { display: inline-flex; align-items: baseline; gap: 3px; }
.counter-number {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Consolas, monospace);
  font-size: 12px; font-weight: 600; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--text-muted);
}
.counter-unit { font-size: 10px; color: var(--text-muted); }

@media (max-width: 640px) {
  .visit-counter { padding: 4px 0 32px; }
  .counter-panel { padding: 9px 12px; gap: 8px; }
  .counter-head { gap: 7px; }
  .counter-status { display: none; }
}
