.page-api-dash {
  --apd-mono: "JetBrains Mono", "DM Mono", ui-monospace, monospace;
  --apd-accent: #0066cc;
  --apd-accent-soft: rgba(0, 102, 204, 0.14);
  min-height: 100vh;
}

.apd-page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.apd-page-bg__glow {
  position: absolute;
  width: 55vw;
  height: 55vw;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.apd-page-bg__glow--tl {
  top: -20%;
  left: -10%;
  background: radial-gradient(circle, rgba(0, 102, 204, 0.35), transparent 70%);
}

.apd-page-bg__glow--br {
  bottom: -25%;
  right: -15%;
  background: radial-gradient(circle, rgba(120, 80, 255, 0.22), transparent 70%);
}

.apd-page-bg__mesh {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black, transparent);
}

.light .apd-page-bg__mesh {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}

.page-api-dash .apd-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

.page-api-dash .apd-nav.scrolled {
  background: color-mix(in srgb, var(--background) 88%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.page-api-dash .apd-nav .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  flex-wrap: wrap;
  min-height: 4rem;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  position: relative;
}

.page-api-dash .apd-nav .nav-logo {
  flex-shrink: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.page-api-dash .apd-nav .scripts-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1 1 auto;
  flex-wrap: wrap;
  min-width: 0;
}

.page-api-dash .apd-nav .scripts-nav a {
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.page-api-dash .apd-nav .scripts-nav a:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.page-api-dash .apd-nav .scripts-nav a.is-active {
  color: var(--primary);
  background: linear-gradient(135deg, rgba(255, 116, 107, 0.14), rgba(0, 212, 255, 0.1));
  border-color: rgba(255, 255, 255, 0.22);
}

.light.page-api-dash .apd-nav .scripts-nav a {
  color: rgba(0, 0, 0, 0.62);
}

.light.page-api-dash .apd-nav .scripts-nav a:hover {
  color: #0a0a0a;
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

.light.page-api-dash .apd-nav .scripts-nav a.is-active {
  color: #0066cc;
  background: rgba(0, 102, 204, 0.08);
  border-color: rgba(0, 102, 204, 0.2);
}

.page-api-dash .apd-theme-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.page-api-dash .apd-theme-btn:hover {
  border-color: rgba(0, 102, 204, 0.35);
  background: rgba(0, 102, 204, 0.1);
}

.page-api-dash .apd-theme-btn:active {
  transform: scale(0.95);
}

.page-api-dash .apd-theme-btn .icon {
  width: 18px;
  height: 18px;
}

.light.page-api-dash .apd-theme-btn {
  border-color: rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.04);
  color: rgba(0, 0, 0, 0.75);
}

.apd-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-left: auto;
}

.apd-lang-link {
  font-size: 0.8125rem;
  color: var(--muted-foreground, rgba(255, 255, 255, 0.65));
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.apd-lang-link:hover {
  color: var(--foreground, #fff);
  border-color: color-mix(in srgb, var(--apd-accent) 40%, var(--border, rgba(255, 255, 255, 0.12)));
  background: rgba(0, 102, 204, 0.08);
}

.light.page-api-dash .apd-lang-link {
  color: rgba(0, 0, 0, 0.55);
  border-color: rgba(0, 0, 0, 0.1);
}

.light.page-api-dash .apd-lang-link:hover {
  color: #0066cc;
  border-color: rgba(0, 102, 204, 0.25);
  background: rgba(0, 102, 204, 0.06);
}

.apd-main {
  position: relative;
  z-index: 1;
  padding: 5.25rem 0 4rem;
}

@media (max-width: 1068px) {
  .page-api-dash .apd-nav .scripts-nav a {
    padding: 6px 9px;
    font-size: 11px;
  }
}

@media (max-width: 767px) {
  .page-api-dash .apd-nav .nav-logo {
    display: none;
  }

  .page-api-dash .apd-nav .nav-inner {
    justify-content: center;
    row-gap: 0.35rem;
    min-height: 3.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .page-api-dash .apd-nav-actions {
    position: absolute;
    right: 1rem;
    top: 0.65rem;
    margin-left: 0;
  }

  .page-api-dash .apd-nav .scripts-nav {
    width: 100%;
    justify-content: center;
    gap: 4px;
    padding: 0 0.25rem;
  }

  .page-api-dash .apd-nav .scripts-nav a {
    padding: 6px 10px;
    font-size: 11px;
  }

  .apd-main {
    padding-top: 7.5rem;
  }
}

@media (max-width: 420px) {
  .page-api-dash .apd-nav .scripts-nav a {
    padding: 5px 8px;
    font-size: 10px;
  }

  .apd-main {
    padding-top: 8.25rem;
  }
}

.apd-shell {
  max-width: 1080px;
}

.apd-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.apd-kicker {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--apd-accent);
  margin-bottom: 0.75rem;
}

.apd-hero h1 {
  font-family: "Outfit", system-ui, sans-serif;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  margin: 0 0 1rem;
}

.apd-hero__line {
  width: 64px;
  margin: 0 auto 1.25rem;
}

.apd-lead {
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-muted, #aaa);
  line-height: 1.6;
}

.apd-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  overflow: hidden;
}

.light .apd-panel {
  background: #fff;
  border-color: #e0e0e0;
}

.apd-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.light .apd-panel__head {
  border-bottom-color: #f0f0f0;
}

.apd-panel__head h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.apd-panel__body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.apd-panel--guest {
  max-width: 480px;
  margin: 0 auto;
}

.apd-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 834px) {
  .apd-steps {
    grid-template-columns: 1fr;
  }
}

.apd-step-card {
  padding: 1.25rem 1.35rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.light .apd-step-card {
  background: #fff;
  border-color: #e8e8e8;
}

.apd-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--apd-accent-soft);
  color: var(--apd-accent);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.apd-step-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 600;
}

