:root {
  --bg: #eef1f6;
  --panel: #ffffff;
  --text: #13182d;
  --muted: #5f6981;
  --line: #d9dfec;
  --brand: #3159d8;
  --brand2: #6d38d8;
  --shadow: 0 18px 45px rgba(20, 28, 60, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex; gap: 16px; align-items: center; justify-content: space-between;
  padding: 14px 22px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; color: white; font-weight: 700;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
}
.brand-name { font-size: 1.55rem; font-weight: 800; }
.brand-sub { color: var(--muted); font-size: .9rem; }
.nav-scroll { display: flex; gap: 8px; overflow-x: auto; white-space: nowrap; }
.nav-scroll a {
  color: var(--muted); text-decoration: none; padding: 10px 14px; border-radius: 999px;
}
.nav-scroll a:hover { background: #eef2ff; color: var(--brand); }
.main-wrap { max-width: 1380px; margin: 0 auto; padding: 24px; }
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow);
}
.hero {
  display: grid; grid-template-columns: 1.25fr .85fr; gap: 28px; padding: 38px; margin-bottom: 22px;
}
.pill {
  display: inline-block; padding: 8px 14px; border-radius: 999px; background: #eef4ff; color: var(--brand);
  font-weight: 700; font-size: .95rem; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(2.4rem, 6vw, 5rem); line-height: .98; margin: 0 0 18px; }
.hero p { color: var(--muted); font-size: 1.15rem; line-height: 1.55; margin: 0 0 20px; }
.hero-actions, .button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.button {
  border: 1px solid transparent; background: #fff; color: var(--text); padding: 12px 18px; cursor: pointer;
  border-radius: 14px; text-decoration: none; font-weight: 700; font-size: 1rem;
}
.button.primary { background: var(--brand); color: white; }
.button.secondary { border-color: var(--line); }
.tool-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; align-content: start; }
.tool-card {
  border: 1px solid var(--line); border-radius: 18px; padding: 18px; background: #fbfcff;
}
.tool-card strong { display: block; margin-bottom: 8px; font-size: 1.1rem; }
.tool-card span { color: var(--muted); line-height: 1.4; display: block; }
.tool-section { padding: 24px; margin-bottom: 20px; }
.section-head { display: flex; gap: 20px; align-items: start; justify-content: space-between; margin-bottom: 18px; }
.section-head h2 { margin: 0; font-size: 2rem; }
.section-head p { margin: 4px 0 0; color: var(--muted); max-width: 760px; }
.tool-layout { display: grid; grid-template-columns: 340px 1fr; gap: 22px; }
.controls { display: grid; gap: 12px; align-content: start; }
label { display: grid; gap: 8px; font-weight: 700; }
input, textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: 14px; background: white; color: var(--text);
  padding: 12px 14px; font: inherit;
}
textarea { min-height: 92px; resize: vertical; }
input[type="range"] { padding: 0; }
.helper { color: var(--muted); font-size: .94rem; line-height: 1.45; margin: 0; }
.preview-stack { display: grid; gap: 16px; align-content: start; }
.canvas-frame {
  width: 100%; background: linear-gradient(180deg,#f8fbff,#eef3f9); border-radius: 22px; border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.result-box {
  min-height: 180px; background: #081633; color: #ffffff; border-radius: 18px; padding: 16px; overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: .93rem;
}
.result-box.tall { min-height: 260px; }
.footer { padding: 30px 24px 60px; text-align: center; color: var(--muted); }
@media (max-width: 1050px) {
  .hero, .tool-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .site-header { padding: 12px 14px; align-items: start; flex-direction: column; }
  .main-wrap { padding: 14px; }
  .hero { padding: 22px; }
  .tool-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; }
}
