
:root {
  color-scheme: dark;
  font-family: "Inter", "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* ✅ Theme color */
  --navy: #60a5fa;

  /* Surfaces */
  --bg: #000000;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-2: rgba(255, 255, 255, 0.04);

  /* Text */
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.70);
  --muted-2: rgba(255, 255, 255, 0.55);

  /* Lines / shadows */
  --border: rgba(255, 255, 255, 0.10);
  --shadow: 0 22px 46px rgba(0, 0, 0, 0.55);
  --shadow-2: 0 22px 50px rgba(0, 0, 0, 0.50);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

a { color: inherit; }

/* HERO */
.hero {
  padding: 48px clamp(20px, 5vw, 96px) 64px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 48px;
  position: relative;
}

.account-bar {
  position: absolute;
  top: 18px;
  left: clamp(20px, 5vw, 96px);
  right: clamp(20px, 5vw, 96px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.account-leftlinks {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-anon {
  display: flex;
  gap: 10px;
}

.account-authed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(7, 7, 7, 0.72);
  backdrop-filter: blur(14px);
  min-width: min(520px, 100%);
}

.account-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.account-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.10);
  flex: 0 0 auto;
  overflow: hidden;
}

.account-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.account-name {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.account-email {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.account-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.account-plan {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 880px) {
  .account-authed {
    min-width: 0;
    width: 100%;
  }

  .account-name,
  .account-email {
    max-width: 140px;
  }
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand__logo {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 12px;
  color: var(--muted-2);
}

.lead {
  color: var(--muted);
  line-height: 1.6;
}

.hero__actions {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.hero__panel {
  display: grid;
  gap: 16px;
}

.stat-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  background: var(--panel-2);
  box-shadow: var(--shadow);
}

.stat-label {
  font-size: 13px;
  color: var(--muted-2);
}

.stat-value {
  font-size: 24px;
  font-weight: 600;
  margin-top: 4px;
}

/* BUTTONS */
.primary-btn,
.ghost-btn,
.secondary-btn {
  mar
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  background: linear-gradient(120deg, var(--navy), rgba(0, 0, 128, 0.65));
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(0, 0, 128, 0.28);
  border: 1px solid rgba(16, 20, 44, 0.10);
}

.secondary-btn {
  background: rgba(16, 20, 44, 0.05);
  color: var(--text);
  border: 1px solid rgba(16, 20, 44, 0.12);
}

.ghost-btn {
  border: 1px solid rgba(16, 20, 44, 0.22);
  color: var(--text);
  background: transparent;
}

.link-btn {
  color: #93c5fd;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-btn:hover {
  color: #bfdbfe;
}

.account-bar .ghost-btn {
  padding: 8px 14px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(7, 7, 7, 0.55);
}

.account-bar .ghost-btn:hover {
  transform: translateY(-1px);
}

.primary-btn:hover,
.ghost-btn:hover,
.secondary-btn:hover {
  transform: translateY(-2px);
}

/* MAIN */
main {
  padding: 0 clamp(20px, 5vw, 96px) 64px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section__header h2 {
  margin: 8px 0 6px;
  font-size: clamp(28px, 4vw, 40px);
}

/* CARDS */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-2);
}

.card ul {
  padding-left: 18px;
  color: var(--muted);
}

.card li + li { margin-top: 4px; }

/* ACCESS */
.access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.access-card {
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.access-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.access-form input {
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.api-key-output code {
  display: block;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  font-size: 14px;
  margin-bottom: 8px;
}

.user-keys-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-keys-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.user-keys-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-keys-head p {
  margin: 0;
  font-weight: 600;
}

.user-keys-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.user-keys-hint {
  margin: 0;
  font-size: 13px;
}

.user-key-created p {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--muted);
}

.user-key-created code {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
  margin-bottom: 8px;
  word-break: break-all;
}

.user-keys-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-keys-toolbar input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 8px 10px;
  font-size: 13px;
}

.user-keys-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.user-keys-pager .secondary-btn {
  padding: 6px 10px;
}

.user-key-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
}

.user-key-main {
  min-width: 0;
}

.user-key-name {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}

.user-key-meta {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  border: 1px solid var(--border);
}

.status-badge.active {
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.4);
}

.status-badge.revoked {
  color: #fca5a5;
  border-color: rgba(252, 165, 165, 0.4);
}

.usage-badge {
  border-radius: 12px;
  border: 1px solid rgba(16, 20, 44, 0.12);
  padding: 10px 12px;
  font-size: 13px;
  color: var(--muted);
}

.usage-badge.limit-reached {
  border-color: rgba(255, 107, 107, 0.4);
  color: #ff6b6b;
}

.pricing-card .price {
  font-size: 34px;
  font-weight: 600;
}

.pricing-card .price span {
  font-size: 13px;
  margin-left: 4px;
  color: var(--muted-2);
}

.pricing-card ul {
  padding-left: 18px;
  color: var(--muted);
}

.pricing-card li + li { margin-top: 4px; }

.api-contact-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.api-contact-form input,
.api-contact-form textarea {
  border-radius: 12px;
  border: 1px solid rgba(16, 20, 44, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
}

.api-contact-form textarea {
  min-height: 100px;
  resize: vertical;
}

/* MODAL */
.upgrade-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
  padding: 16px;
}

