:root{
  --accent: #3b82f6;
  --bg1: #0f0f0f;
  --bg2: #1a1a1a;
  --card: #151515;
  --muted: #aaa;
}

*{box-sizing:border-box}
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg1), var(--bg2));
  color: white;
  text-align: center;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

.container {
  max-width: 980px;
  margin: 36px auto;
  padding: 28px;
}

h1 { margin: 0 0 6px 0; font-size: 22px; }
.subtitle { color: var(--muted); margin: 0 0 20px 0; }

.drop-zone {
  position: relative;
  border: 2px dashed var(--accent);
  border-radius: 14px;
  padding: 34px;
  cursor: pointer;
  transition: 0.18s ease;
  background: rgba(255,255,255,0.01);
}
.drop-zone.highlight {
  background: rgba(59,130,246,0.12);
  box-shadow: 0 6px 20px rgba(59,130,246,0.06);
  transform: translateY(-4px);
}
.drop-zone p { margin: 0; color: var(--muted); font-size: 15px; }

.file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 5;
  cursor: pointer;
  /* asegúrate que capture eventos pointer */
  pointer-events: auto;
}

.preview-container {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 26px;
  flex-wrap: wrap;
}

.preview-card {
  width: 440px;
  max-width: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  border-radius: 12px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.04);
}

.preview-card h3 { margin: 6px 0 10px 0; font-size: 14px; color: var(--muted); }

canvas {
  width: 100%;
  background: #0b0b0b;
  border-radius: 8px;
  border: 1px solid #222;
  max-height: 420px;
  object-fit: contain;
}

.controls { margin-top: 18px; display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }

button {
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
}
button:hover:not(:disabled){ transform: translateY(-3px); }
button:disabled{ opacity: 0.5; cursor: not-allowed; }

button.secondary{
  background: transparent;
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--muted);
}

button.primary {
  background: linear-gradient(90deg, #4f46e5, var(--accent));
  box-shadow: 0 6px 20px rgba(59,130,246,0.08);
}

.stats {
  margin-top: 14px;
  color: var(--muted);
  min-height: 20px;
  transition: color .12s ease;
}
.error { color: #ff7b7b; }
.success { color: #9be89b; }