/*
实现原理：定义详情页真实加载进度和管理员二级调试页的专业阅读样式。
如何使用：index.html 在 viewer.css 后加载，本文件样式由 app_viewer_debug.js 渲染节点使用。
*/

.loading-shell-progress { align-content: center; }

.load-status-card {
  width: min(92vw, 560px);
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(18, 22, 42, 0.86);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.load-stage-badge {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(71, 66, 233, 0.18);
  color: #cfd1ff;
  font-size: 12px;
  font-weight: 800;
}

.load-status-card h3 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
}

.load-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.load-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.load-progress.is-indeterminate span {
  width: 38% !important;
  animation: progressSweep 1.1s ease-in-out infinite;
}

.load-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #a9aec9;
  font-size: 12px;
}

.viewer-error-summary {
  display: grid;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffd2cc;
}

.debug-link-btn {
  justify-self: start;
  min-height: 42px;
}

.viewer-debug-page {
  min-height: 100vh;
  min-height: 100dvh;
}

.debug-content {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 14px;
}

.debug-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.debug-summary div,
.debug-section {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(18, 22, 42, 0.88);
}

.debug-summary div {
  display: grid;
  gap: 6px;
  padding: 12px;
}

.debug-summary span,
.debug-empty,
.debug-timeline em {
  color: #a9aec9;
  font-size: 12px;
}

.debug-summary strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.debug-section {
  margin-bottom: 12px;
  padding: 14px;
}

.debug-section h3,
.debug-network h4 {
  margin: 0 0 10px;
  color: #fff;
}

.debug-json {
  max-height: 360px;
  overflow: auto;
  border-radius: 10px;
  padding: 12px;
  background: #080b16;
  color: #dfe4ff;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.debug-timeline {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.debug-timeline li { line-height: 1.5; }
.debug-timeline span { margin: 0 8px; }

@keyframes progressSweep {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(270%); }
}
