:root {
  color-scheme: dark;
  --bg: #050913;
  --bg-soft: #0b1220;
  --panel: rgba(11, 18, 32, 0.82);
  --panel-strong: rgba(17, 27, 47, 0.96);
  --card: rgba(15, 25, 43, 0.78);
  --card-strong: rgba(24, 37, 62, 0.96);
  --ink: #eff5ff;
  --muted: #8ea0bb;
  --line: rgba(149, 177, 214, 0.16);
  --line-strong: rgba(149, 177, 214, 0.3);
  --primary: #7ce8ff;
  --primary-strong: #1a9dc3;
  --primary-soft: rgba(124, 232, 255, 0.14);
  --accent: #f5be79;
  --accent-soft: rgba(245, 190, 121, 0.16);
  --danger: #ff7373;
  --danger-soft: rgba(255, 115, 115, 0.14);
  --warning: #ffc46b;
  --warning-soft: rgba(255, 196, 107, 0.14);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
  --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Aptos", "Segoe UI Variable Text", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(124, 232, 255, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(245, 190, 121, 0.12), transparent 22%),
    radial-gradient(circle at bottom, rgba(54, 84, 155, 0.22), transparent 34%),
    linear-gradient(180deg, #08101c 0%, #050913 55%, #04070f 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 95%);
  opacity: 0.45;
}

.hidden {
  display: none !important;
}

.layout {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 88px;
}

.desktop-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 8px;
  padding: 22px 24px;
  border: 1px solid rgba(124, 232, 255, 0.16);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(8, 17, 30, 0.92), rgba(17, 37, 61, 0.9)),
    radial-gradient(circle at top right, rgba(124, 232, 255, 0.12), transparent 30%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.desktop-shell__brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.desktop-shell__logo {
  width: 220px;
  max-width: 42vw;
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.28));
}

.desktop-shell__title {
  margin: 0 0 6px;
  font-size: 1.35rem;
}

.hero {
  position: relative;
  overflow: hidden;
  margin-top: 22px;
  padding: 38px 40px 86px;
  border: 1px solid rgba(124, 232, 255, 0.12);
  border-radius: 36px;
  background:
    radial-gradient(circle at top right, rgba(124, 232, 255, 0.16), transparent 26%),
    radial-gradient(circle at bottom left, rgba(245, 190, 121, 0.12), transparent 24%),
    linear-gradient(145deg, rgba(9, 15, 26, 0.9), rgba(12, 21, 37, 0.96));
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -40px -80px auto;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(124, 232, 255, 0.14), transparent 68%);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  max-width: 8ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 6.4vw, 5.1rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 8px;
  font-size: 1.55rem;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.intro {
  max-width: 820px;
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--muted);
}

.hero-pills,
.quick-links,
.actions,
.card-actions,
.site-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-pills {
  margin-top: 24px;
}

.hero-pills span,
.fact-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 999px;
  border: 1px solid rgba(124, 232, 255, 0.16);
  background: rgba(10, 20, 35, 0.7);
  color: #d7f9ff;
  font-size: 0.92rem;
  font-weight: 600;
  backdrop-filter: blur(14px);
}

.panel {
  margin-top: 26px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(17, 26, 45, 0.92), rgba(9, 16, 28, 0.92)),
    var(--panel);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.panel-tight {
  margin-top: 0;
  height: 100%;
}

.auth-panel {
  position: relative;
  z-index: 2;
  max-width: 560px;
  margin: -54px 0 0 auto;
}

#app-shell {
  position: relative;
  z-index: 2;
  margin-top: -54px;
}

.app-head,
.section-head,
.highlight-card__head,
.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.stack-form {
  display: grid;
  gap: 16px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(19, 31, 52, 0.95), rgba(9, 16, 29, 0.94)),
    var(--card-strong);
  box-shadow: var(--shadow-soft);
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -40px auto;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(124, 232, 255, 0.1), transparent 70%);
}

.stat-card--runtime::after {
  background: radial-gradient(circle, rgba(245, 190, 121, 0.16), transparent 68%);
}

.stat-label {
  margin-bottom: 14px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.stat-value {
  display: block;
  margin-bottom: 10px;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
}

.stat-value--small {
  font-size: clamp(1rem, 3vw, 1.15rem);
  line-height: 1.55;
  word-break: break-word;
}

.stat-copy,
.muted {
  color: var(--muted);
}

.workspace-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 16px;
  margin-top: 28px;
}

.overview-highlights {
  display: grid;
  gap: 12px;
}

.highlight-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(17, 27, 46, 0.92), rgba(11, 18, 31, 0.92)),
    var(--card);
}

.highlight-card[data-state="running"] {
  border-color: rgba(124, 232, 255, 0.22);
}

.highlight-card[data-state="pending"] {
  border-color: rgba(255, 196, 107, 0.26);
}

.highlight-card[data-state="error"] {
  border-color: rgba(255, 115, 115, 0.28);
}

.form-panel {
  overflow: hidden;
}

.site-form,
.site-form__grid {
  display: grid;
  gap: 16px;
}

