/* =========================================================
   TheSpaceLaunches · Developer Dashboard — page-specific styles
   Enhances dev-shared.css with deep-space aesthetic, glassmorphism,
   and interactive polish for the 5-panel dashboard.
   Desktop only; no mobile breakpoints.
   ========================================================= */

/* ---- Page header glow accent ---- */
.dev-page__header {
  position: relative;
  padding-bottom: 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(76, 201, 255, 0.08);
}
.dev-page__header::before {
  content: "";
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(76, 201, 255, 0.06), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.dev-page__header > * { position: relative; z-index: 1; }

.dev-page__title {
  text-shadow: 0 0 20px rgba(76, 201, 255, 0.3);
}

/* ---- Sidebar navigation enhancements ---- */
.dev-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
}

.dev-nav__btn {
  position: relative;
  transition: all 0.2s ease;
}
.dev-nav__btn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--accent-blue);
  border-radius: 2px;
  transition: height 0.2s ease;
}
.dev-nav__btn:hover {
  background: rgba(76, 201, 255, 0.04);
  border-color: rgba(76, 201, 255, 0.18);
}
.dev-nav__btn.is-active {
  background: rgba(76, 201, 255, 0.10);
  border-color: rgba(76, 201, 255, 0.40);
  box-shadow: 0 0 16px rgba(76, 201, 255, 0.15), inset 0 0 0 1px rgba(76, 201, 255, 0.08);
}
.dev-nav__btn.is-active::before {
  height: 60%;
}

/* ---- Card enhancements: glassmorphism + hover lift ---- */
.dev-card {
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.dev-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 24px rgba(76, 201, 255, 0.12), inset 0 0 0 1px rgba(76, 201, 255, 0.18);
  border-color: rgba(76, 201, 255, 0.35);
}

.dev-card__header {
  position: relative;
  background: linear-gradient(180deg, rgba(76, 201, 255, 0.03), transparent);
}
.dev-card__header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 18px;
  right: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(76, 201, 255, 0.25), transparent);
}

.dev-card__title {
  font-family: var(--font-display);
  text-shadow: 0 0 12px rgba(76, 201, 255, 0.2);
}

/* ---- Stat cards: metric tiles with glow ---- */
.stat-card {
  position: relative;
  background: rgba(15, 28, 61, 0.55);
  border: 1px solid rgba(76, 201, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  transition: all 0.2s ease;
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(76, 201, 255, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.stat-card:hover {
  border-color: rgba(76, 201, 255, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 20px rgba(76, 201, 255, 0.18);
}
.stat-card:hover::before {
  opacity: 1;
}

.stat-label {
  position: relative;
  z-index: 1;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 10px;
}

.stat-value {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--accent-blue);
  text-shadow: 0 0 16px rgba(76, 201, 255, 0.4);
  letter-spacing: 0.02em;
}

/* ---- Usage bar: enhanced gradient + glow ---- */
.usage-bar {
  position: relative;
  height: 12px;
  border-radius: 6px;
  background: rgba(76, 201, 255, 0.08);
  border: 1px solid rgba(76, 201, 255, 0.15);
  overflow: hidden;
  margin-top: 14px;
}

.usage-bar__fill {
  position: relative;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue-deep), var(--accent-blue), var(--accent-blue-strong));
  border-radius: 5px;
  box-shadow: 0 0 12px rgba(76, 201, 255, 0.6);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.usage-bar__fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent);
  pointer-events: none;
}

/* ---- Table enhancements: row hover + border glow ---- */
.dev-table {
  border-collapse: separate;
  border-spacing: 0;
}
.dev-table thead {
  background: rgba(4, 7, 15, 0.6);
}
.dev-table th {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent-blue);
  padding: 14px 18px;
  border-bottom: 1px solid rgba(76, 201, 255, 0.25);
  position: relative;
}
.dev-table th::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(76, 201, 255, 0.4), transparent);
}
.dev-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(76, 201, 255, 0.08);
  transition: background 0.15s ease;
}
.dev-table tbody tr:hover td {
  background: rgba(76, 201, 255, 0.04);
  border-bottom-color: rgba(76, 201, 255, 0.18);
}
.dev-table tbody tr:last-child td {
  border-bottom: none;
}

