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

:root {
  --bg: #0b0a10;
  --card: #14121d;
  --card2: #1b1828;
  --border: #2a2540;
  --text: #eae6f5;
  --muted: #9a92b5;
  --accent: #b46bff;
  --accent2: #ff6bd6;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(600px 400px at 20% 10%, rgba(180,107,255,.14), transparent 70%),
    radial-gradient(700px 500px at 80% 30%, rgba(255,107,214,.10), transparent 70%),
    radial-gradient(500px 400px at 50% 90%, rgba(107,160,255,.08), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.nav {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.nav-logo { font-weight: 700; font-size: 18px; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 22px;
  font-size: 15px;
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }

.landing {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 70px 24px 40px;
  text-align: center;
}

.landing-title {
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -1px;
}

.gradient-text {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.landing-sub {
  margin: 28px auto 36px;
  max-width: 720px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}
.landing-sub b { color: var(--text); }

.cta-btn {
  display: inline-block;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  padding: 16px 36px;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(180,107,255,.35);
  transition: transform .15s, box-shadow .15s;
}
.cta-btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 12px 50px rgba(255,107,214,.45); }

.credit {
  margin-top: 22px;
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
}

.find-ticky { margin-top: 80px; }
.find-ticky h2, .features h2 { font-size: 26px; margin-bottom: 24px; }

.contact-cards {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 28px;
  min-width: 200px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform .15s, border-color .15s;
}
.contact-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.contact-label { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }
.contact-value { font-weight: 600; }

.features { margin-top: 80px; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  text-align: left;
}
.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}
.feature b { display: block; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 14px; line-height: 1.5; }

.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--muted);
  padding: 40px 0 30px;
  font-size: 14px;
}

/* ---------- builder page ---------- */

.builder-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 0;
  height: calc(100vh - 61px);
}
@media (max-width: 900px) {
  .builder-layout { grid-template-columns: 1fr; height: auto; }
  .preview-pane { height: 80vh; }
}

.controls-pane {
  overflow-y: auto;
  padding: 22px;
  border-right: 1px solid var(--border);
}

.ctrl-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}
.ctrl-section h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 12px;
}
.ctrl-row { margin-bottom: 10px; }
.ctrl-row label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 5px;
}
.ctrl-row input[type=text], .ctrl-row input[type=url], .ctrl-row textarea, .ctrl-row select {
  width: 100%;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 9px 11px;
  font-size: 14px;
  font-family: inherit;
}
.ctrl-row input:focus, .ctrl-row textarea:focus, .ctrl-row select:focus { outline: none; border-color: var(--accent); }
.ctrl-row input[type=file] {
  width: 100%;
  background: var(--card2);
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  padding: 8px;
  font-size: 13px;
  cursor: pointer;
}
.ctrl-row input[type=file]::file-selector-button {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 5px 12px;
  margin-right: 10px;
  cursor: pointer;
  font-size: 12px;
}
.ctrl-row textarea { resize: vertical; min-height: 56px; }
.ctrl-row input[type=color] {
  width: 44px; height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card2);
  padding: 2px;
  cursor: pointer;
}
.ctrl-row input[type=range] { width: 100%; accent-color: var(--accent); }
.ctrl-inline { display: flex; gap: 10px; align-items: center; }
.ctrl-inline .ctrl-row { flex: 1; }
.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 8px;
  cursor: pointer;
}
.check-row input { accent-color: var(--accent); width: 16px; height: 16px; }

.hint { font-size: 12px; color: var(--muted); line-height: 1.55; margin-top: 4px; }
.hint a { color: var(--accent); }
.hint code {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 11px;
  color: var(--accent2);
  font-family: Consolas, monospace;
}

.link-item {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
}
.link-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.link-item-head b { font-size: 13px; }
.remove-link {
  background: none;
  border: none;
  color: #ff6b8a;
  cursor: pointer;
  font-size: 13px;
}
.small-btn {
  background: var(--card2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
  transition: border-color .15s;
}
.small-btn:hover { border-color: var(--accent); }

.download-btn {
  display: block;
  width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  padding: 14px;
  border-radius: 12px;
  cursor: pointer;
  margin-top: 4px;
  transition: transform .15s;
}
.download-btn:hover { transform: scale(1.02); }

.preview-pane { display: flex; flex-direction: column; }
.preview-bar {
  padding: 10px 18px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.preview-pane iframe {
  flex: 1;
  width: 100%;
  border: none;
  background: #000;
}

/* ---------- tutorial page ---------- */

.tutorial {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 50px 24px 60px;
}
.tutorial h1 { font-size: 40px; margin-bottom: 10px; }
.tutorial .lead { color: var(--muted); font-size: 17px; margin-bottom: 40px; }
.tut-step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  margin-bottom: 20px;
}
.tut-step h2 { font-size: 21px; margin-bottom: 14px; }
.tut-step h2 .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 15px;
  margin-right: 10px;
}
.tut-step p, .tut-step li { color: var(--muted); line-height: 1.7; font-size: 15px; }
.tut-step p b, .tut-step li b { color: var(--text); }
.tut-step ul, .tut-step ol { margin: 10px 0 10px 22px; }
.tut-step li { margin-bottom: 6px; }
.tut-step code {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 13px;
  color: var(--accent2);
  font-family: Consolas, monospace;
}
.tut-step a { color: var(--accent); }
