:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0d0821;
  color: #f8f7ff;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(129, 70, 255, 0.55), transparent 36rem),
    radial-gradient(circle at bottom right, rgba(34, 211, 238, 0.22), transparent 28rem),
    #0d0821;
}

.app {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.hero {
  max-width: 760px;
  margin-bottom: 28px;
}

.badge {
  display: inline-flex;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #dcd4ff;
  font-size: 14px;
}

h1 {
  margin: 18px 0 12px;
  font-size: clamp(40px, 8vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

p {
  margin: 0;
  color: #c7bfdf;
  font-size: 18px;
  line-height: 1.65;
}

.card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  padding: 26px;
}

label {
  display: block;
  margin-bottom: 12px;
  color: #f0ecff;
  font-weight: 700;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

input,
button {
  min-height: 56px;
  border: 0;
  border-radius: 16px;
  font: inherit;
}

input {
  width: 100%;
  padding: 0 18px;
  background: rgba(8, 5, 24, 0.82);
  color: #fff;
  outline: 1px solid rgba(255, 255, 255, 0.12);
}

input:focus {
  outline: 2px solid #9c7cff;
}

button,
.download-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: white;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

.secondary-link {
  background: rgba(255, 255, 255, 0.12);
  outline: 1px solid rgba(255, 255, 255, 0.18);
}

.disabled-action {
  cursor: not-allowed;
  opacity: 0.65;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

small {
  display: block;
  margin-top: 14px;
  color: #ada4c8;
}

.status {
  min-height: 24px;
  margin: 18px 0;
  color: #dcd4ff;
}

.status.error {
  color: #fecaca;
}

.result {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 22px;
  align-items: center;
}

.result img {
  width: 132px;
  height: 132px;
  border-radius: 22px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.result h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

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

.direct-link {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  color: #c4b5fd;
  font-weight: 700;
}

@media (max-width: 720px) {
  body {
    background:
      radial-gradient(circle at top left, rgba(129, 70, 255, 0.42), transparent 22rem),
      #0d0821;
  }

  .app {
    width: calc(100% - 20px);
    max-width: 480px;
    padding: 28px 0 36px;
  }

  .hero {
    margin-bottom: 18px;
  }

  h1 {
    margin-top: 14px;
    font-size: clamp(34px, 12vw, 52px);
    line-height: 1;
  }

  p {
    font-size: 16px;
    line-height: 1.5;
  }

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

  .input-row,
  .result {
    grid-template-columns: 1fr;
  }

  input,
  button {
    width: 100%;
    font-size: 16px;
  }

  input {
    min-height: 58px;
  }

  .status {
    margin: 14px 2px;
    font-size: 15px;
    line-height: 1.45;
  }

  .result {
    gap: 16px;
  }

  .result img {
    width: 112px;
    height: 112px;
    justify-self: center;
    border-radius: 20px;
  }

  .result h2 {
    margin-bottom: 16px;
    text-align: center;
    font-size: 24px;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .download-link,
  .secondary-link,
  .direct-link {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 380px) {
  .app {
    width: calc(100% - 14px);
    padding-top: 18px;
  }

  .card {
    padding: 14px;
  }

  h1 {
    font-size: 32px;
  }
}