
:root {
  --bg: #0b1020;
  --panel: rgba(14, 22, 42, 0.9);
  --panel-2: rgba(20, 31, 59, 0.9);
  --line: rgba(255,255,255,0.1);
  --text: #f3f6ff;
  --muted: #9fb0d6;
  --accent: #7c9cff;
  --accent-2: #4de0c1;
  --shadow: 0 24px 80px rgba(0,0,0,0.38);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(90, 120, 255, 0.18), transparent 35%),
    radial-gradient(circle at 80% 0%, rgba(77, 224, 193, 0.18), transparent 35%),
    linear-gradient(180deg, #08101f 0%, #10162a 100%);
  color: var(--text);
}
button, input, select { font: inherit; }
.app-shell {
  max-width: 1520px;
  margin: 0 auto;
  padding: 24px 20px 32px;
}
.hero {
  display: grid;
  grid-template-columns: 1.2fr auto;
  gap: 18px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(17,26,49,.95), rgba(12,18,33,.95));
  box-shadow: var(--shadow);
}
.brand {
  display: flex; gap: 14px; align-items: center;
}
.brand-badge {
  width: 58px; height: 58px; border-radius: 18px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #7c9cff, #4de0c1);
  box-shadow: 0 16px 40px rgba(61, 112, 255, 0.28);
}
.brand-badge svg { width: 34px; height: 34px; color: #0d1430; }
.hero h1 { margin: 0 0 8px; font-size: 2rem; line-height: 1.05; }
.hero p { margin: 0; color: var(--muted); max-width: 760px; }
.hero-meta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; align-items: start; }
.pill {
  padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.04); color: var(--muted); font-size: .95rem;
}
.main-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr) 370px;
  gap: 18px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-header {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
}
.panel-header h2 { margin: 0; font-size: 1rem; }
.panel-header p { margin: 6px 0 0; color: var(--muted); font-size: .92rem; }
.controls { padding: 16px 18px 18px; display: grid; gap: 14px; }
.field { display: grid; gap: 8px; }
.field label { color: var(--muted); font-size: .9rem; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.row-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
input[type="text"], input[type="number"], select {
  width: 100%; padding: 12px 12px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05); color: var(--text);
}
input[type="range"] { width: 100%; }
input[type="color"] {
  width: 100%; height: 44px; border: 0; border-radius: 14px; background: transparent;
}
.checkbox, .hint { color: var(--muted); font-size: .9rem; }
.checkbox { display:flex; gap:8px; align-items:center; }
.actions { display: grid; gap: 10px; }
.btn {
  appearance: none; border: 0; cursor: pointer; border-radius: 16px; padding: 12px 14px;
  font-weight: 700; letter-spacing: .01em; transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, #7c9cff, #4de0c1); color: #08101f; box-shadow: 0 14px 30px rgba(77,224,193,.18); }
.btn-secondary { background: rgba(255,255,255,0.08); color: var(--text); }
.btn-subtle { background: rgba(255,255,255,0.04); color: var(--muted); }
.preview-wrap { padding: 16px 16px 18px; }
.preview-toolbar {
  display:flex; gap:10px; flex-wrap:wrap; align-items:center; justify-content:space-between; margin-bottom: 12px;
}
.preview-stats { display:flex; gap:8px; flex-wrap:wrap; }
.stat-pill {
  padding: 8px 12px; border-radius: 999px; border:1px solid var(--line); color:var(--muted); background: rgba(255,255,255,0.04); font-size:.88rem;
}
.preview-stage {
  min-height: 700px; border-radius: 24px; border: 1px dashed rgba(255,255,255,0.12); background:
  linear-gradient(45deg, rgba(255,255,255,0.03) 25%, transparent 25%),
  linear-gradient(-45deg, rgba(255,255,255,0.03) 25%, transparent 25%),
  linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.03) 75%),
  linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.03) 75%),
  rgba(255,255,255,0.02);
  background-size: 28px 28px; background-position: 0 0,0 14px,14px -14px,-14px 0;
  padding: 20px; display:grid; align-content:start;
}
.icon-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px; }
.icon-cell {
  display:grid; gap:10px; padding: 10px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.06); background: rgba(255,255,255,0.03);
}
.canvas-card { display:grid; place-items:center; min-height: 122px; }
.canvas-card canvas { max-width: 100%; height: auto; }
.icon-meta { display:grid; gap:4px; }
.icon-meta strong { font-size:.92rem; }
.icon-meta span { color: var(--muted); font-size: .78rem; }
.library-wrap { padding: 16px 18px 20px; display:grid; gap: 14px; }
.search-row { display:grid; grid-template-columns: 1fr auto; gap: 10px; }
.category-chips { display:flex; gap:8px; flex-wrap:wrap; }
.chip {
  padding: 8px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.08); color: var(--muted); background: rgba(255,255,255,0.04); cursor:pointer;
}
.chip.active { color: #08101f; background: linear-gradient(135deg, #7c9cff, #4de0c1); border-color: transparent; }
.icon-browser { max-height: 900px; overflow:auto; display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:10px; padding-right:4px; }
.browser-card {
  padding: 12px 10px; border-radius: 18px; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03); cursor:pointer;
  display:grid; justify-items:center; gap:8px; transition: transform .14s ease, border-color .14s ease, background .14s ease;
}
.browser-card:hover { transform: translateY(-1px); border-color: rgba(124,156,255,0.5); }
.browser-card.active { background: rgba(124,156,255,0.12); border-color: rgba(124,156,255,0.58); }
.browser-card svg { width: 28px; height: 28px; color: #fff; }
.browser-card .label { text-align:center; font-size:.78rem; color: var(--muted); line-height:1.15; }
.empty { color: var(--muted); padding: 20px 4px; }
.note-box {
  margin-top: 12px; padding: 12px 14px; border-radius: 16px; color: var(--muted);
  border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.04);
}
.pro-callout {
  margin-top:12px; padding:14px 16px; border-radius:18px; border:1px solid rgba(77,224,193,.28);
  background: linear-gradient(180deg, rgba(77,224,193,0.1), rgba(124,156,255,0.08)); color: #dcecff;
}
.pro-callout strong { display:block; margin-bottom:6px; }
.footer { margin-top: 14px; color: var(--muted); font-size: .88rem; }
@media (max-width: 1320px) { .main-grid { grid-template-columns: 320px minmax(0,1fr); } .library-panel { grid-column: 1 / -1; } }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .main-grid { grid-template-columns: 1fr; }
  .preview-stage { min-height: 420px; }
}
