:root{--bg:#f8fafc;--surface:#ffffff;--card:#ffffff;--text:#0f172a;--muted:#6b7280;--primary:#2563eb;--primary-600:#1d4ed8;--success:#16a34a;--error:#dc2626}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:linear-gradient(180deg,#f8fafc 0%,#f3f4f6 100%);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Ubuntu,"Helvetica Neue",Arial,"Noto Sans",sans-serif}
.app{display:grid;grid-template-columns:280px 1fr;gap:0;min-height:100vh}
.sidebar{background:var(--surface);border-right:1px solid #e5e7eb;display:flex;flex-direction:column}
.brand{padding:16px 20px;font-weight:600;letter-spacing:.2px;border-bottom:1px solid #e5e7eb;color:#0f172a}
.api-list{list-style:none;margin:0;padding:8px}
.api-item{display:flex;align-items:center;gap:10px;padding:12px;border-radius:10px;color:var(--text);cursor:pointer;user-select:none}
.api-item:hover{background:#f9fafb}
.api-item.active{background:#eef2ff;border:1px solid #c7d2fe}
.content{padding:24px}
.home{background:var(--card);border:1px solid #e5e7eb;border-radius:12px;padding:16px;margin-bottom:16px}
.home-content{display:flex;flex-direction:column;gap:8px;color:#374151}
.step{background:#ffffff;border:1px solid #e5e7eb;border-radius:10px;padding:10px}
.page-title{font-weight:700;font-size:18px;color:#0f172a;margin-bottom:8px}
.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
.url-wrap{display:flex;align-items:center;gap:12px;background:var(--card);border:1px solid #e5e7eb;border-radius:12px;padding:12px 16px;max-width:100%;overflow:auto}
.label{color:var(--muted);font-size:12px}
.url{font-family:ui-monospace,Menlo,Consolas,Monaco,monospace;color:#374151}
.status-wrap{display:flex;align-items:center;gap:8px}
.badge{display:inline-flex;align-items:center;height:28px;padding:0 10px;border-radius:999px;background:#f3f4f6;color:#0f172a;border:1px solid #e5e7eb;font-size:12px}
.badge.loading{background:#e5e7eb;color:#0f172a}
.badge.success{background:#ecfdf5;color:#065f46;border-color:#86efac}
.badge.error{background:#fee2e2;color:#7f1d1d;border-color:#fecaca}
.section-title{font-weight:600;margin:16px 0 10px 0}
.params-form{display:grid;grid-template-columns:repeat(2,minmax(200px,1fr));gap:12px;background:var(--card);border:1px solid #e5e7eb;border-radius:12px;padding:16px}
.field{display:flex;flex-direction:column;gap:8px}
.field label{font-size:13px;color:var(--muted)}
.input{height:40px;border-radius:10px;border:1px solid #e5e7eb;background:#ffffff;color:#0f172a;padding:0 12px;outline:none}
.input::placeholder{color:#9ca3af}
.btn{display:inline-flex;align-items:center;gap:10px;height:44px;padding:0 16px;border:none;border-radius:12px;background:#f3f4f6;color:#0f172a;cursor:pointer;margin-top:14px}
.btn.primary{background:var(--primary)}
.btn.primary:hover{background:var(--primary-600)}
.btn.secondary{background:#e5e7eb}
.btn.secondary:hover{background:#d1d5db}
.actions{display:flex;gap:10px;margin-top:14px}
.spinner{width:16px;height:16px;border:2px solid rgba(0,0,0,.15);border-top-color:#111;border-radius:50%;display:none;animation:spin .8s linear infinite}
.btn.loading .spinner{display:inline-block}
.btn.loading #send-text{opacity:.7}
@keyframes spin{to{transform:rotate(360deg)}}
.response-meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.chip{display:inline-flex;align-items:center;height:28px;padding:0 10px;border-radius:999px;background:#f3f4f6;color:#0f172a;border:1px solid #e5e7eb;font-size:12px}
.response-body{background:#ffffff;border:1px solid #e5e7eb;border-radius:12px;padding:16px;min-height:160px;max-height:400px;overflow:auto;color:#0f172a;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-all}
.parsed-results{display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));gap:12px;margin-top:8px}
.parsed-item{background:#ffffff;border:1px solid #e5e7eb;border-radius:12px;padding:12px;color:#0f172a;white-space:normal;overflow-wrap:anywhere;word-break:break-all}
@media(max-width:960px){.parsed-results{grid-template-columns:1fr}}
@media(max-width:960px){.app{grid-template-columns:1fr}.sidebar{position:sticky;top:0;z-index:10}.api-list{display:flex;overflow:auto;gap:8px;padding:12px}.api-item{padding:10px 12px}.content{padding:16px}.params-form{grid-template-columns:1fr}}