:root {
  color-scheme: light dark;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --color-pure-white: 100 0 0;
  --color-pure-black: 0 0 0;
  --color-primary-main: 0 0 0;
  --color-primary-surface: 99 0 0;
  --color-primary-border: 100 0 0;
  --color-primary-highlight: 100 0 0;
  --color-primary-table-main: 0 0 0;
  --color-primary-table-surface: 98 0 0;
  --color-primary-table-hover: 96 0 0;
  --color-primary-table-border: 92 0 0;
  --color-code-surface: 97 0 0;
  --color-code-string: 48 54 147;
  --color-code-number: 49 69 58;
  --color-code-boolean: 42 86 326;
  --color-code-null: 42 86 326;
  --color-code-key: 36 84 290;
  --color-code-default: 40 0 0;
  --color-sidebar-main: 0 0 0;
  --color-sidebar-surface: 100 0 0;
  --color-sidebar-border: 92 0 0;
  --color-dock-surface: 100 0 0;
  --color-dock-border: 100 0 0;
  --color-success-surface: 72 72 142;
  --color-http-100: 63 57 268;
  --color-http-200: 80 52 158;
  --color-http-300: 86 80 94;
  --color-http-400: 70 46 7;
  --color-http-500: 73 52 308;
  --style-shadow: 0px 16px 24px rgba(0, 0, 0, 0.04);
  --style-bgColor: radial-gradient(53.6% 71.64% at 50% 50%, lch(94 0 0) 0%, lch(88 0 0) 70.56%, lch(83 0 0) 100%);
  --style-shapeBottomGradient: linear-gradient(to right, rgb(141, 240, 204) 50%, rgba(70, 98, 241, 0.5) 50%);
  --style-shapeMiddleGradient: linear-gradient(to right, rgb(240, 141, 165) 50%, rgb(241, 224, 70, 0.8) 50%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-primary-main: 100 0 0;
    --color-primary-surface: 8 0 0;
    --color-primary-border: 50 0 0;
    --color-primary-highlight: 20 0 0;
    --color-primary-table-main: 100 0 0;
    --color-primary-table-surface: 10 0 0;
    --color-primary-table-hover: 12 0 0;
    --color-primary-table-border: 16 0 0;
    --color-code-surface: 7 0 0;
    --color-code-string: 91 75 135;
    --color-code-number: 88 72 87;
    --color-code-boolean: 74 67 325;
    --color-code-null: 74 67 325;
    --color-code-key: 80 34 248;
    --color-code-default: 60 0 0;
    --color-sidebar-main: 100 0 0;
    --color-sidebar-surface: 14 0 0;
    --color-sidebar-border: 18 0 0;
    --color-dock-surface: 55 0 0;
    --color-dock-border: 47 0 0;
    --color-http-100: 48 71 279;
    --color-http-200: 64 61 151;
    --color-http-300: 75 76 93;
    --color-http-400: 49 54 12;
    --color-http-500: 57 55 308;
    --style-bgColor: radial-gradient(53.6% 71.64% at 50% 50%, lch(15% 0 0) 0%, lch(8% 0 0) 70.56%, lch(3% 0 0) 100%);
    --style-shapeBottomGradient: linear-gradient(to right, rgb(92, 69, 24) 50%, rgba(60, 94, 144, 0.4) 50%);
    --style-shapeMiddleGradient: linear-gradient(to right, rgb(163, 54, 80) 50%, rgba(241, 224, 70, 0.5) 50%);
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  max-width: 100vw;
  overflow: hidden;
  height: 100%;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: var(--style-bgColor);
  color: lch(var(--color-primary-main) / 1);
}

button,
input {
  font-family: inherit;
}

.page {
  width: 100vw;
  height: 100svh;
  padding: 0 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.page[hidden],
.gate[hidden] {
  display: none !important;
}

.window {
  position: relative;
  z-index: 10;
  margin: 48px 80px;
  max-width: 1200px;
  width: 100%;
  max-height: calc(100% - 96px);
  height: 100%;
  background: linear-gradient(
    180deg,
    lch(var(--color-primary-surface) / 0.64) 0%,
    lch(var(--color-primary-surface) / 0.32) 100%
  );
  box-shadow: 0px 24px 40px 0px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  backdrop-filter: blur(25px);
  border: 1px solid lch(var(--color-primary-border) / 0.32);
  border-radius: 18px;
  display: flex;
}

.sidebar {
  position: relative;
  flex-shrink: 0;
  width: 360px;
  padding: 28px 16px 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.logo-row {
  padding: 0 8px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  flex-grow: 1;
  font-size: 27px;
  background: linear-gradient(180deg, lch(var(--color-primary-main) / 1) 0%, lch(var(--color-primary-main) / 0.5) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 400;
  letter-spacing: -1.584px;
}

.brand strong {
  font-weight: 600;
}

.url-block {
  margin: 22px 8px 12px;
}

.url-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: lch(var(--color-primary-main) / 0.45);
  margin-bottom: 8px;
}

.url-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 12px;
  border: 1px solid lch(var(--color-primary-border) / 0.5);
  background: lch(var(--color-sidebar-surface) / 0.7);
  padding: 0 8px 0 12px;
  height: 40px;
}

.url-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: lch(var(--color-primary-main) / 1);
  font-size: 12.5px;
  letter-spacing: -0.2px;
  outline: none;
}

.url-action {
  opacity: 0.4;
  transition: opacity 200ms cubic-bezier(0.31, 0.3, 0.17, 0.99);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding-right: 4px;
  flex-shrink: 0;
  background: none;
  border: 0;
  color: inherit;
}

.url-action:hover {
  opacity: 1;
}

.url-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 0 2px;
}

