﻿:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --bg: #f8fafc;
  --card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 16px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --inline-code-bg: #f1f5f9;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #818cf8;
    --primary-dark: #6366f1;
    --bg: #0f172a;
    --card: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --code-bg: #020617;
    --code-text: #e2e8f0;
    --inline-code-bg: #334155;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Navbar */
.navbar {
  width: 100%;
  max-width: 1200px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  background: transparent;
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  box-shadow: var(--shadow-sm);
}

.brand-logo img {
  width: 100%;
  height: 100%;
}

.brand-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--card);
  color: var(--text-main);
  border: 1px solid var(--border);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg);
}

/* Main Content */
.container {
  width: 100%;
  max-width: 900px;
  padding: 40px 20px 80px;
}

.page-header {
  margin-bottom: 40px;
  text-align: center;
}

.page-header h1 {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.page-header p {
  font-size: 18px;
  color: var(--text-muted);
}

/* Sections */
.section {
  background: var(--card);
  border-radius: 14px;
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(99, 102, 241, 0.06), transparent 34%),
    linear-gradient(315deg, rgba(16, 185, 129, 0.04), transparent 42%);
  pointer-events: none;
}

.section > * {
  position: relative;
  z-index: 1;
}

.section h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.section h2 span {
  color: var(--primary);
  font-size: 18px;
  opacity: 0.8;
  font-weight: 800;
}

.section h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  margin: 24px 0 12px;
}

.section p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.section ul {
  margin-bottom: 16px;
  padding-left: 20px;
  color: var(--text-muted);
}

.section li {
  margin-bottom: 8px;
  font-size: 15px;
}

/* Code Blocks */
pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 20px;
  border-radius: 12px;
  overflow-x: auto;
  font-family:
    "ui-monospace", "SFMono-Regular", "Menlo", "Monaco", "Consolas", monospace;
  font-size: 13px;
  margin: 16px 0;
  line-height: 1.6;
  border: 1px solid #1e293b;
}

code.inline {
  background: var(--inline-code-bg);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.9em;
  font-family:
    "ui-monospace", "SFMono-Regular", "Menlo", "Monaco", "Consolas", monospace;
  font-weight: 600;
}

.endpoint-url {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  width: 100%;
  min-width: 0;
  box-shadow: var(--shadow-sm);
}

.endpoint-method {
  color: #bbf7d0;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.26);
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  flex: 0 0 auto;
}

.endpoint-text {
  font-family:
    "ui-monospace", "SFMono-Regular", "Menlo", "Monaco", "Consolas", monospace;
  font-size: 13px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  flex: 1;
}

.endpoint-text::-webkit-scrollbar {
  display: none;
}

.copy-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: var(--code-text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 0 0 auto;
}

.copy-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(129, 140, 248, 0.45);
  transform: translateY(-1px);
}

.copy-btn svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.2;
}

.copy-btn .check-icon {
  display: none;
}

.copy-btn.copied {
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.5);
  background: rgba(34, 197, 94, 0.14);
}

.copy-btn.copied .copy-icon {
  display: none;
}

.copy-btn.copied .check-icon {
  display: block;
}

.endpoint-group {
  display: grid;
  gap: 10px;
  margin: 14px 0 18px;
}

.subtle-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

th,
td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--bg);
  color: var(--text-main);
  font-weight: 600;
  font-size: 14px;
}

.status-code-col {
  width: 80px;
}

td {
  font-size: 14px;
  color: var(--text-muted);
  background: var(--card);
}

tr:last-child td {
  border-bottom: none;
}

/* Footer */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  width: 100%;
  padding: 32px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  background: var(--card);
}

footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .page-header h1 {
    font-size: 28px;
  }

  .section {
    padding: 20px;
  }

  .endpoint-url {
    align-items: stretch;
    gap: 10px;
  }

  .endpoint-method {
    display: grid;
    place-items: center;
  }
}
