* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f4f5f7;
  color: #1b1f24;
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

h1.brand {
  margin-bottom: 4px;
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #2563eb;
}

.hint {
  color: #5b6270;
  margin-top: 0;
}

#url-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fff;
  border: 1px solid #e2e4e9;
  border-radius: 8px;
  padding: 16px;
}

textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  padding: 10px;
  border: 1px solid #d3d6dc;
  border-radius: 6px;
  resize: vertical;
}

button {
  align-self: flex-start;
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

button:hover {
  background: #1d4ed8;
}

#sort-btn {
  background: #fff;
  color: #2563eb;
  border: 1px solid #2563eb;
  padding: 6px 12px;
  font-size: 13px;
}

#sort-btn:hover {
  background: #eef2ff;
}

.queue-section {
  margin-top: 32px;
}

.queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.queue-actions {
  display: flex;
  gap: 8px;
}

button.danger {
  background: #fff;
  color: #b91c1c;
  border: 1px solid #b91c1c;
  padding: 6px 12px;
  font-size: 13px;
}

button.danger:hover {
  background: #fee2e2;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  background: #fff;
  border: 1px solid #e2e4e9;
  border-radius: 8px;
  overflow: hidden;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #eef0f3;
  font-size: 14px;
}

th {
  background: #f9fafb;
  font-weight: 600;
  color: #444;
}

.url-cell {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-row td {
  color: #9aa1ac;
  text-align: center;
  padding: 24px;
}

.status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.status-queued {
  background: #eef0f3;
  color: #555;
}

.status-downloading {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-uploading {
  background: #ede9fe;
  color: #6d28d9;
}

.status-done {
  background: #dcfce7;
  color: #15803d;
}

.status-error {
  background: #fee2e2;
  color: #b91c1c;
}

.error-msg {
  color: #b91c1c;
  cursor: help;
}

a {
  color: #2563eb;
}

.site-footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid #e2e4e9;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.footer-gif {
  width: 400px;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.site-footer p {
  margin: 0;
  font-size: 12px;
  color: #9aa1ac;
}
