:root {
  color-scheme: light dark;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  font-size: 16px;
  --bg: #0f172a;
  --bg-light: #1e293b;
  --card: rgba(15, 23, 42, 0.75);
  --text: #e2e8f0;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --shadow: 0 22px 44px rgba(15, 23, 42, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.12), transparent 55%),
              radial-gradient(circle at bottom, rgba(147, 51, 234, 0.12), transparent 60%),
              var(--bg);
  color: var(--text);
}

.app-shell {
  width: min(680px, 92vw);
}

.panel {
  background: var(--card);
  backdrop-filter: blur(18px);
  border-radius: 24px;
  padding: 48px clamp(32px, 5vw, 48px);
  box-shadow: var(--shadow);
  border: 1px solid rgba(56, 189, 248, 0.15);
  display: grid;
  gap: 32px;
}

.panel__header h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
}

.panel__header p {
  margin: 0;
  color: #94a3b8;
  max-width: 36ch;
}

.dropzone {
  border: 2px dashed rgba(148, 163, 184, 0.45);
  border-radius: 20px;
  padding: clamp(40px, 5vw, 56px);
  transition: border-color 200ms ease, background 200ms ease;
  text-align: center;
  position: relative;
}

.dropzone.is-active {
  border-color: var(--accent);
  background: rgba(8, 145, 178, 0.15);
}

.dropzone__title {
  font-size: 1.1rem;
  margin: 0 0 8px;
}

.dropzone__hint {
  margin: 12px 0;
  color: #64748b;
}

button {
  all: unset;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #0f172a;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
  box-shadow: 0 14px 24px rgba(14, 165, 233, 0.35);
}

button:focus-visible,
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(14, 165, 233, 0.45);
}

.status {
  min-height: 24px;
  color: #cbd5f5;
  font-size: 0.95rem;
}

.preview {
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
}

.preview.hidden {
  display: none;
}

.preview img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 16px;
}

.preview__meta {
  color: #94a3b8;
  font-size: 0.9rem;
}

.preview__download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #34d399, #10b981);
  color: #022c22;
  font-weight: 600;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
  box-shadow: 0 14px 24px rgba(16, 185, 129, 0.35);
}

.preview__download:hover,
.preview__download:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(16, 185, 129, 0.45);
}

@media (max-width: 540px) {
  .panel {
    padding: 36px 28px;
    border-radius: 20px;
  }

  .preview img {
    width: 140px;
    height: 140px;
  }
}
