/* 独立页面专用样式 - 清爽白色风格 */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  background: #f5f7fa;
  color: #1f2937;
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

/* ===== 终端窗口外框（改为卡片容器） ===== */
.terminal {
  max-width: 1400px;
  margin: 32px auto 50px;
  padding: 0 28px;
}

/* ===== 顶部标题栏 ===== */
.term-bar {
  border: 1px solid #e5e9f0;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  background: #ffffff;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #6b7280;
}
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.r { background: #ff6b6b; }
.dot.y { background: #ffc107; }
.dot.g { background: #28c76f; }
.term-bar .path { margin-left: 12px; color: #374151; font-weight: 500; }
.term-bar .blink { display: none; }
.term-bar .top-home {
  margin-left: auto;
  padding: 7px 14px;
  font-size: 13px;
  border-radius: 7px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}
.term-bar .top-home:hover { background: #2563eb; color: #fff; border-color: #2563eb; }
.term-bar .top-home svg { width: 15px; height: 15px; }

/* ===== 命令横幅（改为标题区） ===== */
.banner {
  border: 1px solid #e5e9f0;
  border-bottom: none;
  padding: 24px 26px 18px;
  background: #ffffff;
  font-size: 14px;
  line-height: 1.9;
}
.banner .prompt { color: #2563eb; font-weight: 600; }
.banner .cmd { color: #374151; }
.banner .comment { color: #9ca3af; }
.banner h1 {
  margin: 12px 0 0;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: .5px;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 12px;
}
.h1-icon { display: inline-flex; width: 34px; height: 34px; color: #2563eb; }
.h1-icon svg { width: 34px; height: 34px; }
.banner p {
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 14px;
  font-weight: 400;
}

/* ===== 统计行 ===== */
.stats {
  border: 1px solid #e5e9f0;
  border-bottom: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  background: #fafbfd;
}
.stat {
  padding: 18px 22px;
  border-right: 1px solid #edf0f5;
  display: flex;
  align-items: center;
  gap: 14px;
}
.stat:last-child { border-right: none; }
.s-ico { width: 42px; height: 42px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.s-ico svg { width: 23px; height: 23px; }
.s-ico.files { background: #eef2ff; color: #6366f1; }
.s-ico.dirs  { background: #fff7ed; color: #f59e0b; }
.s-ico.disk  { background: #ecfdf5; color: #10b981; }
.s-ico.time  { background: #eff6ff; color: #3b82f6; }
.stat .l { font-size: 12px; color: #6b7280; letter-spacing: .5px; }
.stat .v {
  font-size: 26px;
  font-weight: 700;
  color: #2563eb;
  margin-top: 2px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ===== 目录树容器 ===== */
.moyu-tree {
  --mt-border: #e5e9f0;
  --mt-bg: #ffffff;
  --mt-bg-alt: #f9fafb;
  --mt-hover: #eef4ff;
  --mt-text: #1f2937;
  --mt-muted: #6b7280;
  --mt-accent: #2563eb;
  margin: 0;
  border: 1px solid #e5e9f0;
  border-radius: 0 0 12px 12px;
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0,0,0,.04);
  font-family: inherit;
  font-size: 15px;
}
.moyu-tree .mt-head { display: none !important; }
.moyu-tree .mt-toolbar {
  background: #ffffff;
  border-bottom: 1px solid #edf0f5;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.search-ico { width: 20px; height: 20px; color: #9ca3af; flex: none; display: inline-flex; align-items: center; }
.search-ico svg { width: 20px; height: 20px; }
.moyu-tree .mt-search {
  background: #f9fafb;
  border: 1px solid #dfe4ec;
  border-radius: 8px;
  color: #1f2937;
  font-family: inherit;
  font-size: 15px;
  padding: 10px 14px;
  padding-left: 10px;
  min-height: 44px;
  flex: 1;
}
.moyu-tree .mt-search::placeholder { color: #9ca3af; }
.moyu-tree .mt-search:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.1); background: #fff; }
.moyu-tree .mt-refresh {
  background: #2563eb;
  border: 1px solid #2563eb;
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  padding: 10px 18px;
  min-height: 44px;
  cursor: pointer;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.moyu-tree .mt-refresh svg { width: 17px; height: 17px; display: block; }
.moyu-tree .mt-refresh:hover { background: #1d4ed8; }
.moyu-tree .mt-expand-all {
  background: #fff;
  border: 1px solid #dfe4ec;
  border-radius: 8px;
  color: #374151;
  font-family: inherit;
  font-size: 14px;
  padding: 10px 16px;
  min-height: 44px;
  cursor: pointer;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.moyu-tree .mt-expand-all svg { width: 16px; height: 16px; color: #2563eb; display: block; }
.moyu-tree .mt-expand-all:hover { border-color: #2563eb; color: #2563eb; background: #f8fbff; }
.moyu-tree .mt-meta { color: #9ca3af; font-family: inherit; font-size: 13px; flex-basis: 100%; }
.moyu-tree .mt-body { background: #ffffff; padding: 16px 22px; }
.moyu-tree .mt-loading, .moyu-tree .mt-error { color: #6b7280; font-size: 15px; text-align: center; padding: 48px 20px; }
.moyu-tree .mt-error { color: #dc2626; }
.moyu-tree .mt-retry {
  margin-top: 14px; padding: 9px 18px; border: 1px solid #2563eb; border-radius: 8px;
  background: #eff6ff; color: #2563eb; font: inherit; font-size: 14px; cursor: pointer;
}
.moyu-tree .mt-retry:hover { background: #2563eb; color: #fff; }
.moyu-tree .mt-empty {
  text-align: center; padding: 64px 20px; color: #6b7280;
}
.moyu-tree .mt-empty svg { width: 46px; height: 46px; color: #cbd5e1; }
.moyu-tree .mt-empty .t { margin-top: 12px; font-size: 16px; font-weight: 600; color: #374151; }
.moyu-tree .mt-empty .d { margin-top: 6px; font-size: 13px; color: #9ca3af; }
.moyu-tree .mt-ul.mt-sub { border-left: 1px dashed #d8dee9; }
.moyu-tree .mt-row { border-radius: 6px; padding: 6px 10px; }
.moyu-tree .mt-row:hover { background: #eef4ff; }
.moyu-tree .mt-arrow { color: #9ca3af; font-size: 14px; width: 16px; }
.moyu-tree .mt-icon { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; flex: none; }
.moyu-tree .mt-icon svg { display: block; width: 19px; height: 19px; }
.moyu-tree .mt-name { color: #374151; }
.moyu-tree .mt-dir > .mt-row > .mt-name { font-weight: 600; color: #1f2937; }
.moyu-tree .mt-file > .mt-row > .mt-name { color: #4b5563; }
.moyu-tree .mt-stats { color: #9ca3af; font-family: inherit; font-size: 13px; }
.moyu-tree .mt-more { padding: 6px 10px 6px 34px; color: #2563eb; font-size: 13px; }
.moyu-tree .mt-foot {
  background: #fafbfd;
  border-top: 1px solid #edf0f5;
  color: #9ca3af;
  font-family: inherit;
  font-size: 13px;
  border-radius: 0 0 12px 12px;
}

/* ===== 底部状态行 ===== */
.status-line {
  text-align: center;
  padding: 18px;
  font-size: 13px;
  color: #9ca3af;
}
.site-footer {
  margin-top: 8px;
  padding: 20px 24px;
  border-top: 1px solid #e5e9f0;
  background: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 2px 12px rgba(0,0,0,.03);
}
.footer-brand { color: #6b7280; font-size: 14px; text-align: center; }
.footer-brand .sep { color: #cbd5e1; padding: 0 6px; }
.home-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  background: #2563eb;
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.home-link:hover { background: #1d4ed8; }
.home-link svg { width: 16px; height: 16px; }

.status-line .ok { color: #16a34a; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; display: inline-block; box-shadow: 0 0 0 3px rgba(34,197,94,.18); }

@media (max-width: 768px) {
  .terminal { padding: 0 12px; margin: 14px auto 30px; }
  .term-bar { flex-wrap: wrap; padding: 12px 16px; }
  .term-bar .top-home { margin-left: 0; }
  .banner { padding: 16px; }
  .banner h1 { font-size: 22px; }
  .stat { padding: 12px 14px; }
  .stat .v { font-size: 20px; }
  .moyu-tree { font-size: 13px; }
  .moyu-tree .mt-stats { font-size: 11px; }
  .moyu-tree .mt-body { height: 62vh !important; }
  .moyu-tree .mt-toolbar { padding: 10px 12px; gap: 8px; }
  .moyu-tree .mt-expand-all, .moyu-tree .mt-refresh { padding: 8px 10px; min-height: 40px; }
  .site-footer { justify-content: center; text-align: center; }
}