/* ---- Tag/badge enhancements ---- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(76, 201, 255, 0.30);
  background: rgba(76, 201, 255, 0.08);
  color: var(--accent-blue);
  transition: all 0.15s ease;
}
.tag:hover {
  background: rgba(76, 201, 255, 0.12);
  border-color: rgba(76, 201, 255, 0.45);
  box-shadow: 0 0 12px rgba(76, 201, 255, 0.2);
}
.tag--default {
  border-color: rgba(76, 201, 255, 0.35);
  background: rgba(76, 201, 255, 0.10);
  color: var(--accent-blue);
}

/* ---- Button enhancements: glow + lift ---- */
.dev-btn {
  position: relative;
  overflow: hidden;
}
.dev-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}
.dev-btn:hover::before {
  width: 300px;
  height: 300px;
}
.dev-btn--primary {
  box-shadow: 0 4px 16px rgba(76, 201, 255, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.dev-btn--primary:hover {
  box-shadow: 0 6px 24px rgba(76, 201, 255, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.dev-btn--ghost {
  border-color: rgba(76, 201, 255, 0.30);
  background: rgba(76, 201, 255, 0.04);
}
.dev-btn--ghost:hover {
  background: rgba(76, 201, 255, 0.08);
  border-color: var(--accent-blue);
  box-shadow: 0 0 16px rgba(76, 201, 255, 0.2);
}

/* ---- Modal enhancements: glassmorphism + border glow ---- */
.dev-modal-overlay {
  background: rgba(2, 5, 12, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.dev-modal {
  border: 1px solid rgba(76, 201, 255, 0.25);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), 0 0 32px rgba(76, 201, 255, 0.15), inset 0 0 0 1px rgba(76, 201, 255, 0.08);
  border-radius: 14px;
}
.dev-modal__header {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(76, 201, 255, 0.12);
}
.dev-modal__title {
  font-family: var(--font-display);
  text-shadow: 0 0 12px rgba(76, 201, 255, 0.25);
}

/* ---- Secret box: dashed border + glow ---- */
.dev-secret {
  position: relative;
  background: rgba(4, 7, 15, 0.75);
  border: 1px dashed rgba(76, 201, 255, 0.35);
  border-radius: 8px;
  padding: 14px 16px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  color: var(--accent-blue);
  word-break: break-all;
}
.dev-secret::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  box-shadow: inset 0 0 12px rgba(76, 201, 255, 0.10);
  pointer-events: none;
}

/* ---- Webhook help: code block polish ---- */
.webhook-help pre {
  background: rgba(4, 7, 15, 0.65);
  border: 1px solid rgba(76, 201, 255, 0.20);
  border-radius: 8px;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-1);
  box-shadow: inset 0 0 12px rgba(76, 201, 255, 0.06);
}
.webhook-help code {
  font-family: "SFMono-Regular", Consolas, monospace;
  color: var(--accent-blue);
}

/* ---- Checkbox group enhancements ---- */
.dev-checkgroup {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px 18px;
  margin-top: 8px;
}
.dev-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-1);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}
.dev-check:hover {
  background: rgba(76, 201, 255, 0.06);
  color: var(--text-0);
}
.dev-check input[type="checkbox"] {
  accent-color: var(--accent-blue);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ---- Empty state enhancements ---- */
.dev-empty {
  padding: 36px 32px;
  text-align: center;
  color: var(--text-2);
  border: 1px dashed rgba(76, 201, 255, 0.25);
  border-radius: 8px;
  background: rgba(4, 7, 15, 0.4);
}

/* ---- Error banner enhancements ---- */
.dev-error {
  background: rgba(255, 92, 122, 0.08);
  border: 1px solid rgba(255, 92, 122, 0.35);
  border-left: 3px solid var(--accent-red);
  border-radius: 8px;
  padding: 12px 16px;
  color: #ff8a9e;
  font-size: 13px;
  line-height: 1.5;
}

/* ---- Input enhancements: focus glow ---- */
.dev-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(76, 201, 255, 0.12), 0 0 16px rgba(76, 201, 255, 0.18);
}

/* ---- Breadcrumb enhancements ---- */
.breadcrumb__list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  font-size: 13px;
}
.breadcrumb__item {
  color: var(--text-2);
}
.breadcrumb__item a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.15s ease;
}
.breadcrumb__item a:hover {
  color: var(--accent-blue);
}
.breadcrumb__item.is-active {
  color: var(--accent-blue);
  font-weight: 600;
}
.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  margin-right: 8px;
  color: var(--text-3);
}

/* ---- Grid helper (subscription panel) ---- */
.grid--2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

/* ---- Chart canvas container ---- */
#usageChart {
  border-radius: 8px;
  background: rgba(4, 7, 15, 0.3);
  border: 1px solid rgba(76, 201, 255, 0.10);
}

/* =========================================================
   API Playground — playground-specific enhancements
   (dashboard styles above cover shared dev-* classes)
   ========================================================= */

/* ---- Playground two-column layout: depth + gutter ---- */
.playground {
  position: relative;
  gap: 28px;
  margin-top: 24px;
}
.playground::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 360px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(76, 201, 255, 0.15) 20%, rgba(76, 201, 255, 0.15) 80%, transparent);
  pointer-events: none;
}

/* ---- Sidebar form panel: subtle background tint ---- */
.playground__sidebar .dev-card {
  background: rgba(15, 28, 61, 0.45);
  border-color: rgba(76, 201, 255, 0.18);
}

