/* serve-r design system — dark theme matching adrienbird.net */
:root {
  --bg:      #0a0a0f;
  --surface: #13131a;
  --surface2: #1a1a24;
  --border:  #1e1e2e;
  --cyan:    #00f5ff;
  --green:   #00ff88;
  --pink:    #ff2d78;
  --text:    #e0e0f0;
  --muted:   #555570;
  --yellow:  #ffcc00;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--surface);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--cyan);
}

/* ---------- Typography helpers ---------- */
.cyan  { color: var(--cyan); }
.green { color: var(--green); }
.pink  { color: var(--pink); }

.muted-text { color: var(--muted); font-size: 0.9rem; }

/* ---------- Layout ---------- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  text-decoration: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-link {
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--text); text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s, transform 0.1s;
  text-decoration: none;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--cyan); color: #000; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--muted); }

.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }

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

/* ---------- Landing: Hero ---------- */
.hero {
  padding: 100px 0 80px;
  text-align: center;
}
.hero-inner { max-width: 800px; margin: 0 auto; padding: 0 24px; }

.hero-badge {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 28px;
  letter-spacing: 0.5px;
}

.hero-heading {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

/* ---------- Terminal block ---------- */
.terminal-block {
  background: #080810;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: left;
  max-width: 620px;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.terminal-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.terminal-body {
  padding: 20px 22px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
  min-height: 140px;
}

.terminal-line {
  display: flex;
  gap: 8px;
}
.prompt { color: var(--cyan); }
.cmd    { color: var(--text); }

.terminal-output { margin-top: 8px; }
.terminal-output div { padding: 1px 0; }

.hidden { display: none !important; }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 48px;
  text-align: center;
}

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 768px) {
  .feature-grid { grid-template-columns: 1fr; }
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover {
  border-color: var(--cyan);
  transform: translateY(-3px);
}
.feature-icon {
  font-size: 1.4rem;
  margin-bottom: 12px;
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 0.9rem; }

/* ---------- Steps ---------- */
.steps { display: flex; flex-direction: column; gap: 28px; max-width: 680px; margin: 0 auto; }

.step {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
}
.step-num {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1px;
  min-width: 52px;
  font-family: var(--font-mono);
}
.step-content h3 { margin-bottom: 10px; }

.code-block {
  background: #080810;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--cyan);
  overflow-x: auto;
}

/* ---------- CTA ---------- */
.cta-section { padding: 80px 0; }
.cta-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 64px 40px;
  text-align: center;
}
.cta-inner h2 { font-size: 2rem; margin-bottom: 12px; }
.cta-inner .muted-text { margin-bottom: 28px; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- App layout (dashboard / detail) ---------- */
.main-content { padding: 40px 24px; }
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 6px; }

/* ---------- Deploy table ---------- */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.deploy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.deploy-table th {
  background: var(--surface2);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.deploy-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.deploy-table tr:last-child td { border-bottom: none; }
.deploy-table tr:hover td { background: rgba(255,255,255,0.02); }

.app-name { font-weight: 600; color: var(--text); }
.deploy-url {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  word-break: break-all;
}
.log-link { color: var(--muted); font-size: 0.85rem; }
.log-link:hover { color: var(--text); }

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 40px !important;
  font-size: 0.9rem;
}

/* ---------- Status badges ---------- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.status-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-queued   { color: var(--muted);  background: rgba(85,85,112,0.2); }
.status-building { color: var(--yellow); background: rgba(255,204,0,0.15); animation: pulse 1.4s ease-in-out infinite; }
.status-live     { color: var(--green);  background: rgba(0,255,136,0.12); }
.status-failed   { color: var(--pink);   background: rgba(255,45,120,0.15); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 200;
  backdrop-filter: blur(4px);
}
.modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 201;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 520px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 { font-size: 1.15rem; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 24px; }
.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* ---------- Form ---------- */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.form-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 0.95rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--cyan); }
.form-error {
  color: var(--pink);
  font-size: 0.85rem;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(255,45,120,0.1);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,45,120,0.25);
}

/* ---------- Dropzone ---------- */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 32px 20px;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
  cursor: default;
}
.dropzone.dragover {
  border-color: var(--cyan);
  background: rgba(0,245,255,0.04);
}
.dropzone-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dropzone-icon { font-size: 2rem; color: var(--muted); }
.dropzone p { color: var(--muted); font-size: 0.88rem; }
.dropzone-filename { font-family: var(--font-mono); font-size: 0.82rem; }

/* ---------- Deploy detail page ---------- */
.deploy-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
}
.deploy-app-name { font-size: 1.6rem; font-weight: 700; margin-bottom: 10px; }
.deploy-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }

/* ---------- Log panel ---------- */
.log-panel {
  background: #06060d;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}
.log-panel-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.log-panel-title { font-size: 0.85rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.log-live-dot {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: pulse 1.4s ease-in-out infinite;
}
.log-live-dot.complete { animation: none; color: var(--muted); }

.log-output {
  padding: 16px 20px;
  min-height: 240px;
  max-height: 480px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.log-line {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--green);
  line-height: 1.7;
  padding: 1px 0;
  white-space: pre-wrap;
  word-break: break-all;
}

.back-link { margin-top: 8px; }

/* ---------- Docs section ---------- */
.docs-inner { text-align: center; }

/* ---------- Features section bg ---------- */
.features-section { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- Settings cards (domains + env) ---------- */
.settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: .5rem;
  padding: 1.5rem;
  margin-top: 1.5rem;
}
.settings-title {
  color: var(--text);
  font-size: .95rem;
  font-weight: 600;
  margin: 0 0 1rem;
}
.subdomain-row {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: .375rem;
  padding: .75rem 1rem;
  margin-bottom: 1rem;
}
.subdomain-label { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.subdomain-value { margin: .25rem 0; }
.subdomain-hint { color: var(--muted); font-size: .8rem; }
.add-domain-form { margin-top: 1rem; }
.form-row { display: flex; gap: .5rem; }
.form-hint { color: var(--muted); font-size: .8rem; margin-top: .4rem; }
.form-label {
  display: block;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .5rem;
}
.domain-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .6rem .75rem;
  border: 1px solid var(--border);
  border-radius: .375rem;
  margin-bottom: .4rem;
}
.domain-name { color: var(--text); font-size: .9rem; }
.domain-actions { display: flex; gap: .5rem; align-items: center; }
.domain-status-pending { color: var(--muted);  background: rgba(85,85,112,0.2); }
.domain-status-active  { color: var(--green);  background: rgba(0,255,136,0.12); }
.env-textarea {
  width: 100%;
  font-family: var(--font-mono);
  font-size: .85rem;
  resize: vertical;
  box-sizing: border-box;
}
.env-form-actions { display: flex; align-items: center; gap: 1rem; margin-top: .75rem; }
.env-current {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: .375rem;
  padding: .75rem;
  margin-bottom: 1rem;
  min-height: 3rem;
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--muted);
}
.env-var-row { display: flex; gap: 1rem; padding: .2rem 0; }
.env-key { color: var(--cyan); min-width: 8rem; font-weight: 600; }
.env-val { color: var(--muted); }
.loading-text { color: var(--muted); font-size: .85rem; }
