:root{
  --bg:#0f1724;
  --card:#0b1220;
  --accent:#6ee7b7;
  --muted:#9aa7b2;
  --glass: rgba(255,255,255,0.03);
  --radius:14px;
  --maxw:900px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background: linear-gradient(180deg,#071126 0%, #051022 100%);
  color:#e6f0f0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px;
}

.container{
  width:100%;
  max-width:var(--maxw);
  background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-radius:20px;
  padding:28px;
  box-shadow: 0 8px 30px rgba(2,6,23,0.6);
  border: 1px solid rgba(255,255,255,0.03);
}

header{ text-align:center; margin-bottom:18px }
h1{ margin:0; font-size:1.6rem; letter-spacing:0.6px }
.subtitle{ margin:6px 0 0; color:var(--muted); font-size:0.95rem }

.uploader{
  margin: 14px auto;
  padding:28px;
  border-radius:var(--radius);
  background:var(--glass);
  border: 1px dashed rgba(255,255,255,0.06);
  text-align:center;
  cursor:pointer;
  transition:transform .12s ease, border-color .12s;
}
.uploader:hover{ transform:translateY(-4px); border-color: rgba(110,231,183,0.24); }
.uploader input[type="file"]{ display:none; }

.drop-inner p{ margin:0; font-size:1.05rem }
.browse{
  color:var(--accent);
  cursor:pointer;
  text-decoration:underline;
  display:inline-block;
  margin-left:6px;
}

.preview-area{ margin-top:18px; display:flex; justify-content:center; }
.preview-card{
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  padding:16px;
  border-radius:12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  display:flex;
  flex-direction:column;
  gap:12px;
  align-items:center;
  width:100%;
}

canvas{
  max-width:100%;
  border-radius:10px;
  background:#071026;
  box-shadow: 0 4px 12px rgba(4,8,16,0.6);
}

.controls{ display:flex; gap:10px }
button{
  background:linear-gradient(90deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border:1px solid rgba(255,255,255,0.06);
  color:var(--accent);
  padding:8px 12px;
  border-radius:10px;
  cursor:pointer;
  font-weight:600;
}
button:disabled{ opacity:0.45; cursor:not-allowed; color:var(--muted) }
button.secondary{ color:var(--muted); border-style:dashed }

.progress{
  width:90%;
  height:10px;
  background: rgba(255,255,255,0.03);
  border-radius:999px;
  overflow:hidden;
}
.progress .bar{
  height:100%;
  width:0%;
  background: linear-gradient(90deg, rgba(110,231,183,0.12), rgba(110,231,183,0.34));
  transition:width 0.15s linear;
}

footer{ text-align:center; margin-top:16px; color:var(--muted); font-size:0.85rem }

/* small screens */
@media (max-width:560px){
  .controls{ flex-direction:column; width:100% }
  button{ width:100%; }
  .uploader{ padding:20px }
}