.switch-label,
.list-head {
  font-size: 12px;
  color: lch(var(--color-primary-main) / 0.45);
}

.switch {
  all: unset;
  width: 32px;
  height: 19px;
  border-radius: 100px;
  position: relative;
  cursor: pointer;
  background-color: lch(var(--color-primary-main) / 0.15);
}

.switch[aria-checked="true"] {
  background-color: lch(var(--color-success-surface) / 1);
}

.switch-thumb {
  display: block;
  width: 15px;
  height: 15px;
  background-color: lch(var(--color-pure-white) / 0.5);
  border-radius: 100px;
  transition: transform 200ms cubic-bezier(0.31, 0.3, 0.17, 0.99),
    background-color 200ms cubic-bezier(0.31, 0.3, 0.17, 0.99);
  transform: translateX(2px);
  margin-top: 2px;
}

.switch[aria-checked="true"] .switch-thumb {
  transform: translateX(15px);
  background-color: lch(var(--color-pure-white) / 1);
}

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 6px;
}

.text-btn {
  background: none;
  border: 0;
  color: lch(var(--color-primary-main) / 0.45);
  cursor: pointer;
  font-size: 12px;
}

.text-btn:hover {
  color: lch(var(--color-primary-main) / 0.9);
}

.request-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 0 4px 8px;
  scrollbar-width: thin;
}

.request-item {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  color: inherit;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 2px;
}

.request-item:hover {
  background: lch(var(--color-primary-table-hover) / 0.55);
}

.request-item.active {
  background: lch(var(--color-primary-table-surface) / 0.9);
  border-color: lch(var(--color-primary-table-border) / 0.8);
}

.method {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 0;
  grid-row: 1 / span 2;
  align-self: center;
  min-width: 52px;
}

.method.GET {
  color: lch(var(--color-http-100) / 1);
}
.method.POST {
  color: lch(var(--color-http-200) / 1);
}
.method.PUT,
.method.PATCH {
  color: lch(var(--color-http-400) / 1);
}
.method.DELETE {
  color: lch(var(--color-http-500) / 1);
}
.method.OPTIONS,
.method.HEAD {
  color: lch(var(--color-http-300) / 1);
}

.req-time {
  font-size: 12.5px;
  letter-spacing: -0.3px;
}

.req-ip {
  font-size: 11px;
  color: lch(var(--color-primary-main) / 0.42);
}

.detail {
  flex: 1;
  display: flex;
  background-color: lch(var(--color-primary-surface) / 0.8);
  height: 100%;
  min-width: 0;
  overflow: hidden;
}

.intro {
  flex: 1;
  flex-direction: column;
  gap: 16px;
  display: flex;
  align-items: start;
  justify-content: center;
  margin: 0 80px;
  height: 100%;
  max-width: 500px;
}

.intro h1 {
  color: lch(var(--color-primary-main) / 0.4);
  font-size: 30px;
  font-style: normal;
  font-weight: 500;
  line-height: 32px;
  letter-spacing: -1.5px;
}

.intro h1 em {
  font-style: normal;
  color: lch(var(--color-primary-main) / 1);
}

.intro hr {
  height: 1px;
  border: 0;
  width: 100%;
  background-color: lch(var(--color-primary-main) / 0.1);
  margin: 8px 0;
}

.intro p {
  color: lch(var(--color-primary-main) / 0.5);
  max-width: 48ch;
  font-size: 16px;
  font-weight: 200;
  line-height: 22px;
  letter-spacing: -0.4px;
}

