:root {
  --bg: #f3f4f6;
  --fg: #111827;
  --muted: #6b7280;
  --card: #ffffff;
  --line: #e5e7eb;
  --accent: #111827;
  --accent-fg: #f9fafb;
  --danger-bg: #fef2f2;
  --danger-fg: #991b1b;
  --danger-line: #fecaca;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--fg);
  background: var(--bg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  min-height: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 56px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.topbar-inner,
.page-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.topbar-inner {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  font-size: 20px;
  font-weight: 700;
}

.brand-sub {
  font-size: 13px;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
}

.nav-link:hover {
  color: var(--fg);
  background: #f3f4f6;
}

.nav-link.is-active {
  color: var(--fg);
  font-weight: 600;
}

.page-inner {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.page-head h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.search {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 360px;
}

.search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: #9ca3af;
}

.search input,
.select,
.btn {
  font: inherit;
}

.search input,
.select {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--fg);
  padding: 0 12px;
}

.search input {
  width: 100%;
  padding-left: 36px;
}

.select {
  min-width: 200px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-fg);
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-outline {
  background: #fff;
  color: var(--fg);
  border-color: var(--line);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  height: 36px;
  padding: 0 8px;
}

.btn-ghost.is-active {
  color: var(--fg);
}

.btn-sm {
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.alert {
  border: 1px solid var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger-fg);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}

table.movies {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.movies th,
table.movies td {
  text-align: left;
  vertical-align: middle;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

table.movies th {
  color: var(--muted);
  font-weight: 500;
  background: #fff;
}

table.movies tr:last-child td {
  border-bottom: 0;
}

table.movies tbody tr:hover {
  background: #f9fafb;
}

.cover {
  width: 48px;
  height: 64px;
  border-radius: 6px;
  object-fit: cover;
  background: #f3f4f6;
  display: block;
}

.title {
  font-weight: 600;
}

.desc {
  margin-top: 4px;
  max-width: 420px;
  color: var(--muted);
  font-size: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.muted {
  color: var(--muted);
}

.num {
  font-weight: 600;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #f3f4f6;
  color: #111827;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  font-size: 14px;
  color: var(--muted);
}

.pager-actions {
  display: flex;
  gap: 8px;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 48px 16px;
}

.spin {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.docs-intro h2,
.endpoint h3 {
  margin: 0;
  font-size: 16px;
}

.docs-intro p,
.endpoint p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #374151;
}

.endpoint {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.endpoint-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.method {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 6px;
}

.method-get {
  background: #ecfdf5;
  color: #047857;
}

.method-post {
  background: #eff6ff;
  color: #1d4ed8;
}

.path {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  font-weight: 600;
}

.params {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.params th,
.params td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.params th {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.params code,
.docs-intro code,
.endpoint code {
  font-size: 13px;
}

.code-block {
  margin: 0;
  padding: 12px 14px;
  background: #111827;
  color: #e5e7eb;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.5;
}

.code-block code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre;
}

.note {
  font-size: 14px;
  color: var(--muted);
}

.examples {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafafa;
}

.examples summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
}

.examples summary::-webkit-details-marker {
  display: none;
}

.examples summary::before {
  content: "▸ ";
  color: var(--muted);
}

.examples[open] summary::before {
  content: "▾ ";
}

.examples[open] summary {
  border-bottom: 1px solid var(--line);
}

.examples .code-block {
  margin: 12px;
}
