:root {
  --bg: #0b0f14;
  --panel: #121821;
  --muted: #8aa0b6;
  --text: #e7edf3;
  --accent: #68a0ff;
  --accent-2: #4dd0a6;
  --border: #233043;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  background: radial-gradient(1200px 800px at 80% -10%, #0e1622 0%, #090d12 60%, #07090c 100%);
  color: var(--text);
  font: 16px/1.5 "Inter", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  margin: 0;
}

.container {
  max-width: 720px;
  margin: 60px auto;
  padding: 0 16px;
}

h1 {
  margin: 0 0 6px 0;
  font-size: 32px;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0 0 28px 0;
  color: var(--muted);
}

.card {
  background: linear-gradient(180deg, #111722, #0f141d);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}

.form-row {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

label {
  font-weight: 600;
}

input[type="file"],
select,
input[type="range"] {
  width: 100%;
}

input[type="file"], select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0b111a;
  color: var(--text);
}

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

.value-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 0 8px;
  border-radius: 999px;
  background: #0e2a55;
  color: #cfe1ff;
  font-size: 12px;
  vertical-align: middle;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

button {
  appearance: none;
  border: 1px solid #2a3b57;
  background: linear-gradient(180deg, #1a2433, #111a28);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .05s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
}
button:hover { transform: translateY(-1px); }
button:active { transform: translateY(0); }

footer {
  color: var(--muted);
  margin-top: 18px;
  font-size: 14px;
}
code { color: #b8d0ff; }

/* === Drag & Drop Zone Styles === */
/* Dropzone — full width block so the dashed border doesn’t split */
.dropzone {
  display: block;            /* <- key fix */
  width: 100%;               /* <- key fix */
  margin-top: 8px;
  padding: 24px;
  border: 2px dashed var(--border);
  border-radius: 14px;
  background: #0b111a;
  text-align: center;
  outline: none;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
  cursor: pointer;
}
.dropzone.hover,
.dropzone:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(104,160,255,.15) inset;
  background: #0e1520;
}

.dz-instructions {
  display: inline-flex;      /* keep text on one line nicely */
  gap: 10px;
  align-items: baseline;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .2px;
}

/* File list sits BELOW the dropzone as its own card */
.file-list {
  list-style: none;
  padding: 12px 16px;
  margin: 12px 0 0 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0f141d;
}

.file-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.file-list li:last-child { border-bottom: 0; }

.file-list .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-list .size {
  color: var(--muted);
  font-size: 0.9em;
}
.file-list .remove {
  border: none;
  background: #2a374d;
  color: #d5dfeb;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.file-list .remove:hover { background: #354666; }
.muted { color: var(--muted); }


.dz-instructions {
  display: inline-flex;      /* keep text on one line nicely */
  gap: 10px;
  align-items: baseline;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .2px;
}


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

.dz-instructions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
  color: var(--muted);
}
.browse-btn {
  border: 1px solid #2a3b57;
  background: linear-gradient(180deg, #1a2433, #111a28);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.muted { color: var(--muted); }
.visually-hidden {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  padding: 0;
  margin: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  opacity: 0;
}

/* Fullscreen loading overlay */
#loadingOverlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 13, 18, 0.72); /* dark blur-ish backdrop */
  backdrop-filter: blur(3px);
  display: none;              /* hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#loadingOverlay.active {
  display: flex;
}

.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 22px 24px;
  border-radius: 16px;
  background: linear-gradient(180deg, #121722, #0f141d);
  border: 1px solid var(--border);
  box-shadow: 0 8px 40px rgba(0,0,0,.45);
}

.loader-text {
  color: var(--text);
  font-weight: 600;
  letter-spacing: .2px;
}

/* Spinner */
.spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,.15);
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Optional: prevent clicks/scroll while loading */
body.loading {
  overflow: hidden;
}
