:root {
  --bg: #0f1220;
  --card: #1a1f36;
  --card-2: #232a4a;
  --text: #e7eaf6;
  --muted: #9aa3c7;
  --accent: #6c8cff;
  --accent-2: #4f6ef2;
  --border: #2b3255;
  --ok: #35c88a;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #1c2445 0%, transparent 60%), var(--bg);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

header { text-align: center; margin-bottom: 28px; }
h1 { font-size: 2rem; margin: 0 0 6px; letter-spacing: -0.02em; }
.subtitle { color: var(--muted); margin: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

/* Dropzone */
.dropzone {
  display: block;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  color: var(--muted);
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: rgba(108,140,255,0.06);
}
.dropzone-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dropzone svg { color: var(--accent); }
.dropzone-title { color: var(--text); font-weight: 500; }
.dropzone-file { color: var(--ok); font-size: .9rem; }

/* Opções */
.options { margin-top: 24px; display: grid; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-weight: 500; font-size: .95rem; }
.field small { color: var(--muted); font-size: .8rem; }
.field code {
  background: var(--card-2);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: .85em;
}

input[type="text"] {
  background: var(--card-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: .95rem;
  outline: none;
}
input[type="text"]:focus { border-color: var(--accent); }

input[type="range"] { accent-color: var(--accent); width: 100%; }

.checkbox {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; font-weight: 500;
}
.checkbox input { width: 18px; height: 18px; accent-color: var(--accent); }

/* Botões */
.btn-primary, .btn-secondary {
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .05s, opacity .2s, background .2s;
}
.btn-primary {
  margin-top: 24px;
  width: 100%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
}
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary:not(:disabled):active { transform: scale(.99); }

.btn-secondary {
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 16px;
  font-size: .9rem;
}
.btn-secondary:hover { border-color: var(--accent); }

/* Progresso */
.progress-wrap { margin-top: 18px; display: flex; align-items: center; gap: 12px; }
.progress-bar {
  flex: 1; height: 8px; background: var(--card-2);
  border-radius: 999px; overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--ok));
  transition: width .2s;
}
.progress-text { font-size: .85rem; color: var(--muted); white-space: nowrap; }

/* Resultados */
.results-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.results-header h2 { margin: 0; font-size: 1.2rem; }
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}
.thumb {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.thumb img { width: 100%; height: 130px; object-fit: contain; background: #0b0e1a; }
.thumb-info {
  padding: 8px 10px; display: flex; align-items: center;
  justify-content: space-between; gap: 8px;
}
.thumb-name { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb-dl { color: var(--accent); text-decoration: none; font-size: .78rem; font-weight: 600; }
.thumb-dl:hover { text-decoration: underline; }

footer { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 8px; }
