:root {
  --bg: #0a0e17;
  --card: #111827;
  --border: #1f2937;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #8b5cf6;
  --accent2: #6366f1;
  --ok: #22c55e;
  --danger: #ef4444;
  --radius: 18px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
}

.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.4;
}
.b1 { width: 480px; height: 480px; background: #7c3aed; top: -180px; left: -120px; }
.b2 { width: 380px; height: 380px; background: #4f46e5; bottom: -120px; right: -80px; }
.b3 { width: 280px; height: 280px; background: #06b6d4; top: 45%; left: 55%; opacity: 0.25; }

header, main, footer { position: relative; z-index: 1; }

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 1.4rem 1.5rem;
}
.logo { font-weight: 800; font-size: 1.35rem; letter-spacing: -0.03em; }
.badge {
  font-size: 0.75rem;
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.hero {
  text-align: center;
  padding: 2.5rem 1.5rem 1.5rem;
  max-width: 560px;
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 0.6rem;
  background: linear-gradient(135deg, #f1f5f9, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p { color: var(--muted); font-size: 1.05rem; }

.card {
  max-width: 520px;
  margin: 0 auto 2.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.45);
}

.dropzone {
  border: 2px dashed #374151;
  border-radius: 14px;
  padding: 2.4rem 1.2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(139, 92, 246, 0.04);
}
.dropzone:hover, .dropzone.over {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.1);
}
.dz-inner h2 { font-size: 1.2rem; margin: 0.6rem 0 0.2rem; }
.dz-inner p { color: var(--muted); font-size: 0.95rem; }
.hint { font-size: 0.8rem !important; margin-top: 0.7rem !important; opacity: 0.7; }
.icon { color: var(--accent); }

.file-list {
  margin-top: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0b1220;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  gap: 0.7rem;
}
.file-info { display: flex; align-items: center; gap: 0.7rem; min-width: 0; flex: 1; }
.file-ico {
  width: 34px; height: 34px;
  background: rgba(139, 92, 246, 0.18);
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 1rem; flex-shrink: 0;
}
.file-name {
  font-size: 0.88rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.file-size { font-size: 0.78rem; color: var(--muted); }
.rm {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 1.25rem; line-height: 1; padding: 0.2rem;
}
.rm:hover { color: var(--danger); }

.opts {
  margin-top: 1.1rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.opts label { font-size: 0.92rem; color: var(--muted); display: flex; align-items: center; gap: 0.5rem; }
.opts select {
  background: #0b1220;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
}
.opts select:focus { border-color: var(--accent); }

.btn {
  width: 100%;
  margin-top: 1.15rem;
  padding: 0.9rem 1.4rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.15s, opacity 0.15s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  margin-top: 1.3rem;
}
.btn.secondary:hover { color: var(--text); border-color: #4b5563; }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.progress { margin-top: 1rem; }
.bar {
  height: 6px;
  background: #1f2937;
  border-radius: 3px;
  overflow: hidden;
}
.fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #a78bfa);
  transition: width 0.2s;
}
.prog-text {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.35rem;
}

.result { text-align: center; }
.ok {
  width: 54px; height: 54px;
  background: rgba(34, 197, 94, 0.15);
  color: var(--ok);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.7rem; font-weight: 700;
  margin: 0 auto 0.9rem;
}
.result h2 { font-size: 1.35rem; margin-bottom: 1.2rem; }

.links { display: flex; flex-direction: column; gap: 0.7rem; }
.link-row {
  background: #0b1220;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem;
  text-align: left;
}
.link-row .name {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.link-row .box {
  display: flex; gap: 0.4rem;
}
.link-row input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
  min-width: 0;
}
.copy-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 7px;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.copy-btn:hover { background: #7c3aed; }
.copy-btn.done { background: var(--ok); }

.info {
  max-width: 720px;
  margin: 0 auto 3.5rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
  text-align: center;
}
.step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
}
.step span {
  width: 32px; height: 32px;
  background: rgba(139, 92, 246, 0.2);
  color: var(--accent);
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700;
  margin: 0 auto 0.8rem;
}
.step h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.step p { color: var(--muted); font-size: 0.88rem; }

footer {
  text-align: center;
  padding: 1.8rem;
  color: var(--muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 520px) {
  .card { margin-left: 1rem; margin-right: 1rem; padding: 1.4rem; }
  .link-row .box { flex-direction: column; }
  .copy-btn { width: 100%; }
}