.site-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.site-form__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-section {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(15, 23, 39, 0.86), rgba(10, 16, 28, 0.82)),
    var(--card);
}

.form-section__head {
  margin-bottom: 14px;
}

.full-width {
  grid-column: 1 / -1;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
}

.checkbox-row {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.checkbox-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(7, 14, 24, 0.42);
}

.checkbox-row input {
  width: auto;
}

input,
button,
code,
pre {
  font: inherit;
}

input {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid rgba(149, 177, 214, 0.2);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(8, 14, 25, 0.9);
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease, background 120ms ease;
}

input::placeholder {
  color: #72809a;
}

input:focus {
  outline: none;
  border-color: rgba(124, 232, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(124, 232, 255, 0.12);
  background: rgba(10, 18, 32, 0.98);
}

button {
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  color: #041019;
  font-weight: 700;
  background: linear-gradient(135deg, #8cf0ff, #54bfe4);
  transition: transform 120ms ease, opacity 120ms ease, background 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
  box-shadow: 0 14px 32px rgba(84, 191, 228, 0.24);
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

button.secondary,
button.ghost {
  color: var(--ink);
  box-shadow: none;
}

button.secondary {
  border-color: rgba(149, 177, 214, 0.14);
  background: rgba(20, 30, 49, 0.96);
}

button.ghost {
  border-color: rgba(124, 232, 255, 0.16);
  background: rgba(11, 18, 31, 0.62);
}

button.danger {
  color: #fff1f1;
  background: linear-gradient(135deg, #d84e4e, #b92626);
  box-shadow: 0 14px 30px rgba(185, 38, 38, 0.22);
}

.status-banner {
  margin-top: 20px;
  padding: 15px 18px;
  border-radius: 18px;
  font-weight: 700;
  border: 1px solid transparent;
}

.status-banner.hidden {
  display: none !important;
}

.status-banner.success {
  border-color: rgba(124, 232, 255, 0.14);
  background: rgba(10, 28, 39, 0.86);
  color: #d2f8ff;
}

.status-banner.error {
  border-color: rgba(255, 115, 115, 0.16);
  background: rgba(44, 12, 17, 0.9);
  color: #ffb6b6;
}

.site-list {
  display: grid;
  gap: 18px;
}

.site-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(17, 27, 46, 0.96), rgba(9, 16, 29, 0.94)),
    var(--card-strong);
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
  box-shadow: var(--shadow-soft);
}

.site-card[data-state="running"] {
  border-color: rgba(124, 232, 255, 0.2);
}

.site-card[data-state="pending"] {
  border-color: rgba(255, 196, 107, 0.22);
}

.site-card[data-state="error"] {
  border-color: rgba(255, 115, 115, 0.24);
}

.site-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.26);
}

.site-name {
  margin-bottom: 6px;
  font-size: 1.3rem;
}

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

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid rgba(124, 232, 255, 0.14);
  background: rgba(10, 27, 38, 0.82);
  color: #d1f7ff;
  font-size: 0.85rem;
  font-weight: 700;
}

.status-badge[data-state="pending"] {
  border-color: rgba(255, 196, 107, 0.14);
  background: rgba(44, 30, 6, 0.82);
  color: #ffd38d;
}

.status-badge[data-state="error"] {
  border-color: rgba(255, 115, 115, 0.18);
  background: rgba(46, 13, 18, 0.84);
  color: #ffb0b0;
}

.site-facts {
  margin-bottom: 14px;
}

.site-details {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px 14px;
  margin: 0 0 18px;
}

.site-details dt {
  font-weight: 700;
  color: #dbe6f6;
}

.site-details dd {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.log-viewer {
  position: sticky;
  bottom: 16px;
  z-index: 10;
}

.log-output {
  margin: 18px 0 0;
  min-height: 280px;
  max-height: 58vh;
  overflow: auto;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(124, 232, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(5, 11, 21, 0.98), rgba(10, 17, 29, 0.98)),
    radial-gradient(circle at top right, rgba(89, 214, 255, 0.08), transparent 32%);
  color: #dff7ff;
  font-family: Consolas, "Cascadia Code", monospace;
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.empty-state {
  margin: 0;
  padding: 22px;
  border-radius: 20px;
  border: 1px dashed var(--line-strong);
  background: rgba(9, 16, 29, 0.64);
  color: var(--muted);
}

code {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(124, 232, 255, 0.1);
  color: #d2f8ff;
}

@media (max-width: 980px) {
  .stats-grid,
  .workspace-grid,
  .site-form,
  .site-form__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .desktop-shell,
  .desktop-shell__brand,
  .app-head,
  .section-head,
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .layout {
    width: min(100% - 20px, 1240px);
    padding-top: 20px;
  }

  .hero {
    padding: 30px 24px 34px;
  }

  .panel {
    padding: 18px;
    border-radius: 22px;
  }

  .auth-panel,
  #app-shell {
    margin-top: 24px;
  }

  .stats-grid,
  .workspace-grid,
  .site-form,
  .site-form__grid,
  .site-details {
    grid-template-columns: 1fr;
  }

  .desktop-shell__logo {
    width: 180px;
  }
}
