:root {
  --bg: #0b1020;
  --bg-soft: #111a2d;
  --panel: rgba(17, 26, 45, 0.78);
  --panel-strong: #121a2e;
  --card: #f4f7ff;
  --card-2: #eef3ff;
  --text: #eaf1ff;
  --muted: #9aaad0;
  --primary: #7c6cff;
  --primary-dark: #5d52d6;
  --secondary: #7ce8d2;
  --purple-soft: rgba(124, 108, 255, 0.15);
  --green-soft: rgba(124, 232, 210, 0.12);
  --shadow: 0 30px 60px rgba(8, 12, 24, 0.45);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(124, 108, 255, 0.26), transparent 34%),
    radial-gradient(circle at right, rgba(124, 232, 210, 0.15), transparent 28%),
    var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
}

.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 28px 80px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(12, 17, 29, 0.7);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 16px;
  z-index: 10;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #9d8dff);
  box-shadow: 0 14px 30px rgba(124, 108, 255, 0.35);
}

.nav {
  display: flex;
  gap: 28px;
  font-size: 0.95rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.header-actions {
  display: flex;
  gap: 12px;
}

.btn {
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #9a89ff);
  color: white;
  box-shadow: 0 16px 28px rgba(124, 108, 255, 0.35);
}

.btn-secondary,
.btn-light {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-large {
  padding: 16px 24px;
  font-size: 1rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 42px;
  align-items: center;
  padding: 60px 6px 32px;
}

.badge {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(124, 108, 255, 0.12);
  color: #d8d2ff;
  border: 1px solid rgba(124, 108, 255, 0.24);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 18px 0 14px;
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 620px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
}

.trust-row {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

.trust-row div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trust-row strong {
  font-size: 1.2rem;
}

.trust-row span {
  color: var(--muted);
  font-size: 0.85rem;
}

.signup-card {
  background: rgba(18, 26, 46, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: #edf3ff;
  font-weight: 600;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--secondary);
  box-shadow: 0 0 0 6px rgba(124, 232, 210, 0.12);
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.signup-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.signup-form input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 14px;
  color: var(--text);
}

.full-width {
  width: 100%;
  margin-top: 8px;
}

.mini-logos {
  margin-top: 22px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  opacity: 0.75;
  font-weight: 600;
}

.features {
  padding-top: 48px;
}

.section-title {
  text-align: center;
  margin-bottom: 28px;
}

.section-title span,
.section-tag {
  color: #d3dffc;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.section-title h2,
.dashboard-header h2 {
  margin-top: 12px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.06em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  padding: 22px 20px 18px;
  border-radius: 20px;
  background: rgba(17, 26, 45, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.feature-card h3 {
  margin: 18px 0 10px;
  font-size: 1.3rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 1.2rem;
  font-weight: 700;
}

.icon.purple {
  background: var(--purple-soft);
  color: #d3cfff;
}

.icon.blue {
  background: rgba(121, 176, 255, 0.14);
  color: #cfe4ff;
}

.icon.green {
  background: var(--green-soft);
  color: #c7f5ea;
}

.dashboard {
  padding-top: 64px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 22px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 220px 1.1fr 1.1fr;
  gap: 20px;
}

.stats-panel,
.chat-panel,
.preview-panel {
  background: rgba(17, 26, 45, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 18px;
}

.stats-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 18px 14px;
  display: grid;
  gap: 8px;
}

.stat-card.accent {
  background: linear-gradient(180deg, rgba(124, 108, 255, 0.3), rgba(124, 108, 255, 0.08));
}

.stat-card span,
.stat-card small {
  color: var(--muted);
}

.stat-card strong {
  font-size: 2rem;
  line-height: 1;
}

.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 18px;
}

.panel-top h3 {
  margin: 0;
  font-size: 1.2rem;
}

.online,
.badge-soft {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(124, 232, 210, 0.12);
  color: #dffef7;
  font-size: 0.78rem;
}

.chat-box {
  background: rgba(12, 17, 29, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 14px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message {
  display: flex;
}

.message.user {
  justify-content: flex-end;
}

.bubble {
  max-width: 80%;
  padding: 12px 14px;
  border-radius: 14px;
  line-height: 1.5;
}

.message.ai .bubble {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.message.user .bubble {
  background: linear-gradient(135deg, var(--primary), #8f7fff);
  color: white;
}

.chat-input-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.chat-input-row input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
}

.preview-window {
  background: #f6f8ff;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(138, 155, 187, 0.35);
}

.browser-bar {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  background: #edf1fb;
}

.browser-bar span {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
}

.browser-bar span:nth-child(1) { background: #ff6a6a; }
.browser-bar span:nth-child(2) { background: #ffd166; }
.browser-bar span:nth-child(3) { background: #7ce8d2; }

.site-preview {
  width: 100%;
  height: 700px;
  border: none;
  background: white;
  display: block;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  color: #1d2d4d;
  margin-bottom: 18px;
}

.preview-header nav {
  display: flex;
  gap: 14px;
  font-size: 0.75rem;
  color: #4b5b7d;
}

.preview-hero {
  background: linear-gradient(135deg, #eff3ff, #dfe8ff);
  border-radius: 16px;
  padding: 20px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preview-hero p {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.66rem;
  color: #586a96;
}

.preview-hero h4 {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 2.1rem);
  line-height: 1.1;
}

.preview-hero button {
  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #1d2d4d, #2a426e);
  color: white;
  font-weight: 700;
}

.preview-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.preview-cards div {
  background: linear-gradient(180deg, #f3f7ff, #e4ebff);
  border-radius: 12px;
  height: 82px;
}

.cta-strip {
  margin-top: 56px;
  background: linear-gradient(135deg, rgba(124, 108, 255, 0.2), rgba(124, 232, 210, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 26px;
  padding: 34px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.cta-strip span {
  color: #d4d2ff;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cta-strip h3 {
  margin: 12px 0 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.06em;
}

@media (max-width: 980px) {
  .hero,
  .dashboard-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    display: none;
  }

  .topbar {
    flex-wrap: wrap;
    gap: 12px;
  }

  .dashboard-header,
  .cta-strip {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 16px 16px 56px;
  }

  .hero {
    padding-top: 28px;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions .btn {
    flex: 1;
  }

  .hero-actions {
    flex-direction: column;
  }

  .chat-input-row {
    flex-direction: column;
  }
}
#projectsList {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 18px 0;
}

.project-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.project-card .btn:first-child {
  flex: 1;
  text-align: left;
}

.project-card .btn:last-child {
  border-color: rgba(255, 90, 90, 0.45);
}

.usage-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  line-height: 1.6;
}

.usage-panel span { color: var(--muted); }
.btn:disabled { cursor: not-allowed; opacity: 0.6; transform: none; }

.publish-dialog {
  width: min(560px, calc(100% - 32px));
  padding: 32px;
  border: 1px solid rgba(124, 108, 255, 0.4);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #19213b, var(--panel-strong));
  color: var(--text);
  box-shadow: var(--shadow);
}
.publish-dialog::backdrop { background: rgba(4, 8, 20, 0.78); backdrop-filter: blur(6px); }
.publish-success-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.14);
  color: #4ade80;
  font-size: 32px;
}
.publish-dialog h2 { margin: 20px 0 12px; }
.publish-dialog p { color: var(--muted); line-height: 1.6; }
.published-site-link { display: block; color: #b6adff; overflow-wrap: anywhere; margin: 20px 0; }
.publish-dialog-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.publish-dialog-actions a { text-decoration: none; }
.publish-dialog :focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }
#publishCopyStatus { margin-bottom: 0; }
#publishCopyStatus:empty { display: none; }