.apd-step-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted, #999);
  line-height: 1.5;
}

.apd-panel--guide {
  margin-bottom: 1.5rem;
}

.apd-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 9999px;
  background: var(--apd-accent-soft);
  color: var(--apd-accent);
}

.apd-guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

@media (max-width: 734px) {
  .apd-guide-grid {
    grid-template-columns: 1fr;
  }
}

.apd-guide-block h3 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.apd-guide-block--wide {
  grid-column: 1 / -1;
}

.apd-key-format {
  margin: 0 0 0.5rem;
}

.apd-key-format code {
  font-family: var(--apd-mono);
  font-size: 13px;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  background: rgba(0, 102, 204, 0.1);
  color: var(--apd-accent);
}

.light .apd-key-format code {
  background: #f0f6ff;
}

.apd-tip-list,
.apd-benefit-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.apd-tip-list li,
.apd-benefit-list li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.1rem;
  font-size: 0.9rem;
  color: var(--text-muted, #aaa);
  line-height: 1.45;
}

.apd-tip-list li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--apd-accent);
  font-weight: 700;
}

.apd-benefit-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--apd-accent);
  font-size: 12px;
}

.apd-tip-list code {
  font-family: var(--apd-mono);
  font-size: 12px;
}

.apd-endpoints {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.apd-endpoint-group__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.apd-endpoint-group__lead {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--text-muted, #999);
  line-height: 1.5;
}

.apd-endpoint-group__lead a {
  color: var(--apd-accent);
}

.apd-endpoint-group__lead code {
  font-family: var(--apd-mono);
  font-size: 12px;
}

.apd-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted, #aaa);
}

.apd-tag--key {
  background: var(--apd-accent-soft);
  color: var(--apd-accent);
}

.apd-tag--alt {
  background: rgba(255, 180, 80, 0.15);
  color: #e8a84a;
}

.light .apd-tag {
  background: #eee;
  color: #666;
}

.light .apd-tag--key {
  background: #e8f2ff;
  color: #0066cc;
}

.apd-endpoint-rows {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  overflow: hidden;
}

.light .apd-endpoint-rows {
  border-color: #eee;
}

.apd-endpoint-rows li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem 1rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13px;
}

.light .apd-endpoint-rows li {
  border-bottom-color: #f0f0f0;
}

.apd-endpoint-rows li:last-child {
  border-bottom: none;
}

@media (max-width: 640px) {
  .apd-endpoint-rows li {
    grid-template-columns: auto 1fr;
  }
  .apd-endpoint-rows li .apd-endpoint__desc {
    grid-column: 2;
  }
}

.apd-endpoints__title {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.apd-endpoint {
  margin-bottom: 1.25rem;
}

.apd-endpoint:last-child {
  margin-bottom: 0;
}

.apd-endpoint__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.6rem;
}

.apd-method {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #8cf;
}

.apd-method--post {
  background: rgba(0, 102, 204, 0.2);
  color: #6af;
}

.light .apd-method {
  background: #eee;
  color: #333;
}

.light .apd-method--post {
  background: #e8f2ff;
  color: #0066cc;
}

.apd-endpoint__path {
  font-family: var(--apd-mono);
  font-size: 13px;
  font-weight: 500;
}

