
:root{
  --bg: #0b0f14;
  --panel: rgba(255,255,255,0.06);
  --panel-2: rgba(255,255,255,0.09);
  --stroke: rgba(255,255,255,0.12);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.66);
  --muted-2: rgba(255,255,255,0.5);
  --focus: rgba(0, 196, 167, 0.55);
  --brand: #03ab92;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 45px rgba(0,0,0,0.45);
  --shadow-soft: 0 10px 26px rgba(0,0,0,0.35);
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

*{ box-sizing:border-box; }
html, body{ height:100%; }
body{
  margin:0;
  font-family: var(--font);
  background: radial-gradient(1200px 700px at 20% 0%, rgba(0,196,167,0.10), transparent 55%),
              radial-gradient(900px 600px at 90% 20%, rgba(0,128,255,0.10), transparent 55%),
              var(--bg);
  color: var(--text);
}

a{ color: inherit; }
.link{ color: var(--brand); text-decoration: none; }
.link:hover{ text-decoration: underline; }

.app{ min-height:100%; display:flex; flex-direction:column; }

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:18px 20px;
  border-bottom: 1px solid var(--stroke);
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(10px);
}

.brand{ display:flex; flex-direction:column; gap:4px; }
.brand__title{ font-weight:700; letter-spacing:0.2px; font-size:16px; }
.brand__sub{ font-size:12px; color: var(--muted); }

.layout{
  flex:1;
  display:grid;
  grid-template-columns: 380px 1fr;
  min-height:0;
}

.sidebar{
  border-right:1px solid var(--stroke);
  padding:18px;
  overflow:auto;
}

.sidebar__footer{
  margin-top:18px;
  padding:12px 2px 0;
  border-top:1px solid var(--stroke);
  display:flex;
  gap:10px;
  align-items:center;
  color: var(--muted-2);
  font-size:12px;
}

.muted{ color: var(--muted-2); }

.content{
  padding:18px;
  overflow:auto;
}

.panel{
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding:14px;
  box-shadow: var(--shadow-soft);
  margin-bottom:14px;
}

.panel__title{
  margin:0 0 10px 0;
  font-size:13px;
  letter-spacing:0.35px;
  text-transform:uppercase;
  color: var(--muted);
}

.panel__actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
}

.field{ margin-bottom:12px; }
.field label{
  display:block;
  font-size:12px;
  color: var(--muted);
  margin-bottom:6px;
}
.field input[type="text"],
.field input[type="number"],
select{
  width:100%;
  padding:10px 11px;
  border-radius: 12px;
  border:1px solid var(--stroke);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  outline:none;
}
.field input[type="text"]::placeholder{ color: rgba(255,255,255,0.35); }
.field input:focus, select:focus{
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(0,196,167,0.18);
}

.field__row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.pill{
  padding:3px 10px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,0.06);
  font-size:12px;
  color: var(--muted);
}

.hint{
  margin:6px 0 0;
  font-size:12px;
  color: var(--muted-2);
  line-height:1.35;
}

.advanced{
  margin-top:12px;
  padding:12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  border:1px dashed rgba(255,255,255,0.18);
}
.grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
.hidden{ display:none; }

.preset-bar{ margin-bottom:10px; }
.preset-grid{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.preview-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:14px;
}
@media (min-width: 1100px){
  .preview-grid{
    grid-template-columns: repeat(3, 1fr);
  }
}

.card{
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
  min-height:0;
  transition: transform 0.3s;

}
.card__head{
  padding:12px 14px;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  border-bottom:1px solid var(--stroke);
}
.card__head h3{
  margin:0;
  font-size:14px;
}
.card__head p{
  margin:4px 0 0;
  font-size:12px;
  color: var(--muted);
}
.card canvas{
  width:100%;
  height:auto;
  display:block;
  background: rgba(0,0,0,0.22);
}

.card:hover {
    transform: scale(1.01);
}


.master{
  position:absolute;
  left:-99999px;
  top:-99999px;
  width:1px;
  height:1px;
  overflow:hidden;
}

/* Buttons */
.btn{
  appearance:none;
  border:1px solid rgba(255,255,255,0.16);
  background: rgba(0,196,167,0.12);
  color: var(--text);
  padding:10px 12px;
  border-radius: 12px;
  cursor:pointer;
  font-size:13px;
  font-weight:600;
  transition: transform .05s ease, background .2s ease, border-color .2s ease;
}
.btn:hover{ background: rgba(0,196,167,0.18); border-color: rgba(0,196,167,0.35); }
.btn:active{ transform: translateY(1px); }
.btn--secondary{ background: rgba(255,255,255,0.08); }
.btn--ghost{ background: rgba(255,255,255,0.05); }
.btn--chip{
  padding:8px 10px;
  font-size:12px;
  background: rgba(255,255,255,0.06);
}
.btn--mini{
  padding:7px 10px;
  font-size:12px;
}

/* Modal */
.modal{
  display:none;
  justify-content:center;
  align-items:center;
  position:fixed;
  z-index:1000;
  left:0;
  top:0;
  width:100%;
  height:100%;
  background-color: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
}
.modal-content{
  width:min(560px, calc(100% - 28px));
  background: rgba(18,24,32,0.92);
  border:1px solid rgba(255,255,255,0.14);
  border-radius: 18px;
  padding:18px;
  box-shadow: var(--shadow);
}
.modal-content h2{
  margin:0 0 12px 0;
  font-size:16px;
}
.modal-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.close{
  float:right;
  font-size:26px;
  color: rgba(255,255,255,0.55);
  cursor:pointer;
}
.close:hover{ color: rgba(255,255,255,0.85); }

/* Small screens */
@media (max-width: 980px){
  .layout{ grid-template-columns: 1fr; }
  .sidebar{ border-right:none; border-bottom:1px solid var(--stroke); }
}
