* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", sans-serif;
  color: #111;
  background:
    radial-gradient(circle at top left, #dffcff, transparent 35%),
    radial-gradient(circle at bottom right, #eee7ff, transparent 35%),
    #f8fafc;
}

.wrap {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 460px;
  padding: 26px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 28px;
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px rgba(0,0,0,.12);
}

.desc {
  text-align: center;
  margin: 0 0 22px;
  color: #555;
  font-size: 14px;
}

.upload-box {
  position: relative;
  width: 100%;
  min-height: 210px;
  border: 2px dashed #cbd5e1;
  border-radius: 24px;
  background: linear-gradient(180deg, #fff, #f8fafc);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  cursor: pointer;
  transition: .25s ease;
  padding: 20px;
  overflow: hidden;
}

.upload-box:hover,
.upload-box.active {
  border-color: #111;
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0,0,0,.08);
}

.upload-box input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 20;
}

.upload-box > *:not(input) {
  pointer-events: none;
}

.upload-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: #111;
  color: white;
  display: grid;
  place-items: center;
  font-size: 28px;
  margin-bottom: 6px;
}

#file-name {
  max-width: 100%;
  margin: 0;
  font-weight: 700;
  color: #111;
  word-break: break-all;
}

.upload-box span {
  font-size: 13px;
  color: #64748b;
}

.upload-btn,
.actions button {
  width: 100%;
  border: 0;
  border-radius: 16px;
  background: #111;
  color: white;
  font-weight: 800;
  cursor: pointer;
  transition: .2s ease;
}

.upload-btn {
  position: relative;
  margin-top: 18px;
  padding: 14px;
  font-size: 15px;
  z-index: 10;
}

.upload-btn:hover,
.actions button:hover {
  transform: translateY(-1px);
  opacity: .9;
}

.upload-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

.progress-wrap {
  display: none;
  width: 100%;
  height: 10px;
  margin-top: 14px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: #111;
  transition: width .2s ease;
}

input#result {
  width: 100%;
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  color: #111;
  outline: none;
  font-size: 13px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.actions button {
  padding: 12px;
  background: white;
  color: #111;
  border: 1px solid #e2e8f0;
}

.footer {
  text-align: center;
  padding: 0 20px 20px;
  color: #64748b;
  font-size: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(120px);
  background: #111;
  color: white;
  padding: 13px 18px;
  border-radius: 14px;
  font-size: 13px;
  opacity: 0;
  transition: .35s ease;
  z-index: 999;
  box-shadow: 0 15px 35px rgba(0,0,0,.25);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 480px) {
  .card {
    padding: 20px;
    border-radius: 24px;
  }

  .upload-box {
    min-height: 190px;
  }
}

.title {
  text-align: center;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -1px;
  margin: 0 0 10px;
  color: #111;
}
