:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
  color: #1b1b1f;
  background: #f8f8fb;
}

body {
  margin: 0;
  padding: 2rem 1rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

main {
  width: min(960px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 12px 30px rgba(5, 17, 61, 0.1);
}

h1 {
  margin-top: 0;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
}

form {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

input[type="url"] {
  flex: 1;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid #c5c8d2;
  font-size: 1rem;
}

button {
  border: none;
  border-radius: 8px;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: #0068ff;
  cursor: pointer;
}

button.secondary {
  background: #f1f4fb;
  color: #1b1b1f;
}

button:disabled {
  background: #9aa7c2;
  cursor: not-allowed;
}

.controls {
  align-items: center;
}

.button-group {
  display: flex;
  gap: 0.75rem;
}

.error {
  color: #c62828;
  background: #fdecea;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.hidden {
  display: none !important;
}

textarea {
  width: 100%;
  min-height: 320px;
  border-radius: 12px;
  border: 1px solid #c5c8d2;
  font-size: 1rem;
  padding: 1rem;
  resize: vertical;
}

.download-box {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

.hint {
  color: #4c5568;
  margin-bottom: 0.5rem;
}

.sample {
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.9rem;
  color: #4c5568;
}

.site-footer {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  font-size: 0.95rem;
}

.site-footer a {
  color: #0068ff;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer .divider {
  color: #9aa7c2;
}
