:root {
  --bg: #0a0b12;
  --ink: #f6f7ff;
  --muted: #a9adc9;
  --line: #2a2f52;
  --glass: rgba(16, 18, 35, 0.7);
  --neonA: #84f7d3;
  --neonB: #8ba7ff;
  --danger: #ff6b87;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 550px at 20% -10%, #1f2d69 0%, transparent 45%),
    radial-gradient(800px 420px at 90% 8%, #213144 0%, transparent 50%),
    var(--bg);
  min-height: 100vh;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .08;
  background-image: radial-gradient(#fff 0.6px, transparent 0.6px);
  background-size: 3px 3px;
}

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 44px 18px 70px;
}

.hero h1 {
  margin: 8px 0;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 5.3vw, 4.2rem);
  letter-spacing: -0.02em;
}

.eyebrow {
  margin: 0;
  color: var(--neonA);
  text-transform: uppercase;
  letter-spacing: .17em;
  font-size: .75rem;
  font-weight: 700;
}

.subtitle { margin: 0; color: var(--muted); font-size: 1.05rem; }

.panel {
  margin-top: 24px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, .35);
  backdrop-filter: blur(10px);
}

.dropzone {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 160px;
  border: 1.5px dashed #3a4280;
  border-radius: 16px;
  padding: 16px;
  background: rgba(255,255,255,.02);
  transition: .2s ease;
  cursor: pointer;
}

.dropzone.dragover {
  border-color: var(--neonA);
  box-shadow: inset 0 0 0 1px var(--neonA), 0 0 40px rgba(132,247,211,.15);
}

.drop-title { font-family: 'Outfit', sans-serif; font-size: 1.2rem; font-weight: 700; }
.drop-help { margin-top: 7px; color: var(--muted); font-size: .93rem; }

input[type="file"] { display: none; }

.controls {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: .75rem 1rem;
  text-decoration: none;
  color: inherit;
  font-weight: 700;
  cursor: pointer;
}
.btn:disabled { opacity: .65; cursor: not-allowed; }

.btn-primary {
  color: #09110f;
  background: linear-gradient(90deg, var(--neonA), var(--neonB));
}
.btn-ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}
.btn-download {
  background: #dce3ff;
  color: #11142a;
}

.status {
  min-height: 1.3rem;
  margin: 12px 0 0;
  color: var(--muted);
}

.error {
  margin: 10px 0 0;
  border: 1px solid rgba(255,107,135,.4);
  background: rgba(255,107,135,.16);
  color: #ffd2dd;
  padding: 10px;
  border-radius: 10px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.preview-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: rgba(12, 14, 30, .8);
}

.preview-card h3 {
  margin: 0 0 8px;
  font-size: .95rem;
  color: var(--muted);
  font-weight: 600;
}

.preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 10px;
  background: conic-gradient(from 45deg, #1a1e3f 0 25%, #141836 0 50%) 50%/20px 20px;
  border: 1px solid #2f3769;
}

.hidden { display: none !important; }

@media (max-width: 800px) {
  .preview-grid { grid-template-columns: 1fr; }
}
