:root {
  color-scheme: light;
  --background: #f7f7f8;
  --foreground: #111827;
  --muted: #6b7280;
  --border: rgba(0, 0, 0, 0.05);
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --accent: #111827;
  --accent-foreground: #ffffff;
  --danger: #b91c1c;
  --ring: rgba(17, 24, 39, .14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--foreground);
  background: #f8fafc;
}

button,
input {
  font: inherit;
}

.page {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0 48px;
}

.hero {
  display: grid;
  gap: 10px;
  justify-items: center;
  margin: 0 auto 24px;
  text-align: center;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(46px, 8vw, 76px);
  line-height: .95;
  letter-spacing: 0;
}

.summary {
  margin: 0;
  color: #718096;
  font-size: 16px;
  line-height: 1.55;
}

.generator {
  display: grid;
  gap: 32px;
}

.url-box {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.url-box.is-dragging {
  border-color: #94a3b8;
  background: #ffffff;
  box-shadow: 0 0 0 5px var(--ring), 0 24px 80px rgba(17, 24, 39, .08);
}

.url-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

label {
  color: #374151;
  font-size: 14px;
  font-weight: 700;
}

.upload-button {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 4px 8px;
  color: #6b7280;
  background: transparent;
  font-size: 12px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.upload-button:hover,
.upload-button:focus-visible {
  border-color: #cbd5e1;
  color: #374151;
  background: #f8fafc;
}

.upload-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--ring);
}

.file-input {
  display: none;
}

input {
  width: 100%;
  height: 68px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 18px;
  color: var(--foreground);
  background: var(--surface-soft);
  outline: none;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

input::placeholder {
  color: #9ca3af;
}

input:focus {
  border-color: var(--border);
  background: #ffffff;
}

.actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.download-section {
  display: grid;
  gap: 15px;
  margin-top: 50px;
}

.section-head {
  color: #64748b;
  font-size: 16px;
  font-weight: 650;
}

.section-head span:first-child {
  color: #718096;
  font-weight: 760;
}

.download-card {
  display: grid;
  min-height: 142px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 18px;
  color: var(--foreground);
  background: var(--surface);
  justify-items: center;
  text-align: center;
  cursor: pointer;
  transition: background .16s ease, box-shadow .16s ease;
}

.download-card:hover {
  background: rgba(237, 242, 247, 0.5);
  box-shadow: none;
}

.download-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 5px var(--ring);
}

.button-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.system {
  font-size: clamp(30px, 3.8vw, 40px);
  font-weight: 780;
  line-height: .95;
}

.format {
  min-width: 78px;
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  color: #718096;
  background: #f8fafc;
  font-size: 12px;
  text-align: center;
}

.card-note {
  min-height: 18px;
  margin-top: 20px;
  color: transparent;
  font-size: 14px;
  line-height: 1.2;
}

.card-note.is-current {
  color: #94a3b8;
}

.message {
  min-height: 0;
  margin: 0;
  color: #4b5563;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

.message.error {
  color: #4b5563;
}

.message.success {
  color: #4b5563;
}

@media (max-width: 760px) {
  .page {
    width: min(100% - 24px, 560px);
    padding: 32px 0 28px;
  }

  .hero {
    justify-items: start;
    margin-bottom: 20px;
    text-align: left;
  }

  h1 {
    font-size: 46px;
  }

  .summary {
    font-size: 16px;
  }

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

  .download-card {
    min-height: 132px;
  }
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(248, 250, 252, 0.8);
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  padding: 12px 24px;
  z-index: 100;
  backdrop-filter: blur(4px);
}

.footer-content {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-info {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: #718096;
}
