:root {
  --bg: #0c0f12;
  --bg-elevated: #141a20;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8edf2;
  --text-muted: #8b9aab;
  --accent: #3dd6c6;
  --accent-dim: rgba(61, 214, 198, 0.15);
  --accent-glow: rgba(61, 214, 198, 0.35);
  --danger: #f07178;
  --success: #7fd99a;
  --radius: 14px;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-display: 'Instrument Serif', Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black, transparent);
  opacity: 0.5;
}

.shell {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 5rem;
}

.hero {
  margin-bottom: 2rem;
  animation: rise 0.6s ease-out both;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.brand-logo {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  color: var(--accent);
  object-fit: contain;
}

.brand-text .eyebrow {
  margin-bottom: 0.25rem;
}

.brand-text h1 {
  margin: 0;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1,
.brand-text h1 {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 5vw, 2.35rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
  animation: rise 0.6s ease-out both;
}

.card:nth-of-type(2) {
  animation-delay: 0.08s;
}
.card:nth-of-type(3) {
  animation-delay: 0.16s;
}
.card:nth-of-type(4) {
  animation-delay: 0.24s;
}

.field-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.field-row {
  display: flex;
  gap: 0.5rem;
}

input[type='password'],
input[type='text'] {
  flex: 1;
  width: 100%;
  padding: 0.7rem 0.9rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.hint {
  margin: 0.65rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.drop-card {
  padding: 0;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.drop-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.drop-card.is-dragover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 12px 40px -12px var(--accent-glow);
}

.drop-inner {
  padding: 2.25rem 1.5rem;
  text-align: center;
}

.drop-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  color: var(--accent);
  opacity: 0.9;
}

.drop-icon svg {
  width: 100%;
  height: 100%;
}

.drop-title {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.drop-sub {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.drop-limit {
  margin: 1rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.btn {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1.1rem;
  transition: transform 0.15s, background 0.2s, opacity 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  color: var(--bg);
  background: var(--accent);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.08);
}

.btn-ghost {
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--text-muted);
}

.btn-sm {
  font-size: 0.8rem;
  padding: 0.4rem 0.75rem;
}

.queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.queue-head h2 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.queue-count {
  color: var(--text-muted);
  font-weight: 500;
}

.queue-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.queue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.queue-item {
  padding: 0.75rem 0.85rem;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.queue-item__top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.queue-item__name {
  font-size: 0.88rem;
  font-weight: 500;
  word-break: break-all;
}

.queue-item__meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.queue-item__status {
  font-size: 0.75rem;
  font-weight: 600;
}

.queue-item__status--pending {
  color: var(--text-muted);
}
.queue-item__status--uploading {
  color: var(--accent);
}
.queue-item__status--done {
  color: var(--success);
}
.queue-item__status--error {
  color: var(--danger);
}
.queue-item__status--paused {
  color: var(--text-muted);
}

.queue-item__actions {
  margin-top: 0.45rem;
  display: flex;
  gap: 0.35rem;
}

.progress {
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.15s ease-out;
}

.progress__bar.is-indeterminate {
  width: 40% !important;
  animation: indeterminate 1.2s ease-in-out infinite;
}

.hidden {
  display: none !important;
}

.foot {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: linear-gradient(transparent, var(--bg) 40%);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes indeterminate {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(350%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
