:root {
  --bg: #0b0d12;
  --surface: #10141c;
  --card: #151a24;
  --inset: #0f131b;
  --border: #242a38;
  --border-active: #22d3ee;
  --accent: #22d3ee;
  --accent-hover: #06b6d4;
  --accent-dim: #12333d;
  --text: #e8edf7;
  --text-muted: #7c879a;
  --success: #34d399;
  --danger: #f87171;
  --warn: #fbbf24;
  --info: #60a5fa;
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 32px;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 4px;
}

/* Card */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.card h2 {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Dropzone */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--border-active);
  background: var(--accent-dim);
}

.dropzone-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.dropzone-text {
  color: var(--text-muted);
  margin-bottom: 12px;
}

.dropzone-hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 8px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--inset);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--border-active);
}

.btn-large {
  padding: 12px 32px;
  font-size: 1.05rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-sm {
  padding: 6px 16px;
  font-size: 0.85rem;
}

/* Warning Box */
.warning-box {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius-sm);
  color: var(--warn);
  font-size: 0.9rem;
}

/* File List */
.file-list {
  margin-top: 16px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.file-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.file-item-name {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-item-size {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.file-item-remove {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0 4px;
}

/* Upload Actions */
.upload-actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* Progress */
.progress-container {
  margin-top: 16px;
}

.progress-bar {
  height: 8px;
  background: var(--inset);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.3s;
  width: 0%;
}

.progress-text {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 8px;
}

/* Status */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.status-queued {
  background: rgba(96, 165, 250, 0.15);
  color: var(--info);
}

.status-running {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warn);
}

.status-completed {
  background: rgba(52, 211, 153, 0.15);
  color: var(--success);
}

.status-failed {
  background: rgba(248, 113, 113, 0.15);
  color: var(--danger);
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Output Files */
.output-files {
  margin-top: 16px;
}

.output-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.output-file-name {
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 400px;
}

.output-file-size {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 8px;
}

/* Error */
.error-box {
  margin-top: 12px;
  padding: 12px 16px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 0.9rem;
}

/* History */
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.history-item-info {
  color: var(--text-muted);
}

/* Footer */
footer {
  text-align: center;
  margin-top: 32px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

/* Utilities */
.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 600px) {
  .container { padding: 16px 12px; }
  header h1 { font-size: 1.5rem; }
  .card { padding: 16px; }
  .dropzone { padding: 28px 12px; }
}
