@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Syne:wght@400;600;800&display=swap');

:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface2: #1a1a28;
  --border: #2a2a40;
  --accent: #5b4fff;
  --accent2: #ff4f7b;
  --accent3: #4fffb0;
  --text: #e8e8f0;
  --muted: #6a6a88;
  --mono: 'Space Mono', monospace;
  --display: 'Syne', sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--display);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

.glow-orb {
  position: fixed;
  width: 400px; height: 400px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}
.glow-orb.a { background: var(--accent); top: -100px; left: -100px; }
.glow-orb.b { background: var(--accent2); bottom: -100px; right: -100px; }

.container {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.logo-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(91,79,255,0.4);
}

.logo-text h1 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, var(--text), var(--muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text p {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
  margin-top: 2px;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}
.step.active { border-color: var(--accent); }
.step.done { border-color: var(--accent3); }

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.step-num {
  width: 28px; height: 28px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
  transition: all 0.2s;
}
.step.active .step-num { background: var(--accent); border-color: var(--accent); color: white; }
.step.done .step-num { background: var(--accent3); border-color: var(--accent3); color: #0a0a0f; }

.step-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--surface2);
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--accent);
  background: rgba(91,79,255,0.05);
}

.upload-icon { font-size: 32px; margin-bottom: 10px; }

.upload-zone p {
  font-size: 13px;
  color: var(--muted);
  font-family: var(--mono);
}
.upload-zone p strong { color: var(--accent); font-family: var(--display); }

.upload-zone input { display: none; }

.file-info {
  display: none;
  background: var(--surface2);
  border: 1px solid var(--accent3);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 12px;
}
.file-info.show { display: block; }

.file-info .fname {
  color: var(--accent3);
  font-weight: 700;
  word-break: break-all;
}
.file-info .fmeta {
  color: var(--muted);
  margin-top: 4px;
  font-size: 11px;
}
.file-info .pkg {
  color: var(--accent);
  margin-top: 6px;
  font-size: 11px;
}

.clones-list { display: flex; flex-direction: column; gap: 10px; }

.clone-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.clone-badge {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.clone-fields { flex: 1; display: flex; flex-direction: column; gap: 6px; }

.clone-fields input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.clone-fields input:focus { border-color: var(--accent); }
.clone-fields input::placeholder { color: var(--muted); }
.clone-fields .label-small {
  font-size: 10px;
  color: var(--muted);
  font-family: var(--mono);
  margin-bottom: 2px;
}

.btn-remove {
  background: none;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  transition: all 0.2s;
}
.btn-remove:hover { border-color: var(--accent2); color: var(--accent2); }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  width: 100%;
}

.btn-secondary {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  margin-top: 10px;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #7c6fff);
  color: white;
  box-shadow: 0 4px 20px rgba(91,79,255,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(91,79,255,0.4); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.progress-wrap {
  display: none;
  margin-top: 16px;
}
.progress-wrap.show { display: block; }

.progress-bar-bg {
  background: var(--surface2);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent3));
  border-radius: 999px;
  transition: width 0.3s ease;
  width: 0%;
}
.progress-log {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  max-height: 80px;
  overflow-y: auto;
  line-height: 1.8;
}
.progress-log .ok { color: var(--accent3); }
.progress-log .err { color: var(--accent2); }
.progress-log .info { color: var(--accent); }

.downloads-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.dl-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface2);
  border: 1px solid var(--accent3);
  border-radius: 10px;
  padding: 12px 14px;
  gap: 10px;
  animation: fadeIn 0.3s ease;
}

.dl-info { flex: 1; min-width: 0; }
.dl-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dl-meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-dl {
  background: var(--accent3);
  color: #0a0a0f;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
  display: flex; align-items: center; gap: 5px;
}
.btn-dl:hover { transform: scale(1.04); }

.warn-box {
  background: rgba(255,79,123,0.06);
  border: 1px solid rgba(255,79,123,0.25);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  font-family: var(--mono);
}
.warn-box strong { color: var(--accent2); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(91,79,255,0.12);
  border: 1px solid rgba(91,79,255,0.3);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 10px;
  font-family: var(--mono);
  color: var(--accent);
  margin-top: 8px;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 6px 0 14px;
}