/* ---- Select dropdown: glassmorphism + custom arrow ---- */
.dev-select {
  width: 100%;
  padding: 10px 36px 10px 12px;
  background: rgba(4, 7, 15, 0.70);
  border: 1px solid rgba(76, 201, 255, 0.20);
  border-radius: 8px;
  color: var(--text-0);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent-blue) 50%),
    linear-gradient(135deg, var(--accent-blue) 50%, transparent 50%);
  background-position: calc(100% - 18px) center, calc(100% - 12px) center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.dev-select:hover {
  border-color: rgba(76, 201, 255, 0.35);
  background: rgba(4, 7, 15, 0.80);
}
.dev-select:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(76, 201, 255, 0.12), 0 0 16px rgba(76, 201, 255, 0.18);
}

/* ---- Textarea: JSON editor with monospace + line-height ---- */
.dev-textarea {
  min-height: 140px;
  padding: 12px 14px;
  background: rgba(4, 7, 15, 0.75);
  border: 1px solid rgba(76, 201, 255, 0.20);
  border-radius: 8px;
  color: var(--text-1);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dev-textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(76, 201, 255, 0.12), 0 0 16px rgba(76, 201, 255, 0.18);
}

/* ---- Response viewer: status bar + code area ---- */
.response-viewer {
  position: relative;
  background: rgba(4, 7, 15, 0.50);
  border: 1px solid rgba(76, 201, 255, 0.18);
  border-radius: 10px;
  padding: 18px;
  overflow: hidden;
}
.response-viewer::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  box-shadow: inset 0 0 16px rgba(76, 201, 255, 0.06);
  pointer-events: none;
}

.response-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(76, 201, 255, 0.12);
}
.response-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.response-meta strong {
  color: var(--text-0);
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

/* ---- Code block: deep glass + syntax-friendly monospace ---- */
.dev-code {
  position: relative;
  margin: 0;
  padding: 18px 20px;
  background: rgba(2, 5, 12, 0.75);
  border: 1px solid rgba(76, 201, 255, 0.15);
  border-radius: 8px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-1);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: inset 0 0 12px rgba(76, 201, 255, 0.06);
}
.dev-code b,
.dev-code strong {
  color: var(--accent-blue);
  font-weight: 600;
}

/* ---- Snippet tabs: segmented control style ---- */
.snippet-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  background: rgba(4, 7, 15, 0.50);
  border: 1px solid rgba(76, 201, 255, 0.18);
  border-radius: 10px;
  margin-bottom: 14px;
}
.snippet-tab {
  position: relative;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  font-weight: 500;
  transition: all 0.15s ease;
}
.snippet-tab:hover {
  color: var(--text-1);
  background: rgba(76, 201, 255, 0.04);
}
.snippet-tab.is-active {
  color: var(--accent-blue);
  background: rgba(76, 201, 255, 0.10);
  border-color: rgba(76, 201, 255, 0.35);
  box-shadow: 0 0 12px rgba(76, 201, 255, 0.18), inset 0 0 0 1px rgba(76, 201, 255, 0.08);
}

/* ---- API Reference operations list ---- */
.docs-operations {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---- Operation card: collapsible endpoint row ---- */
.op-card {
  border: 1px solid rgba(76, 201, 255, 0.15);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.op-card:hover {
  border-color: rgba(76, 201, 255, 0.30);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), 0 0 16px rgba(76, 201, 255, 0.10);
}

.op-card__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(4, 7, 15, 0.50);
  cursor: pointer;
  transition: background 0.15s ease;
}
.op-card__header:hover {
  background: rgba(4, 7, 15, 0.65);
}

.op-card__method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 6px;
  background: rgba(76, 201, 255, 0.12);
  color: var(--accent-blue);
  border: 1px solid rgba(76, 201, 255, 0.25);
}

.op-card__path {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
  color: var(--text-0);
  flex: 1;
}

.op-card__body {
  display: none;
  padding: 18px;
  border-top: 1px solid rgba(76, 201, 255, 0.12);
  background: rgba(4, 7, 15, 0.35);
}
.op-card.is-open .op-card__body {
  display: block;
}

.op-section-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin: 16px 0 10px;
}
.op-section-title:first-child {
  margin-top: 0;
}

.op-param-grid {
  display: grid;
  grid-template-columns: 140px 90px 1fr;
  gap: 10px 16px;
  font-size: 12px;
  margin-bottom: 14px;
}
.op-param-grid > div {
  padding: 8px 0;
  border-bottom: 1px solid rgba(76, 201, 255, 0.08);
  color: var(--text-1);
}
.op-param-grid > div:first-child {
  color: var(--text-0);
  font-weight: 500;
}

/* ---- Parameter box: dynamic params container ---- */
#pgParamBox {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}
#pgParamBox:empty {
  display: none;
  margin: 0;
}

/* ---- Block button enhancements (Run / Anonymous) ---- */
.dev-btn--block {
  width: 100%;
  margin-top: 12px;
}
#btnRun {
  margin-top: 16px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
