@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&display=swap');

.http-post pre,
.http-post code{
  font-family:'JetBrainsMono Nerd Font','JetBrainsMonoNL Nerd Font','FiraCode Nerd Font','Hack Nerd Font','Fira Code','JetBrains Mono','Cascadia Code',Menlo,Consolas,monospace !important;
  font-feature-settings:'liga' 1,'calt' 1,'ss01' 1,'ss02' 1;
  font-variant-ligatures:contextual;
}
.http-post .httpd-code-big{
  font-size:1.05rem !important;
  line-height:1.85 !important;
  padding:1.6rem !important;
  letter-spacing:0.01em;
}
.http-post .httpd-code-big code{
  font-size:inherit !important;
}
.http-post .httpd-card{background:var(--card-bg);border:1px solid var(--card-border);border-radius:12px;padding:1.2rem;}
.http-post .httpd-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:1rem;margin:1.5rem 0;}
.http-post .httpd-stat{background:var(--card-bg);border-radius:12px;padding:1rem;text-align:center;}
.http-post .httpd-stat-num{font-size:1.9rem;font-weight:800;}
.http-post .httpd-stat-label{font-size:0.78rem;color:var(--text-muted);margin-top:4px;}
.http-post h2.httpd-h{font-size:1.6rem;margin-top:2.5rem;border-bottom:2px solid #2563eb;padding-bottom:0.5rem;color:var(--text-main);}
.http-post h2.httpd-h-sec{border-bottom-color:#16a34a;}

/* ── Demo 1: request animator ── */
.httpdemo-1{background:linear-gradient(135deg,rgba(37,99,235,0.08),rgba(22,163,74,0.08));border:2px solid #2563eb;border-radius:14px;padding:1.5rem;margin:1.5rem 0;}
.httpdemo-1 .ctrl{display:flex;flex-wrap:wrap;gap:0.5rem;margin-bottom:1rem;}
.httpdemo-1 .ctrl button{padding:0.5rem 1rem;border:none;border-radius:8px;font-weight:700;font-size:0.9rem;cursor:pointer;transition:transform 0.15s,box-shadow 0.15s;color:#fff;font-family:inherit;}
.httpdemo-1 .ctrl button:hover{transform:translateY(-2px);box-shadow:0 4px 12px rgba(0,0,0,0.2);}
.httpdemo-1 .ctrl button[data-m="GET"]{background:#16a34a;}
.httpdemo-1 .ctrl button[data-m="POST"]{background:#2563eb;}
.httpdemo-1 .ctrl button[data-m="PUT"]{background:#f59e0b;}
.httpdemo-1 .ctrl button[data-m="PATCH"]{background:#9333ea;}
.httpdemo-1 .ctrl button[data-m="DELETE"]{background:#ef4444;}
.httpdemo-1 .ctrl button[data-m="HEAD"]{background:#06b6d4;}
.httpdemo-1 .ctrl button[data-m="OPTIONS"]{background:#64748b;}
.httpdemo-1 .ctrl button.active{outline:3px solid var(--text-main);outline-offset:2px;}
.httpdemo-1 .stage{position:relative;height:220px;background:#0f172a;border-radius:10px;overflow:hidden;margin-bottom:1rem;}
.httpdemo-1 .stage svg{width:100%;height:100%;}
.httpdemo-1 .panels{display:grid;grid-template-columns:1fr 1fr;gap:1rem;}
.httpdemo-1 .panel{background:#0f172a;border-radius:10px;padding:1rem;border:1px solid #1e293b;}
.httpdemo-1 .panel h4{margin:0 0 0.5rem;color:#60a5fa;font-size:0.9rem;font-weight:700;}
.httpdemo-1 .panel.res h4{color:#4ade80;}
.httpdemo-1 .panel pre{margin:0;font-size:0.92rem;line-height:1.6;color:#cbd5e1;white-space:pre-wrap;word-break:break-word;min-height:120px;}
.httpdemo-1 .packet{transition:transform 1.2s cubic-bezier(0.4,0,0.2,1),opacity 0.3s;}
.httpdemo-1 .packet.go{transform:translateX(280px);}
.httpdemo-1 .response-text{opacity:0;transition:opacity 0.4s;}
.httpdemo-1 .response-text.show{opacity:1;}
@media (max-width:640px){.httpdemo-1 .panels{grid-template-columns:1fr;}}

/* ── Demo 2: TLS handshake ── */
.httpdemo-2{background:linear-gradient(135deg,rgba(22,163,74,0.10),rgba(34,197,94,0.06));border:2px solid #16a34a;border-radius:14px;padding:1.5rem;margin:1.5rem 0;}
.httpdemo-2 .ctrl{display:flex;gap:0.5rem;margin-bottom:1rem;align-items:center;flex-wrap:wrap;}
.httpdemo-2 button.replay{padding:0.5rem 1.2rem;background:#16a34a;color:#fff;border:none;border-radius:8px;font-weight:700;cursor:pointer;font-family:inherit;}
.httpdemo-2 button.replay:hover{background:#15803d;}
.httpdemo-2 .step-label{font-size:0.85rem;color:var(--text-muted);}
.httpdemo-2 .stage{background:#0f172a;border-radius:10px;padding:1rem;min-height:380px;position:relative;}
.httpdemo-2 .stage svg{width:100%;height:380px;}
.httpdemo-2 .tls-msg{opacity:0;transition:opacity 0.4s;}
.httpdemo-2 .tls-msg.show{opacity:1;}
.httpdemo-2 .tls-step{stroke-dasharray:600;stroke-dashoffset:600;transition:stroke-dashoffset 0.8s ease-out;}
.httpdemo-2 .tls-step.draw{stroke-dashoffset:0;}

/* ── Demo 3: multiplexing ── */
.httpdemo-3{background:linear-gradient(135deg,rgba(147,51,234,0.10),rgba(37,99,235,0.06));border:2px solid #9333ea;border-radius:14px;padding:1.5rem;margin:1.5rem 0;}
.httpdemo-3 .ctrl{display:flex;gap:0.5rem;margin-bottom:1rem;flex-wrap:wrap;}
.httpdemo-3 button{padding:0.5rem 1.2rem;background:#9333ea;color:#fff;border:none;border-radius:8px;font-weight:700;cursor:pointer;font-family:inherit;}
.httpdemo-3 button:hover{background:#7e22ce;}
.httpdemo-3 .lanes{display:grid;grid-template-columns:1fr;gap:1rem;}
.httpdemo-3 .lane{background:#0f172a;border-radius:10px;padding:1rem;border:1px solid #1e293b;}
.httpdemo-3 .lane h4{margin:0 0 0.5rem;font-size:0.9rem;font-weight:700;}
.httpdemo-3 .lane.h1 h4{color:#ef4444;}
.httpdemo-3 .lane.h2 h4{color:#16a34a;}
.httpdemo-3 .track{position:relative;height:60px;background:#020617;border-radius:6px;overflow:hidden;}
.httpdemo-3 .req-block{position:absolute;height:18px;border-radius:4px;font-size:9px;color:#fff;display:flex;align-items:center;padding:0 6px;font-weight:700;font-family:monospace;}

/* ── Demo 4: status code ── */
.httpdemo-4{background:linear-gradient(135deg,rgba(245,158,11,0.10),rgba(239,68,68,0.06));border:2px solid #f59e0b;border-radius:14px;padding:1.5rem;margin:1.5rem 0;}
.httpdemo-4 .grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:0.5rem;margin-bottom:1rem;}
.httpdemo-4 .code-btn{padding:0.6rem;border:none;border-radius:8px;font-weight:800;font-size:0.95rem;cursor:pointer;color:#fff;font-family:inherit;}
.httpdemo-4 .code-btn.s1{background:#06b6d4;}
.httpdemo-4 .code-btn.s2{background:#16a34a;}
.httpdemo-4 .code-btn.s3{background:#f59e0b;}
.httpdemo-4 .code-btn.s4{background:#ef4444;}
.httpdemo-4 .code-btn.s5{background:#6b21a8;}
.httpdemo-4 .out{background:#0f172a;border-radius:10px;padding:1rem;min-height:80px;color:#cbd5e1;font-size:1rem;line-height:1.65;}
.httpdemo-4 .out strong{color:#f59e0b;}