.apd-endpoint__desc {
  font-size: 13px;
  color: var(--text-muted, #888);
}

.apd-code-wrap {
  position: relative;
}

.apd-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.45);
  color: #ccc;
  cursor: pointer;
}

.light .apd-copy-btn {
  background: #fff;
  border-color: #e0e0e0;
  color: #555;
}

.apd-copy-btn:active {
  transform: scale(0.95);
}

.apd-login-strip {
  margin-bottom: 1.5rem;
}

.apd-login-strip__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.5rem 1.75rem;
  border-radius: 18px;
  border: 1px solid rgba(88, 101, 242, 0.35);
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.12), rgba(0, 102, 204, 0.08));
}

.light .apd-login-strip__inner {
  background: linear-gradient(135deg, #f4f5ff, #f0f6ff);
  border-color: #d8dcff;
}

.apd-login-strip__text h2 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.apd-login-strip__text p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted, #999);
  line-height: 1.5;
  max-width: 520px;
}

.apd-login-strip__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.apd-app {
  margin-top: 0.25rem;
}

.apd-guest-card {
  padding: 2rem;
  text-align: center;
}

.apd-guest-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
}

.apd-guest-card p {
  color: var(--text-muted, #aaa);
  margin: 0 0 1.5rem;
}

.apd-user-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.apd-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.apd-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.apd-user-name {
  margin: 0;
  font-weight: 600;
}

.apd-muted {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted, #888);
}

.apd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 834px) {
  .apd-grid {
    grid-template-columns: 1fr;
  }
}

.apd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 10px 18px;
  border-radius: 9999px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease;
}

.apd-btn:active {
  transform: scale(0.95);
}

.apd-btn--primary {
  background: var(--apd-accent);
  color: #fff;
}

.apd-btn--ghost {
  background: transparent;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.light .apd-btn--ghost {
  border-color: #e0e0e0;
}

.apd-btn--discord {
  background: #5865f2;
  color: #fff;
  padding: 12px 22px;
}

.apd-discord-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}

.apd-keys-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.apd-key-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.light .apd-key-row {
  background: #fafafc;
  border-color: #f0f0f0;
}

.apd-key-row.is-revoked {
  opacity: 0.55;
}

.apd-key-value {
  font-family: var(--apd-mono);
  font-size: 13px;
  word-break: break-all;
  margin: 0 0 0.35rem;
}

.apd-key-meta {
  font-size: 12px;
  color: var(--text-muted, #888);
  margin: 0;
}

.apd-key-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-end;
}

.apd-key-actions button {
  font-size: 12px;
  padding: 6px 12px;
}

.apd-key-form {
  margin-bottom: 1rem;
}

.apd-label {
  display: block;
  font-size: 13px;
  margin-bottom: 0.35rem;
}

.apd-input,
.apd-select {
  width: 100%;
  max-width: 280px;
  padding: 10px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  font-size: 14px;
}

.light .apd-input,
.light .apd-select {
  background: #fff;
  border-color: #e0e0e0;
}

.apd-key-form__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.apd-msg {
  font-size: 13px;
  margin: 0 0 1rem;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
}

.apd-msg.is-ok {
  background: rgba(0, 102, 204, 0.12);
  color: var(--apd-accent);
}

.apd-msg.is-err {
  background: rgba(220, 60, 60, 0.12);
  color: #e55;
}

.apd-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.apd-stat {
  padding: 1rem;
  border-radius: 12px;
  background: rgba(0, 102, 204, 0.08);
}

.apd-stat__label {
  display: block;
  font-size: 12px;
  color: var(--text-muted, #888);
  margin-bottom: 0.25rem;
}

.apd-stat__value {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: var(--apd-mono);
}

.apd-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 120px;
  padding-top: 0.5rem;
}

.apd-chart-bar {
  flex: 1;
  min-width: 4px;
  background: var(--apd-accent);
  border-radius: 4px 4px 0 0;
  opacity: 0.85;
}

.apd-chart-empty {
  font-size: 13px;
  color: var(--text-muted, #888);
  align-self: center;
  width: 100%;
  text-align: center;
}

.apd-docs p {
  margin: 0 0 1rem;
  color: var(--text-muted, #aaa);
  line-height: 1.5;
}

.apd-code {
  font-family: var(--apd-mono);
  font-size: 12px;
  line-height: 1.5;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  overflow-x: auto;
  margin: 0 0 1rem;
}

.light .apd-code {
  background: #f5f5f7;
}

.apd-code code {
  white-space: pre;
}

.apd-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted, #888);
  font-size: 14px;
}

.apd-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
}

.apd-badge.is-off {
  background: rgba(220, 60, 60, 0.15);
  color: #e88;
}
