:root {
  --blue: #1a227e;
  --navy: #001238;
  --green: #00cb8a;
  --ink: #102033;
  --muted: #5b6578;
  --line: #d9dfec;
  --surface: #ffffff;
  --soft: #f5f7fb;
  --danger: #b00020;
  --shadow: 0 18px 50px rgba(0, 18, 56, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--soft);
  color: var(--ink);
  font-family: Rubik, Arial, Helvetica, sans-serif;
}

button,
input,
select {
  font: inherit;
}

.landing {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px;
  background:
    linear-gradient(135deg, rgba(26, 34, 126, 0.96), rgba(0, 18, 56, 0.96)),
    radial-gradient(circle at top right, rgba(0, 203, 138, 0.24), transparent 34%);
}

.landing__hero {
  width: min(780px, 100%);
  color: white;
}

.landing__hero h1,
.auth-box h1,
.app-header h1 {
  margin: 0;
  line-height: 1.04;
}

.landing__hero h1 {
  max-width: 680px;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
}

.landing__hero p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.1rem;
  line-height: 1.7;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--green);
  color: var(--navy);
}

.button--ghost {
  background: white;
  border-color: var(--line);
  color: var(--blue);
}

.auth-gate {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, var(--navy), var(--blue));
}

.auth-box {
  width: min(520px, 100%);
  border-radius: 8px;
  background: white;
  padding: 32px;
  box-shadow: var(--shadow);
}

.auth-box h1 {
  color: var(--navy);
  font-size: 2rem;
}

.auth-box label,
.field label,
.field legend {
  display: block;
  margin: 20px 0 8px;
  color: var(--navy);
  font-weight: 700;
}

.auth-row {
  display: flex;
  gap: 10px;
}

.auth-row input,
.field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 10px 12px;
}

.form-error {
  color: var(--danger);
  font-weight: 700;
}

.app-shell {
  width: min(1360px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.app-header h1 {
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.app-header p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.6;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.control-panel,
.result-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(0, 18, 56, 0.06);
}

.control-panel {
  position: sticky;
  top: 20px;
  padding: 20px;
}

.field {
  margin-bottom: 18px;
}

.radio-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px 14px;
}

.radio-group label {
  margin: 12px 0 0;
  color: var(--ink);
  font-weight: 500;
}

.radio-group input {
  margin-right: 8px;
}

.status-text {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.result-panel {
  min-width: 0;
  overflow: hidden;
}

.endpoint-box {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 18px;
}

.endpoint-box code {
  align-self: center;
  color: var(--blue);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.method-badge {
  display: inline-block;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--navy);
  color: white;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 800;
}

.headers-box {
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
}

.headers-box summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 700;
}

.headers-box pre {
  margin: 12px 0 0;
  white-space: pre-wrap;
}

.output-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 12px 18px;
}

.json-output {
  min-height: 520px;
  max-height: calc(100vh - 300px);
  margin: 0;
  overflow: auto;
  background: #07112e;
  color: #e7fff6;
  padding: 22px;
  font-family: "Cascadia Mono", Consolas, "Courier New", monospace;
  font-size: 0.92rem;
  line-height: 1.55;
  tab-size: 2;
}

@media (max-width: 900px) {
  .app-shell {
    padding: 20px;
  }

  .app-header,
  .endpoint-box,
  .auth-row {
    flex-direction: column;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .control-panel {
    position: static;
  }

  .json-output {
    max-height: none;
    min-height: 420px;
  }
}
