:root {
  --bg: #0d1117; --surface: #161b22; --surface-2: #1c2230; --border: #283041;
  --text: #e6edf3; --muted: #8b97a7;
  --cyan: #00e5ff; --magenta: #ff2e97; --green: #00ffa3; --purple: #9d4eff;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
body { font-family: Inter, system-ui, sans-serif; background: var(--bg); color: var(--text);
       min-height: 100vh; line-height: 1.6; overflow-x: hidden; }

.bg-blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(100px); opacity: .2; }
.blob-1 { width: 500px; height: 500px; background: var(--cyan); top: -140px; left: -120px; }
.blob-2 { width: 440px; height: 440px; background: var(--magenta); bottom: -160px; right: -100px; }
.blob-3 { width: 360px; height: 360px; background: var(--purple); top: 45%; left: 60%; }

.nav { display: flex; align-items: center; justify-content: space-between;
       padding: 18px clamp(16px,4vw,48px); max-width: 1280px; margin: 0 auto; }
.logo { font-weight: 900; font-size: 22px; color: var(--text); text-decoration: none; }
.logo-mark, .accent { color: var(--cyan); }
.nav-links a { color: var(--muted); text-decoration: none; margin-left: 20px; font-weight: 500; }
.nav-links a:hover { color: var(--text); }

/* hero */
.hero { max-width: 820px; margin: 0 auto; padding: 36px clamp(16px,5vw,40px) 50px; text-align: center; }
.hero h1 { font-size: clamp(32px,6vw,56px); font-weight: 900; letter-spacing: -.03em; line-height: 1.05; }
.grad { background: linear-gradient(120deg,var(--cyan),var(--magenta)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { color: var(--muted); font-size: clamp(15px,2.2vw,18px); max-width: 600px; margin: 16px auto 30px; }
.dropzone { border: 2px dashed var(--border); border-radius: var(--radius); background: rgba(22,27,34,.6);
            padding: 44px 24px; cursor: pointer; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.drag { border-color: var(--cyan); background: rgba(0,229,255,.06); }
.dz-icon { font-size: 38px; } .dz-title { font-size: 19px; font-weight: 700; margin-top: 8px; }
.dz-hint { color: var(--muted); font-size: 14px; margin: 6px 0 18px; }
.dz-btns .btn { margin: 0 5px; }
.feature-pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 26px; }
.feature-pills span { background: var(--surface); border: 1px solid var(--border); color: var(--muted);
                      font-size: 13px; padding: 6px 12px; border-radius: 20px; }

/* buttons */
.btn { font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; display: inline-block;
       padding: 10px 18px; border-radius: 10px; border: 1px solid transparent; transition: transform .12s, box-shadow .2s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg,var(--cyan),var(--purple)); color: #06121a; box-shadow: 0 5px 20px rgba(0,229,255,.3); }
.btn-primary:hover { box-shadow: 0 7px 28px rgba(0,229,255,.48); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.btn.full { display: block; width: 100%; margin: 4px 0; text-align: center; }

/* editor layout */
.editor { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start;
          max-width: 1280px; margin: 0 auto; padding: 10px clamp(12px,3vw,32px) 50px; }
.stage { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
         min-height: 360px; display: flex; align-items: center; justify-content: center; padding: 16px; }
.canvas-host { position: relative; max-width: 100%; line-height: 0; }
#view { max-width: 100%; max-height: 70vh; border-radius: 8px; display: block; }

.panel-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 10px; margin-bottom: 14px; }
.tab { flex: 1; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 8px 6px; border: none;
       border-radius: 8px; background: transparent; color: var(--muted); }
.tab:hover { color: var(--text); } .tab.active { background: linear-gradient(135deg,var(--cyan),var(--purple)); color: #06121a; }

.panel { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.field select, .field input[type="number"] { font: inherit; background: var(--surface-2); color: var(--text);
       border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; }
input[type="range"] { width: 100%; accent-color: var(--cyan); cursor: pointer; }
.slider-row { display: flex; flex-direction: column; gap: 4px; }
.slider-row .lbl { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.slider-row .lbl b { color: var(--text); font-variant-numeric: tabular-nums; }
.hint { color: var(--muted); font-size: 12.5px; }

.filter-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.filter-grid button { font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; padding: 10px 6px;
       border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
.filter-grid button:hover { border-color: var(--cyan); }
.filter-grid button.active { background: linear-gradient(135deg,var(--cyan),var(--purple)); color: #06121a; border-color: transparent; }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; text-align: center; padding: 10px 8px; }
.panel-actions { display: flex; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.panel-actions .btn { flex: 1; text-align: center; }

/* crop / passport overlay */
.crop-overlay { position: absolute; border: 2px solid var(--cyan); box-shadow: 0 0 0 9999px rgba(0,0,0,.5);
                cursor: move; touch-action: none; }

/* footer */
.footer { text-align: center; color: var(--muted); font-size: 14px; padding: 26px 16px 44px; border-top: 1px solid var(--border); }
.footer a { color: var(--cyan); text-decoration: none; }
.socials { display: flex; gap: 14px; justify-content: center; margin-bottom: 14px; }
.social { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
          color: var(--muted); background: var(--surface); border: 1px solid var(--border); transition: .2s; }
.social:hover { color: var(--cyan); border-color: var(--cyan); transform: translateY(-2px); }

@media (max-width: 860px) {
  .editor { grid-template-columns: 1fr; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
}