.inspect {
  flex: 1;
  overflow: auto;
  padding: 36px 40px 48px;
  user-select: text;
}

.inspect-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.inspect-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.inspect-title .method {
  font-size: 13px;
}

.full-url {
  font-size: 15px;
  letter-spacing: -0.3px;
  word-break: break-all;
}

.meta-grid {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px 16px;
  font-size: 13px;
  margin-bottom: 28px;
}

.meta-grid dt {
  color: lch(var(--color-primary-main) / 0.4);
}

.meta-grid dd {
  word-break: break-all;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: lch(var(--color-primary-main) / 0.4);
  margin: 0 0 10px;
}

.kv {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin-bottom: 28px;
}

.kv th,
.kv td {
  text-align: left;
  padding: 7px 10px;
  border-bottom: 1px solid lch(var(--color-primary-table-border) / 0.55);
  vertical-align: top;
  word-break: break-word;
}

.kv th {
  width: 34%;
  color: lch(var(--color-primary-main) / 0.5);
  font-weight: 500;
}

.code {
  background: lch(var(--color-code-surface) / 1);
  border-radius: 12px;
  padding: 14px 16px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  color: lch(var(--color-code-default) / 1);
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 12px;
}

.tok-key {
  color: lch(var(--color-code-key) / 1);
}
.tok-str {
  color: lch(var(--color-code-string) / 1);
}
.tok-num {
  color: lch(var(--color-code-number) / 1);
}
.tok-bool,
.tok-null {
  color: lch(var(--color-code-boolean) / 1);
}

.empty-list {
  padding: 18px 12px;
  font-size: 13px;
  color: lch(var(--color-primary-main) / 0.35);
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gate-card {
  width: min(380px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px 28px;
  border-radius: 18px;
  border: 1px solid lch(var(--color-primary-border) / 0.32);
  background: linear-gradient(
    180deg,
    lch(var(--color-primary-surface) / 0.72) 0%,
    lch(var(--color-primary-surface) / 0.4) 100%
  );
  backdrop-filter: blur(25px);
  box-shadow: 0px 24px 40px 0px rgba(0, 0, 0, 0.04);
}

.gate-card h1 {
  font-size: 27px;
  font-weight: 400;
  letter-spacing: -1.4px;
  background: linear-gradient(180deg, lch(var(--color-primary-main) / 1) 0%, lch(var(--color-primary-main) / 0.5) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gate-card p {
  color: lch(var(--color-primary-main) / 0.5);
  font-size: 15px;
  font-weight: 200;
  letter-spacing: -0.3px;
}

.gate-card input {
  height: 42px;
  border-radius: 12px;
  border: 1px solid lch(var(--color-primary-border) / 0.5);
  background: lch(var(--color-sidebar-surface) / 0.7);
  color: lch(var(--color-primary-main) / 1);
  padding: 0 14px;
  font-size: 16px;
  outline: none;
}

.gate-card button {
  height: 42px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  background: lch(var(--color-primary-main) / 0.9);
  color: lch(var(--color-primary-surface) / 1);
  font-size: 14px;
  letter-spacing: -0.2px;
}

.gate-error {
  color: lch(50 80 30 / 1) !important;
  font-size: 13px !important;
}

.blob {
  position: absolute;
  border-radius: 50%;
  transform: translate3d(0, 0, 0);
  pointer-events: none;
}

.blob-bottom {
  bottom: 100px;
  width: 90%;
  height: 100px;
  filter: blur(150px);
  background: var(--style-shapeBottomGradient);
}

.blob-middle {
  top: 100px;
  left: 35%;
  width: 200px;
  height: 140px;
  filter: blur(100px);
  background: var(--style-shapeMiddleGradient);
}

@keyframes bounceX {
  0%,
  20%,
  50%,
  80%,
  to {
    opacity: 0.8;
    transform: translate(0);
  }
  40% {
    opacity: 1;
    transform: translate(-15px) rotate(-5deg);
  }
  60% {
    opacity: 0.8;
    transform: translate(-2px);
  }
}

.arrow:after {
  content: "← send here";
  position: absolute;
  right: -118px;
  bottom: -4px;
  color: slateblue;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.3px;
  animation: 1.5s infinite bounceX;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .window {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    max-height: 42%;
  }
  .intro {
    margin: 40px;
    height: fit-content;
  }
  .arrow:after {
    right: 8px;
    bottom: -28px;
  }
}

@media (max-width: 600px) {
  .page {
    padding: 0 8px;
  }
  .window {
    margin: 0;
    max-height: calc(100% - 16px);
  }
  .intro h1 {
    font-size: 24px;
    line-height: 28px;
  }
}
