:root{
  --bg:#0b0d12;
  --card:#121826;
  --card2:#0f1522;
  --line:rgba(255,255,255,.10);
  --text:#e8eefc;
  --muted:rgba(232,238,252,.70);
  --accent:#ff2b7a;
  --accent2:#7c3aed;
  --shadow: 0 18px 50px rgba(0,0,0,.45);
  --r:18px;
}

.float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
}
.my-float {
    margin-top: 16px;
}


*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial;
  color:var(--text);
  background: radial-gradient(1100px 600px at 12% 0%, rgba(255,43,122,.18), transparent 55%),
              radial-gradient(900px 600px at 88% 10%, rgba(124,58,237,.18), transparent 55%),
              var(--bg);
}
.topbar{
  position:sticky; top:0; z-index:10;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px;
  border-bottom:1px solid var(--line);
  background: rgba(11,13,18,.75);
  backdrop-filter: blur(14px);
}
.brand{display:flex; gap:12px; align-items:center; min-width:0}
.brand img{height:34px; width:auto; border-radius:10px}
.brandText{min-width:0}
.brandTitle{font-weight:700; letter-spacing:-.02em}
.brandSub{font-size:12px; color:var(--muted); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.actions{display:flex; gap:10px; align-items:center}

.wrap{
  max-width:1200px;
  margin:0 auto;
  padding:18px;
  display:grid;
  grid-template-columns: 360px 1fr;
  gap:16px;
}
@media (max-width: 980px){
  .wrap{grid-template-columns:1fr; padding:14px}
  .brandSub{display:none}
}
.panel{display:flex; flex-direction:column; gap:14px}
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border:1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding:14px;
}
.cardHead{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px}
.cardHead h3{margin:0; font-size:14px; letter-spacing:-.01em}
.pill{
  font-size:12px;
  color:rgba(255,255,255,.85);
  border:1px solid var(--line);
  padding:6px 10px;
  border-radius:999px;
  background: rgba(255,255,255,.04);
  white-space:nowrap;
}
.field{display:flex; flex-direction:column; gap:6px; margin-bottom:10px}
.field span{font-size:12px; color:var(--muted)}
select, input[type="color"], .file{
  width:100%;
  border:1px solid var(--line);
  border-radius: 14px;
  padding:10px 12px;
  background: rgba(0,0,0,.18);
  color: var(--text);
  outline:none;
}
input[type="color"]{height:42px; padding:6px}
.file{padding:12px}
.small{font-size:12px; color:var(--muted); line-height:1.35}
.row{display:flex; gap:10px; align-items:center; margin-top:10px}
.check{display:flex; gap:10px; align-items:center; font-size:12px; color:var(--muted)}
.check input{transform: translateY(1px)}
.help{
  margin-top:10px;
  padding:10px 12px;
  border-radius: 14px;
  border:1px dashed rgba(255,255,255,.12);
  background: rgba(0,0,0,.16);
  font-size:12px;
  color:var(--muted);
  line-height:1.4;
}
.muted{color:var(--muted)}
.btn{
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding:10px 12px;
  border-radius: 14px;
  cursor:pointer;
  font-weight:600;
}
.btn:hover{filter:brightness(1.05)}
.btnPrimary{
  background: linear-gradient(135deg, rgba(255,43,122,.95), rgba(124,58,237,.85));
  border: none;
}
.btnDanger{background: rgba(255,43,122,.12); border-color: rgba(255,43,122,.35)}
.swatches{display:grid; grid-template-columns: repeat(5, 1fr); gap:10px}
@media (max-width: 980px){
  .swatches{grid-template-columns: repeat(6, 1fr)}
}
.swatch{
  border:1px solid var(--line);
  border-radius: 14px;
  padding:10px 8px;
  text-align:center;
  font-size:12px;
  cursor:pointer;
  user-select:none;
  background: rgba(0,0,0,.12);
  position:relative;
  overflow:hidden;
}
.swatch::before{
  content:"";
  position:absolute; inset:0;
  background: var(--sw);
  opacity: .92;
}
.swatch span{position:relative; z-index:1; font-size:11px; color: rgba(255,255,255,.92); text-shadow: 0 1px 10px rgba(0,0,0,.35)}
.swatch.isActive{outline: 2px solid rgba(255,43,122,.7); outline-offset:2px}
.foot{padding:6px 2px}
.stage{min-height: 520px}
.stageCard{
  height:100%;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border:1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.stageHead{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px;
  border-bottom:1px solid var(--line);
  background: rgba(0,0,0,.10);
}
.stageTitle{font-weight:700}
.stageSub{font-size:12px; color:var(--muted); margin-top:2px}
.canvasShell{
  padding:14px;
}
canvas{
  width:100%;
  height:auto;
  display:block;
  border-radius: 16px;
  border:1px solid rgba(255,255,255,.10);
  background:
    linear-gradient(45deg, rgba(255,255,255,.06) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,.06) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,.06) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.06) 75%);
  background-size: 22px 22px;
  background-position: 0 0, 0 11px, 11px -11px, -11px 0px;
}

.hiddenColor{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;}

.stageFooter{
  padding: 14px;
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,.10);
  display:flex;
  flex-direction:column;
  gap:10px;
}
.cta{
  width:100%;
  border: 1px solid rgba(255,43,122,.35);
  background: rgba(255,43,122,.10);
  color: var(--text);
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 800;
  letter-spacing: .02em;
  cursor:pointer;
}
.cta:hover{filter:brightness(1.06)}

textarea{
  width:100%;
  border:1px solid var(--line);
  border-radius: 14px;
  padding:10px 12px;
  background: rgba(0,0,0,.18);
  color: var(--text);
  outline:none;
  resize: vertical;
}
.modal{position:fixed; inset:0; display:none; z-index:50;}
.modal.isOpen{display:block;}
.modal__backdrop{position:absolute; inset:0; background: rgba(0,0,0,.55); backdrop-filter: blur(6px);}
.modal__card{
  position:relative;
  max-width: 720px;
  margin: 6vh auto;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border:1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
  overflow:hidden;
}
@media (max-width: 760px){
  .modal__card{margin: 0; min-height:100vh; border-radius:0;}
}
.modal__head{
  background-color: black !important;
  display:flex; justify-content:space-between; align-items:flex-start; gap:12px;
  padding:16px;
  border-bottom:1px solid var(--line);
  background: rgba(0,0,0,.12);
}
a {
  color: white;
  font-weight: bold;
}

.modal__title{font-weight:800; letter-spacing:-.02em}
.modal__sub{font-size:12px; color:var(--muted); margin-top:4px; line-height:1.3}
.iconBtn{
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  border-radius: 12px;
  padding:8px 10px;
  cursor:pointer;
}
.modal__body{background-color: black !important;padding:16px; display:flex; flex-direction:column; gap:12px}
.grid2{display:grid; grid-template-columns:1fr 1fr; gap:12px}
@media (max-width: 640px){ .grid2{grid-template-columns:1fr;} }
.modal__actions{display:flex; gap:10px; justify-content:flex-end; margin-top:6px}
.modal__config{
  border:1px dashed rgba(255,255,255,.14);
  background: rgba(0,0,0,.14);
  border-radius: 14px;
  padding:12px;
  font-size:12px;
  color: var(--muted);
  line-height:1.45;
}
