:root {
  --bg: #f6f7fb;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --surface-soft: #f3f4f8;
  --ink: #23262f;
  --muted: #8d93a4;
  --line: rgba(33, 37, 45, 0.08);
  --line-strong: rgba(33, 37, 45, 0.16);
  --accent: #ff1237;
  --shadow: 0 28px 80px rgba(30, 39, 73, 0.12);
  --shadow-soft: 0 18px 40px rgba(30, 39, 73, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(244, 246, 252, 0.96) 100%),
    #f3f5fb;
}

button,
input,
a {
  font: inherit;
}

.background-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.background-glow-a {
  background:
    radial-gradient(circle at 12% 10%, rgba(127, 61, 240, 0.26), transparent 28%),
    radial-gradient(circle at 85% 12%, rgba(255, 18, 55, 0.3), transparent 18%);
  z-index: -2;
}

.background-glow-b {
  background:
    radial-gradient(circle at 60% 0%, rgba(115, 165, 255, 0.18), transparent 26%),
    radial-gradient(circle at 80% 65%, rgba(255, 18, 55, 0.08), transparent 16%);
  z-index: -1;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  width: min(100%, 860px);
  padding: 34px;
  border-radius: 38px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.eyebrow,
.lead,
.meta,
.dropzone-copy span,
.dropzone-meta,
.status,
.result-label {
  color: var(--muted);
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  font-weight: 800;
}

h1 {
  margin: 10px 0 0;
  font-size: clamp(2.7rem, 7vw, 4.7rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.lead {
  margin: 16px 0 0;
  max-width: 640px;
  line-height: 1.7;
  font-size: 1.02rem;
}

.dropzone {
  margin-top: 28px;
  min-height: 360px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  border-radius: 34px;
  border: 2px dashed rgba(255, 18, 55, 0.3);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(244, 246, 252, 0.94)),
    radial-gradient(circle at top right, rgba(127, 61, 240, 0.08), transparent 28%);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.dropzone::before,
.dropzone::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms ease, transform 320ms ease;
}

.dropzone::before {
  width: 240px;
  height: 240px;
  right: -52px;
  top: -64px;
  background: radial-gradient(circle, rgba(255, 18, 55, 0.16), transparent 70%);
  transform: scale(0.84);
}

.dropzone::after {
  width: 280px;
  height: 280px;
  left: -96px;
  bottom: -122px;
  background: radial-gradient(circle, rgba(127, 61, 240, 0.14), transparent 72%);
  transform: scale(0.8);
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.dragover {
  transform: translateY(-4px);
  border-color: rgba(255, 18, 55, 0.6);
  box-shadow: var(--shadow-soft);
  outline: none;
}

.dropzone:hover::before,
.dropzone:hover::after,
.dropzone:focus-visible::before,
.dropzone:focus-visible::after,
.dropzone.dragover::before,
.dropzone.dragover::after {
  opacity: 1;
  transform: scale(1);
}

.dropzone-copy {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
  align-self: center;
  position: relative;
  z-index: 1;
}

.dropzone-icon-wrap {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border-radius: 36px;
  background:
    linear-gradient(180deg, rgba(255, 18, 55, 0.1), rgba(127, 61, 240, 0.08)),
    white;
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.dropzone-icon {
  display: grid;
  place-items: center;
  width: 94px;
  height: 94px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--accent), #ff3555);
  color: white;
  font-size: 4rem;
  line-height: 1;
  box-shadow: 0 24px 40px rgba(255, 18, 55, 0.26);
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.dropzone-copy strong {
  font-size: 2rem;
  letter-spacing: -0.05em;
  transition: transform 220ms ease, color 220ms ease;
}

.dropzone-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.92rem;
  position: relative;
  z-index: 1;
}

.dropzone.dragover .dropzone-icon-wrap {
  transform: scale(1.05) rotate(-4deg);
  box-shadow: 0 24px 44px rgba(127, 61, 240, 0.12);
}

.dropzone.dragover .dropzone-icon {
  transform: scale(1.08) rotate(4deg);
  box-shadow: 0 28px 48px rgba(255, 18, 55, 0.34);
}

.dropzone.dragover .dropzone-copy strong {
  transform: translateY(2px);
  color: var(--accent);
}

.dropzone.uploading {
  animation: pulseLift 1.1s ease-in-out infinite;
}

.dropzone.uploading .dropzone-icon {
  animation: iconBounce 1.05s ease-in-out infinite;
}

.dropzone.uploading .dropzone-icon-wrap {
  animation: haloTilt 1.05s ease-in-out infinite;
}

.status,
.result {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.spinner {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 3px solid rgba(255, 18, 55, 0.18);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

.result-label {
  display: block;
  margin-bottom: 12px;
}

.result-row {
  display: flex;
  gap: 12px;
}

.result-row input {
  min-width: 0;
  flex: 1;
  padding: 16px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--surface-soft);
}

.result-actions {
  margin-top: 12px;
  display: flex;
  gap: 12px;
}

.action-button {
  border: none;
  border-radius: 18px;
  padding: 15px 18px;
  text-decoration: none;
  text-align: center;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease;
}

.action-button-primary {
  color: white;
  background: linear-gradient(135deg, var(--accent), #ff3555);
}

.action-button-secondary {
  color: var(--ink);
  background: rgba(35, 38, 47, 0.06);
}

.action-button:hover,
.action-button:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.meta {
  margin: 18px 0 0;
  font-size: 0.95rem;
}

.hidden {
  display: none;
}

.error {
  color: var(--accent);
  border-color: rgba(255, 18, 55, 0.22);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulseLift {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: var(--shadow-soft);
  }
  50% {
    transform: translateY(-6px);
    box-shadow: 0 26px 54px rgba(255, 18, 55, 0.18);
  }
}

@keyframes iconBounce {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.08) rotate(6deg);
  }
}

@keyframes haloTilt {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-5deg);
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 16px;
  }

  .card {
    padding: 22px;
    border-radius: 28px;
  }

  .dropzone {
    min-height: 290px;
    padding: 20px;
    border-radius: 28px;
  }

  .dropzone-icon-wrap {
    width: 104px;
    height: 104px;
  }

  .dropzone-icon {
    width: 74px;
    height: 74px;
    font-size: 3rem;
  }

  .dropzone-copy strong {
    font-size: 1.6rem;
  }

  .dropzone-meta,
  .result-row,
  .result-actions {
    flex-direction: column;
  }

  .action-button {
    width: 100%;
  }
}
