/* shadcn/ui default (zinc) theme tokens */
:root {
  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 240 10% 3.9%;
  --primary: 240 5.9% 10%;
  --primary-foreground: 0 0% 98%;
  --secondary: 240 4.8% 95.9%;
  --secondary-foreground: 240 5.9% 10%;
  --muted: 240 4.8% 95.9%;
  --muted-foreground: 240 3.8% 46.1%;
  --accent: 240 4.8% 95.9%;
  --accent-foreground: 240 5.9% 10%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 98%;
  --border: 240 5.9% 90%;
  --input: 240 5.9% 90%;
  --ring: 240 10% 3.9%;
  --radius: 0.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: 240 10% 3.9%;
    --foreground: 0 0% 98%;
    --card: 240 10% 3.9%;
    --card-foreground: 0 0% 98%;
    --primary: 0 0% 98%;
    --primary-foreground: 240 5.9% 10%;
    --secondary: 240 3.7% 15.9%;
    --secondary-foreground: 0 0% 98%;
    --muted: 240 3.7% 15.9%;
    --muted-foreground: 240 5% 64.9%;
    --accent: 240 3.7% 15.9%;
    --accent-foreground: 0 0% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 0 0% 98%;
    --border: 240 3.7% 15.9%;
    --input: 240 3.7% 15.9%;
    --ring: 240 4.9% 83.9%;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.card {
  width: 100%;
  max-width: 30rem;
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.card-header { padding: 1.5rem 1.5rem 0; }
.card-content { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }

.card-title { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.025em; }
.card-description { font-size: 0.875rem; color: hsl(var(--muted-foreground)); margin-top: 0.375rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem;
  font-weight: 500;
  height: 2.5rem;
  padding: 0 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s, opacity 0.15s;
  font-family: inherit;
}
.btn:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }
.btn:disabled { pointer-events: none; opacity: 0.5; }

.btn-primary { background-color: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.btn-primary:hover { background-color: hsl(var(--primary) / 0.9); }

.btn-secondary { background-color: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); }
.btn-secondary:hover { background-color: hsl(var(--secondary) / 0.8); }

.btn-outline { border-color: hsl(var(--input)); background-color: transparent; color: hsl(var(--foreground)); }
.btn-outline:hover { background-color: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }

.btn-block { width: 100%; }

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2.5rem 1.5rem;
  border: 1.5px dashed hsl(var(--border));
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background-color 0.15s;
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
}
.dropzone:hover, .dropzone.dragover {
  border-color: hsl(var(--ring));
  background-color: hsl(var(--accent) / 0.5);
}
.dropzone strong { color: hsl(var(--foreground)); font-weight: 500; }
.dropzone svg { width: 2rem; height: 2rem; stroke: hsl(var(--muted-foreground)); }

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem;
}
.file-row .name { font-weight: 500; overflow-wrap: anywhere; }
.file-row .size { color: hsl(var(--muted-foreground)); flex-shrink: 0; }

.progress {
  height: 0.5rem;
  width: 100%;
  background-color: hsl(var(--secondary));
  border-radius: 9999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background-color: hsl(var(--primary));
  border-radius: 9999px;
  transition: width 0.15s ease;
}

.status-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid hsl(var(--border));
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  width: fit-content;
}

.link-box {
  display: flex;
  gap: 0.5rem;
}
.link-box input {
  flex: 1;
  min-width: 0;
  height: 2.5rem;
  padding: 0 0.75rem;
  border: 1px solid hsl(var(--input));
  border-radius: calc(var(--radius) - 2px);
  background-color: transparent;
  color: hsl(var(--foreground));
  font-size: 0.8125rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.link-box input:focus { outline: 2px solid hsl(var(--ring)); outline-offset: -1px; }

.alert {
  border: 1px solid hsl(var(--destructive) / 0.5);
  color: hsl(var(--destructive));
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
}

.note { font-size: 0.8125rem; color: hsl(var(--muted-foreground)); }

.hidden { display: none !important; }

footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}