.upgrade-modal.active { display: flex; }

.upgrade-modal-content {
  width: min(460px, 95vw);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: radial-gradient(900px circle at top left, rgba(96, 165, 250, 0.16), transparent 55%),
    rgba(7, 7, 7, 0.96);
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.65);
  color: var(--text);
}

.upgrade-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-upgrade {
  border: none;
  background: rgba(255, 255, 255, 0.06);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.86);
  cursor: pointer;
}

.close-upgrade:hover {
  background: rgba(255, 255, 255, 0.10);
}

.upgrade-modal-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upgrade-modal-body ul {
  margin: 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.78);
}

.upgrade-modal-body p {
  margin: 0;
}

.upgrade-modal-body .ghost-btn,
.upgrade-modal-body .primary-btn {
  white-space: nowrap;
}

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

/* Quickstart */
.quickstart{
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow-2);
  padding: 20px;
}
.quickstart__header h3{ margin: 0 0 6px; }
.quickstart__header p{ margin: 0; color: var(--muted); }
.quickstart__grid{
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.quickstart__card{
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  padding: 14px;
}
.quickstart__card h4{ margin: 0 0 10px; font-size: 14px; }
.codeblock{
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
  font-size: 12.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color: var(--text);
}

/* Atlas console (Postman-ish) */
.atlas-console{
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 540px;
}
.atlas-sidebar{
  border-right: 1px solid var(--border);
  background: #070707;
}
.atlas-sidebar__top{
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.atlas-filter{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.atlas-filter input{
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 10px 12px;
  background: rgba(255,255,255,0.06);
  color: var(--text);
}
.atlas-reset{
  padding: 10px 12px;
  min-width: 42px;
}
.atlas-meta{ margin-top: 12px; }
.atlas-title{ font-weight: 700; letter-spacing: -0.01em; }
.atlas-subtitle{ font-size: 12px; color: var(--muted-2); margin-top: 2px; }
.atlas-tree{ padding: 12px 8px 18px; }
.atlas-tree__label{
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--muted-2);
  padding: 8px 10px;
}
.atlas-group{
  margin: 6px 8px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
}
.atlas-group__head{
  width: 100%;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.06);
  border: none;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}
.atlas-group__head span{ font-weight: 650; }
.atlas-chevron{ color: var(--muted-2); }
.atlas-group__items{ padding: 6px; }
.atlas-item{
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 10px;
  color: var(--text);
}
.atlas-item:hover{ background: rgba(255,255,255,0.06); }
.atlas-item.active{ background: rgba(96,165,250,0.12); }
.atlas-method{
  font-weight: 800;
  color: var(--navy);
  font-size: 12px;
  align-self: start;
}
.atlas-name{ font-weight: 650; }
.atlas-desc{ font-size: 12px; color: var(--muted-2); margin-top: 2px; }

.atlas-main{ padding: 18px; }
.atlas-main__header{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.atlas-op{ font-size: 18px; font-weight: 750; letter-spacing: -0.01em; }
.atlas-op__hint{ font-size: 12px; color: var(--muted-2); margin-top: 4px; }
.atlas-actions{ display:flex; gap: 10px; flex-wrap: wrap; }
.atlas-panels{
  margin-top: 14px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.atlas-panel{
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  overflow: hidden;
  display:flex;
  flex-direction: column;
  min-height: 360px;
}
.atlas-panel__title{
  padding: 12px 14px;
  background: rgba(255,255,255,0.06);
  border-bottom: 1px solid var(--border);
  font-weight: 650;
}
.atlas-textarea{
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  font-size: 12.5px;
  line-height: 1.55;
  background: rgba(0,0,0,0.35);
  color: var(--text);
}
.atlas-response{
  flex: 1;
  margin: 0;
  padding: 12px 14px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  font-size: 12.5px;
  line-height: 1.55;
  background: rgba(0,0,0,0.35);
  color: var(--text);
}
.atlas-panel__foot{
  display:flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted-2);
  background: rgba(255,255,255,0.04);
}

/* INTERACTIVE REFERENCE */
.ref-section {
  border-top: 1px solid var(--border);
  padding-top: 32px;
}

.docs-console {
  border-radius: 28px;
  border: 1px solid var(--border);
  background: #000000;
  min-height: calc(100vh - 120px);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  position: relative;
}

.docs-console rapi-doc{
  display:block;
  height: 100%;
  min-height: inherit;
}

/* Postman-ish console shell */
.docs-console::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius: 28px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
  pointer-events:none;
}

.docs-console rapi-doc {
  width: 100%;
  height: 720px;
  display: block;
}

.api-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: -8px;
}

/* FOOTER */
.dev-footer {
  text-align: center;
  padding: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted-2);
  font-size: 13px;
  margin-top: 32px;
}

.dev-footer .footer-links {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.dev-footer .footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.dev-footer .footer-links a:hover { color: #ffffff; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero { padding-top: 32px; }
  .hero__panel { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .atlas-console{ grid-template-columns: 1fr; }
  .atlas-sidebar{ border-right: none; border-bottom: 1px solid var(--border); }
  .atlas-panels{ grid-template-columns: 1fr; }
}
