* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #0b0f1c;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  padding: 2rem 1.5rem;
  color: #eef2ff;
  line-height: 1.5;
}

.wrapper {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* ——— Шапка ——— */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  font-size: 2.6rem;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(45, 212, 191, 0.6));
}

.title-block h1 {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #f0fdfa, #a7f3d0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.title-block .sub {
  font-size: 0.9rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #2dd4bf;
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 0 10px #2dd4bf;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* ——— Спойлер ——— */
details {
  background: rgba(18, 24, 40, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(94, 234, 212, 0.2);
  border-radius: 1.5rem;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

details[open] {
  border-color: rgba(94, 234, 212, 0.35);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(45, 212, 191, 0.2) inset;
}

details:hover {
  border-color: rgba(94, 234, 212, 0.3);
}

summary {
  list-style: none;
  cursor: pointer;
  padding: 1.3rem 1.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  user-select: none;
  transition: background 0.15s;
}

summary::-webkit-details-marker {
  display: none;
}

summary:hover {
  background: rgba(20, 184, 166, 0.05);
}

.summary-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.summary-right {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-shrink: 0;
}

.method {
  font-family: 'Fira Code', 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.method.get {
  background: #064e3b;
  color: #b9f6e7;
  border: 1px solid #34d39980;
}

.method.post {
  background: #1e3a5f;
  color: #b9d7f6;
  border: 1px solid #60a5fa80;
}

.method.put {
  background: #3b2e1e;
  color: #fde68a;
  border: 1px solid #fbbf2480;
}

.method.patch {
  background: #3b1e3b;
  color: #f0abfc;
  border: 1px solid #e879f980;
}

.method.delete {
  background: #3b1e2b;
  color: #fecdd3;
  border: 1px solid #fb718580;
}

.path {
  font-family: 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 1rem;
  color: #e2e8f0;
  font-weight: 500;
  word-break: break-all;
}

.lock-icon {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #fda4af;
  font-size: 0.75rem;
  background: rgba(225, 29, 72, 0.1);
  padding: 0.2rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(244, 63, 94, 0.3);
  white-space: nowrap;
}

.lock-icon svg {
  width: 13px;
  height: 13px;
  stroke: #fda4af;
  fill: none;
  stroke-width: 2;
}

.chevron {
  width: 20px;
  height: 20px;
  stroke: #5eead4;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

details[open] .chevron {
  transform: rotate(180deg);
}

/* ——— Содержимое спойлера ——— */
.method-body {
  padding: 0 1.8rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  border-top: 1px solid #1e293b;
  padding-top: 1.5rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

@media (max-width: 750px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.detail-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.detail-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.detail-label .tag {
  background: #1e293b;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.65rem;
  color: #cbd5e1;
  font-weight: 500;
}

.code-box {
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 1rem;
  padding: 1rem 1.2rem;
  font-family: 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: #cbd5e1;
  overflow-x: auto;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.code-box .key { color: #7dd3fc; }
.code-box .str { color: #a7f3d0; }
.code-box .num { color: #fde68a; }
.code-box .cmt { color: #64748b; font-style: italic; }
.code-box .url { color: #f0abfc; }

.desc-text {
  font-size: 0.88rem;
  color: #b6c2d9;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 1rem;
  padding: 0.9rem 1.2rem;
  border-left: 3px solid #2dd4bf;
}

.desc-text code {
  background: #1e293b;
  padding: 0.1rem 0.4rem;
  border-radius: 0.35rem;
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  color: #cbd5e1;
}

.response-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: #064e3b;
  color: #6ee7b7;
  border: 1px solid #34d39950;
}

.response-status.error {
  background: #3b1e2b;
  color: #fda4af;
  border-color: #fb718550;
}

.response-status.warning {
  background: #3b2e1e;
  color: #fde68a;
  border-color: #fbbf2450;
}

.path-params {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.3rem;
}

.param-pill {
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
  background: #0f2e2a;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #2dd4bf40;
  color: #5eead4;
}

.param-pill span {
  color: #94a3b8;
  font-family: 'Inter', sans-serif;
}

/* ——— Ключ ——— */
.key-section {
  background: rgba(15, 23, 42, 0.8);
  border-radius: 1.5rem;
  padding: 1.5rem 1.8rem;
  border: 1px solid #2dd4bf30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.5rem;
}

.key-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.key-icon {
  background: #0f2e2a;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #2dd4bf50;
  flex-shrink: 0;
}

.key-icon svg {
  width: 24px;
  height: 24px;
  stroke: #5eead4;
  fill: none;
  stroke-width: 2;
}

.key-text h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #ccfbf1;
  margin-bottom: 0.2rem;
}

.key-text p {
  font-size: 0.85rem;
  color: #9ca3af;
}

.key-text code {
  background: #1e293b;
  padding: 0.1rem 0.4rem;
  border-radius: 0.35rem;
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  color: #cbd5e1;
}

.key-value {
  background: #020617;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-family: 'Fira Code', monospace;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  border: 1px dashed #2dd4bf80;
  color: #5eead4;
  font-weight: 500;
  box-shadow: 0 0 12px #2dd4bf15;
}

@media (max-width: 600px) {
  summary { padding: 1.1rem 1.2rem; }
  .method-body { padding: 0 1.2rem 1.3rem; padding-top: 1.2rem; }
  .summary-left { gap: 0.7rem; }
  .key-section { flex-direction: column; align-items: flex-start; }
  .key-value { font-size: 0.9rem; padding: 0.5rem 1rem; }
  .title-block h1 { font-size: 1.5rem; }
  .path { font-size: 0.9rem; }
}