/* HTP Multi-Agent Workflow — standalone styles */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(160deg, #0f172a 0%, #1e3a5f 45%, #0c4a6e 100%);
  min-height: 100vh;
  color: #e2e8f0;
}

.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
}

.site-header {
  text-align: center;
  padding: 1.5rem 0 1rem;
}

.site-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, #bae6fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.site-header .tagline {
  margin: 0;
  font-size: 0.92rem;
  color: rgba(226, 232, 240, 0.82);
  line-height: 1.6;
}

.pipeline-overview {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0 1.25rem;
}

.pipeline-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
}

.pipeline-chip i { opacity: 0.85; }

.disclaimer {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(148, 163, 184, 0.9);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.htp-app-root {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  padding: 0.75rem;
  backdrop-filter: blur(8px);
}

.hub-htp-inline-wrap {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  max-width: 100%;
}

.hub-htp-history-sidebar .hub-htp-history-headline {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hub-htp-pipe-parallel-inner {
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(248, 250, 252, 0.92);
  padding: 0.55rem 0.65rem 0.65rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

@keyframes hub-htp-pipe-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.38); }
  55% { box-shadow: 0 0 0 12px rgba(59, 130, 246, 0); }
}

.hub-htp-pipe-pulse {
  animation: hub-htp-pipe-pulse 1.85s ease-out infinite;
}

.hub-htp-toolbar-row {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.hub-htp-toolbar-label {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.hub-htp-board-frame {
  border-radius: 1.65rem;
  border: 12px solid #0a0a0a;
  background: #0a0a0a;
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hub-htp-board-inner {
  padding: 9px 10px;
  background: linear-gradient(180deg, #ecebe8 0%, #e4e3e0 100%);
  border-radius: 1.05rem;
}

.hub-htp-board-surface {
  position: relative;
  border-radius: 0.95rem;
  overflow: hidden;
  background-color: #f6f5f1;
  background-image: radial-gradient(circle, rgba(45, 55, 72, 0.11) 1px, transparent 1.05px);
  background-size: 16px 16px;
  background-position: 1px 1px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.07);
  min-height: 200px;
}

.hub-htp-board-canvas {
  display: block;
  width: 100%;
  background: transparent;
  vertical-align: top;
}

.hub-htp-board-canvas.hub-htp-canvas-h {
  height: min(58vh, calc(100svh - 18rem));
  min-height: 240px;
}

.apple-btn {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.86);
  color: #334155;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: all 0.2s ease;
  cursor: pointer;
}

.apple-btn:hover {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(15, 23, 42, 0.18);
}

.apple-btn-primary {
  border-color: rgba(14, 165, 233, 0.34);
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  color: #0369a1;
}

.apple-btn-primary:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f0f7ff 100%);
  border-color: rgba(14, 165, 233, 0.45);
}

.apple-btn-strong {
  border-color: rgba(59, 130, 246, 0.36);
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.22);
}

.apple-btn-strong:hover {
  background: linear-gradient(180deg, #4a8eff 0%, #2c6df0 100%);
}

.apple-icon-btn {
  border-radius: 9999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  color: #475569;
  cursor: pointer;
}

.apple-icon-btn:hover {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.18);
}

.hub-htp-result-modal details > summary { list-style: none; }
.hub-htp-result-modal details > summary::-webkit-details-marker { display: none; }

.hub-htp-scrollbar::-webkit-scrollbar { width: 6px; }
.hub-htp-scrollbar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.hub-htp-scrollbar::-webkit-scrollbar-track { background: transparent; }

#hubHtpFullscreenRoot:fullscreen {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  padding: 12px;
  box-sizing: border-box;
  background: #0b0f1a;
}

#hubHtpFullscreenRoot:fullscreen .hub-htp-board-layout {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}

#hubHtpFullscreenRoot:fullscreen .hub-htp-draw-sidebar { align-self: stretch; }

#hubHtpFullscreenRoot:fullscreen .hub-htp-history-sidebar {
  display: flex;
  align-self: stretch;
  max-height: none;
  flex: 0 0 min(260px, 22vw);
  min-height: 0;
}

#hubHtpFullscreenRoot:fullscreen .hub-htp-board-frame {
  max-width: none;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#hubHtpFullscreenRoot:fullscreen .hub-htp-board-inner {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#hubHtpFullscreenRoot:fullscreen .hub-htp-board-surface {
  flex: 1 1 auto;
  min-height: 48vh;
}

#hubHtpFullscreenRoot:fullscreen .hub-htp-canvas.hub-htp-canvas-h {
  height: 100% !important;
  min-height: 48vh;
}

.site-footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.75);
}

.site-footer a {
  color: #7dd3fc;
  text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; }
