:root {
  --bg: #000000;
  --card: #0a0a0a;
  --border: #262626;
  --purple: #ba4df5;
  --purple-dim: rgba(186, 77, 245, 0.15);
  --green: #10b981;
  --text: #f0f0f0;
  --muted: #8f8f8f;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 2.5rem 1rem 4rem;
  line-height: 1.55;
}

header { text-align: center; margin: 1rem 0 2rem; }

h1 {
  font-size: 1.9rem;
  font-weight: 600;
  background: linear-gradient(90deg, var(--purple), #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle { color: var(--muted); font-size: 0.9rem; max-width: 680px; margin: 0.5rem auto 0; }

.container { max-width: 900px; margin: 0 auto; }

.card {
  background: linear-gradient(145deg, rgba(30, 20, 50, 0.6), rgba(10, 10, 20, 0.9));
  border: 1px solid rgba(186, 77, 245, 0.18);
  border-radius: 16px;
  padding: 1.35rem 1.5rem 1.5rem;
  margin-bottom: 1.1rem;
}

h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.num {
  width: 22px; height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
  background: var(--purple-dim);
  border: 1px solid rgba(186, 77, 245, 0.45);
  color: #e0b4ff;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tag {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #cfa8ff;
  background: var(--purple-dim);
  border-radius: 999px;
  padding: 2px 8px;
}

.row { display: flex; gap: 1rem; flex-wrap: wrap; }
.row > * { flex: 1 1 220px; }

.field { margin-bottom: 1rem; }
.field.narrow { max-width: 140px; flex: 0 1 140px; }
.field:last-child { margin-bottom: 0; }

label { display: block; font-size: 0.8rem; font-weight: 500; color: #cfa8ff; margin-bottom: 0.35rem; }

input[type=text], input[type=number], textarea, select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: #000;
  color: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

textarea { resize: vertical; line-height: 1.5; font-size: 0.85rem; }

input:focus, textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 12px rgba(186, 77, 245, 0.2);
}

select { text-align: center; text-align-last: center; appearance: none; }

.hint { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.75rem; }
.hint code, footer code, .tag + code { color: #cfa8ff; background: rgba(186, 77, 245, 0.1); padding: 1px 5px; border-radius: 4px; font-size: 0.78em; }

.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 130px;
  padding: 0.9rem;
  border: 1px dashed rgba(186, 77, 245, 0.45);
  border-radius: 12px;
  background: rgba(186, 77, 245, 0.06);
  color: #e0b4ff;
  font-size: 0.78rem;
  cursor: pointer;
  text-align: center;
  transition: 0.2s;
}

.drop:hover { background: rgba(186, 77, 245, 0.16); }
.drop img { max-width: 100%; max-height: 90px; border-radius: 8px; }

button {
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 10px;
  padding: 0.72rem 1.2rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: 0.2s;
}

.primary { background: var(--purple); color: #fff; }
.primary:hover { background: #c96bff; }
.primary.alt { background: var(--green); }
.primary.alt:hover { background: #13c98c; }
.ghost { background: transparent; border-color: rgba(186, 77, 245, 0.4); color: #e0b4ff; margin-top: 0.4rem; }
.ghost:hover { background: rgba(186, 77, 245, 0.15); }
button:disabled { opacity: 0.5; cursor: default; }

.env-row { display: flex; gap: 0.6rem; align-items: flex-end; margin-bottom: 0.6rem; flex-wrap: wrap; }
.env-row .field { margin-bottom: 0; flex: 1 1 160px; }
.env-row .field.key { flex: 0 1 200px; }
.env-row .remove {
  background: transparent;
  border: 1px solid rgba(255, 71, 87, 0.4);
  color: #ff8b95;
  padding: 0.6rem 0.8rem;
  flex: 0 0 auto;
}

.files {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--muted);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2px 1rem;
  max-height: 220px;
  overflow: auto;
}

.files .f { display: flex; justify-content: space-between; gap: 0.5rem; }
.files .f span:last-child { color: #555; }

.log {
  margin-top: 1rem;
  background: #050505;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.76rem;
  color: #b9b9b9;
  white-space: pre-wrap;
  max-height: 240px;
  overflow: auto;
}

.log .ok { color: var(--green); }
.log .err { color: #ff6b7a; }

footer { text-align: center; color: #4a4a4a; font-size: 0.75rem; margin-top: 2rem; }
