:root {
  --bg: #121416;
  --bg2: #1a1d1d;
  --panel: #1b1f1e;
  --panel-hover: #222725;
  --border: rgba(226,211,181,.14);
  --border-hover: rgba(226,211,181,.28);
  --text: #f1eee7;
  --muted: #aaa69b;
  --dim: #77766f;
  --blue: #d6b27a;
  --green: #9bb889;
  --red: #d48776;
  --yellow: #d6b27a;
  --shadow: 0 25px 80px rgba(0,0,0,.28);
  --radius: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgba(18,20,22,.94);
  backdrop-filter: blur(14px);
}
.topbar-inner {
  width: min(1120px, calc(100% - 40px));
  margin: auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 750;
  letter-spacing: -.02em;
}
.brand img { width: 29px; height: 29px; border-radius: 8px; }

.nav { display: flex; align-items: center; gap: 5px; }
.nav a, .nav-button {
  color: var(--muted);
  text-decoration: none;
  border: 0;
  background: transparent;
  padding: 8px 11px;
  border-radius: 8px;
}
.nav a:hover, .nav-button:hover, .nav a.active { color: var(--text); background: rgba(255,255,255,.045); }
.nav-cta { color: var(--bg) !important; background: var(--blue) !important; font-weight: 700; }
.nav-form { margin: 0; }

.shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 54px 0 70px; }
.hero-shell { padding-top: 100px; }
.hero { max-width: 760px; }
.eyebrow {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  margin-bottom: 13px;
}
.hero h1, .page-head h1, .auth-card h1, .status-card h1 {
  margin: 0;
  letter-spacing: -.055em;
  line-height: 1.03;
}
.hero h1 { font-size: clamp(52px, 8vw, 92px); }
.hero h1 span { color: var(--muted); }
.hero p {
  color: var(--muted);
  max-width: 610px;
  font-size: 18px;
  margin: 22px 0 28px;
}
.hero-actions { display: flex; gap: 10px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 0 15px;
  text-decoration: none;
  font-weight: 700;
  transition: .16s ease;
}
.button.primary { background: var(--blue); color: #171716; }
.button.primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.button.secondary { background: transparent; border-color: var(--border); color: var(--text); }
.button.secondary:hover { border-color: var(--border-hover); background: rgba(255,255,255,.035); }
.button.small { min-height: 34px; padding: 0 11px; font-size: 13px; }
.button.danger { border-color: rgba(212,135,118,.25); color: var(--red); background: transparent; }
.full { width: 100%; }

.feature-row {
  margin-top: 95px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.feature { padding: 24px 24px 24px 0; }
.feature + .feature { border-left: 1px solid var(--border); padding-left: 24px; }
.feature strong { display: block; margin-bottom: 6px; }
.feature span { color: var(--muted); font-size: 14px; }

.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.page-head h1 { font-size: clamp(36px, 5vw, 56px); }
.muted { color: var(--muted); }
.page-head p { margin: 10px 0 0; max-width: 650px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.create-panel { padding: 25px; }
.panel-head h2, .docs-card h2 { margin: 0; letter-spacing: -.025em; }
.panel-head p { color: var(--muted); margin: 5px 0 0; }

.create-form {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1.2fr .8fr .8fr;
  gap: 17px;
}
.create-form .wide { grid-column: 1 / -1; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 650; }
input, select {
  width: 100%;
  height: 43px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: 0;
  padding: 0 12px;
  background: #151817;
  color: var(--text);
}
input:focus, select:focus { border-color: rgba(214,178,122,.55); box-shadow: 0 0 0 3px rgba(214,178,122,.08); }
small, .optional { color: var(--dim); font-weight: 400; }
.form-submit { display: flex; align-items: center; gap: 12px; }
.form-message { color: var(--muted); font-size: 13px; }
.form-message.success { color: var(--green); }
.error-text { color: var(--red); }

.list-section { margin-top: 42px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-title h2 { margin: 0; font-size: 17px; }
.section-title span { color: var(--dim); font-size: 13px; }

.links-table { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.link-row {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr .45fr .85fr .7fr;
  gap: 18px;
  align-items: center;
  min-height: 72px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.link-row:first-child { border-top: 0; }
.table-head { min-height: 44px; background: #171a19; color: var(--dim); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.short-cell { min-width: 0; display: flex; gap: 9px; align-items: center; }
.short-cell a { color: var(--blue); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-button {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--dim);
  font-size: 12px;
  padding: 3px;
}
.copy-button:hover { color: var(--text); }
.destination { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.number { font-variant-numeric: tabular-nums; }
.expires { color: var(--muted); font-size: 13px; }
.expires.expired { color: var(--red); }
.row-actions { display: flex; justify-content: flex-end; gap: 10px; }
.row-actions a, .row-actions button {
  color: var(--muted);
  text-decoration: none;
  border: 0;
  background: transparent;
  padding: 4px 0;
  font-size: 13px;
}
.row-actions a:hover, .row-actions button:hover { color: var(--text); }

.empty {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 35px;
  display: grid;
  gap: 3px;
  text-align: center;
  color: var(--muted);
}
.empty strong { color: var(--text); }
.empty.compact { padding: 20px; }

.zentrax-card {
  margin-top: 25px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  background: #171a19;
}
.zentrax-card:hover { border-color: var(--border-hover); background: var(--panel-hover); }
.zentrax-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--blue);
  color: var(--bg);
  font-weight: 900;
}
.zentrax-card strong, .zentrax-card span { display: block; }
.zentrax-card span { color: var(--muted); font-size: 13px; }

.auth-shell, .status-shell { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 50px 20px; }
.auth-card, .status-card { width: min(430px, 100%); }
.auth-card h1, .status-card h1 { font-size: 45px; }
.auth-card .muted { margin: 12px 0 25px; }
.form { display: grid; gap: 17px; }
.auth-switch { color: var(--muted); text-align: center; font-size: 14px; }
.auth-switch a { color: var(--blue); }
.alert { border-radius: 8px; padding: 11px 13px; margin-bottom: 17px; font-size: 14px; }
.alert.error { color: #f0c0b5; background: rgba(212,135,118,.09); border: 1px solid rgba(212,135,118,.2); }

.status-card { text-align: center; }
.status-code { color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .15em; margin-bottom: 10px; }
.status-card p { color: var(--muted); margin: 12px 0 24px; }

.inline-form { display: flex; gap: 10px; margin-top: 20px; }
.inline-form input { flex: 1; }

.domain-list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.domain-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 17px; border-top: 1px solid var(--border); }
.domain-row:first-child { border-top: 0; }
.domain-row strong, .domain-row span { display: block; }
.domain-row span { color: var(--dim); font-size: 12px; margin-top: 3px; }
.domain-status { display: flex; align-items: center; gap: 13px; }
.domain-status form { margin: 0; }
.status { font-weight: 700 !important; }
.status.on { color: var(--green) !important; }
.status.off { color: var(--red) !important; }

.docs-shell { padding-bottom: 90px; }
.docs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.docs-card { padding: 24px; }
.docs-card p { color: var(--muted); }
pre {
  margin: 16px 0;
  padding: 16px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #111313;
  color: #ddd8cc;
  font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.endpoint-list { border-top: 1px solid var(--border); }
.endpoint-list div { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.endpoint-list code { color: var(--blue); }
.endpoint-list span { color: var(--muted); text-align: right; }

.footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 25px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--dim);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0,0,0,.62);
}
.modal.hidden { display: none; }
.modal-card {
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 25px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.modal-head { display: flex; justify-content: space-between; gap: 20px; }
.modal-head h2 { margin: 0; }
.icon-button { border: 0; background: transparent; color: var(--muted); font-size: 28px; line-height: 1; }
.api-key-create { display: flex; gap: 9px; }
.new-key {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid rgba(155,184,137,.25);
  border-radius: 8px;
  background: rgba(155,184,137,.07);
  color: var(--green);
  font: 12px ui-monospace, monospace;
  word-break: break-all;
}
.key-list { margin-top: 18px; }
.key-row { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 13px 0; border-top: 1px solid var(--border); }
.key-row strong, .key-row span { display: block; }
.key-row span { color: var(--dim); font-size: 12px; }

@media (max-width: 850px) {
  .feature-row { grid-template-columns: 1fr; }
  .feature + .feature { border-left: 0; border-top: 1px solid var(--border); padding-left: 0; }
  .create-form { grid-template-columns: 1fr 1fr; }
  .docs-grid { grid-template-columns: 1fr; }
  .links-table { border: 0; }
  .table-head { display: none; }
  .link-row { grid-template-columns: 1fr auto; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 9px; padding: 15px; }
  .destination { grid-column: 1 / -1; }
  .number, .expires { font-size: 12px; }
}

@media (max-width: 620px) {
  .topbar-inner { width: min(100% - 24px, 1120px); }
  .nav a:not(.nav-cta), .nav-button { padding: 7px; }
  .shell { width: min(100% - 24px, 1120px); padding-top: 35px; }
  .hero-shell { padding-top: 60px; }
  .hero h1 { font-size: 54px; }
  .hero-actions { flex-direction: column; }
  .feature-row { margin-top: 65px; }
  .create-form { grid-template-columns: 1fr; }
  .create-form .wide { grid-column: auto; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .inline-form { flex-direction: column; }
  .domain-row { align-items: flex-start; flex-direction: column; }
  .domain-status { width: 100%; justify-content: space-between; }
  .api-key-create { flex-direction: column; }
  .footer { width: min(100% - 24px, 1120px); }
}


.docs-hero { padding: 30px 0 45px; border-bottom: 1px solid var(--border); }
.docs-hero h1 { margin: 0; font-size: clamp(42px, 6vw, 68px); letter-spacing: -.055em; line-height: 1.02; }
.docs-hero > p { max-width: 690px; color: var(--muted); font-size: 17px; margin: 15px 0 20px; }
.docs-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--dim); font-size: 12px; }
.docs-meta code { padding: 7px 9px; border: 1px solid var(--border); border-radius: 7px; background: #151817; color: var(--blue); }
.docs-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 45px; padding-top: 40px; }
.docs-nav { position: sticky; top: 100px; align-self: start; display: grid; gap: 3px; }
.docs-nav a { color: var(--muted); text-decoration: none; padding: 7px 9px; border-left: 1px solid transparent; font-size: 13px; }
.docs-nav a:hover { color: var(--text); border-left-color: var(--blue); }
.docs-content { min-width: 0; }
.docs-section { padding: 0 0 55px; margin-bottom: 50px; border-bottom: 1px solid var(--border); scroll-margin-top: 100px; }
.docs-section:last-child { border-bottom: 0; }
.docs-label { color: var(--blue); font: 700 11px ui-monospace, monospace; letter-spacing: .1em; margin-bottom: 8px; }
.docs-section h2 { margin: 0 0 10px; font-size: 28px; letter-spacing: -.035em; }
.docs-section h3 { margin: 25px 0 10px; font-size: 14px; }
.docs-section p { color: var(--muted); }
.endpoint { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.endpoint code { font: 700 13px ui-monospace, monospace; }
.method { display: inline-flex; min-width: 57px; justify-content: center; padding: 4px 7px; border-radius: 5px; font: 800 10px ui-monospace, monospace; letter-spacing: .05em; }
.method.get { background: rgba(155,184,137,.1); color: var(--green); }
.method.post { background: rgba(214,178,122,.1); color: var(--blue); }
.method.patch { background: rgba(214,178,122,.1); color: var(--yellow); }
.method.delete { background: rgba(212,135,118,.1); color: var(--red); }
.docs-section pre { margin: 15px 0; }
.note { padding: 12px 14px; border-left: 2px solid var(--blue); background: rgba(214,178,122,.045); color: var(--muted); font-size: 13px; }
.param-table { border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.param-table > div { display: grid; grid-template-columns: 150px 1fr; column-gap: 18px; padding: 13px 14px; border-top: 1px solid var(--border); }
.param-table > div:first-child { border-top: 0; }
.param-table code { color: var(--blue); }
.param-table span { color: var(--dim); font-size: 12px; }
.param-table p { grid-column: 1 / -1; margin: 5px 0 0; font-size: 13px; }
.error-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.error-grid code { padding: 7px 9px; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); background: #151817; font-size: 12px; }

@media (max-width: 760px) {
  .docs-layout { grid-template-columns: 1fr; gap: 20px; }
  .docs-nav { position: static; display: flex; flex-wrap: wrap; gap: 3px; border-bottom: 1px solid var(--border); padding-bottom: 15px; }
  .docs-nav a { border-left: 0; border-bottom: 1px solid transparent; }
  .docs-nav a:hover { border-left: 0; border-bottom-color: var(--blue); }
  .param-table > div { grid-template-columns: 1fr; gap: 3px; }
}
