/* Simple mobile-friendly layout with large touch targets */

:root {
  --bg: #0f172a;          /* dark background */
  --card-bg: #111827;
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.15);
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --danger: #f87171;
  --success: #22c55e;
  --warning: #facc15;
  --border: #1f2937;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(circle at top, #1e293b 0, #020617 55%);
  color: var(--text-main);
}

/* Layout */

.app-header {
  padding: 1.5rem 1rem 0.5rem;
  text-align: center;
}

.app-header h1 {
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
}

.app-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.app-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1rem 1.25rem 1.25rem;
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.card h2 {
  margin-top: 0;
  font-size: 1.15rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: none;
  padding: 0.8rem 1.6rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  background: #374151;
  color: var(--text-main);
  transition: background 0.15s ease, transform 0.1s ease;
}

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

.btn.full-width {
  width: 100%;
  margin-top: 0.75rem;
}

.btn:hover {
  background: #4b5563;
  transform: translateY(-1px);
}

.btn.primary:hover {
  background: #2563eb;
}

.btn:active {
  transform: translateY(0);
  opacity: 0.9;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: default;
}

/* File input row */

.file-input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.file-info {
  font-size: 0.9rem;
  color: var(--text-muted);
  word-break: break-all;
}

/* Drag & drop */

.drop-zone {
  border-radius: var(--radius);
  border: 1px dashed #4b5563;
  padding: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  background: rgba(15, 23, 42, 0.7);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text-main);
}

/* Form fields */

.field {
  margin-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-size: 0.9rem;
}

.field input {
  border-radius: 999px;
  border: 1px solid #374151;
  padding: 0.7rem 0.9rem;
  font-size: 1rem;
  color: var(--text-main);
  background: #020617;
}

.field input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Progress bar */

.progress-container {
  margin-top: 1rem;
}

.progress-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.progress-bar-outer {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #020617;
  overflow: hidden;
}

.progress-bar-inner {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b82f6, #22c55e);
  transition: width 0.15s ease;
}

/* Messages */

.message {
  margin-top: 0.75rem;
  padding: 0.6rem 0.8rem;
  border-radius: 999px;
  font-size: 0.9rem;
  display: none;
}

.message.show {
  display: block;
}

.message.error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.5);
  color: var(--danger);
}

.message.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.5);
  color: var(--success);
}

.message.warning {
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.5);
  color: var(--warning);
}

/* File list */

.file-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 320px;
  overflow-y: auto;
}

.file-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid #1f2937;
}

.file-main {
  flex: 1 1 auto;
  min-width: 0;
}

.file-name {
  font-size: 0.9rem;
  word-break: break-all;
}

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

.file-row .btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* Footer */

.app-footer {
  max-width: 800px;
  margin: 0.5rem auto 1.5rem;
  padding: 0 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Small screens */

@media (max-width: 600px) {
  .file-input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .file-info {
    text-align: left;
  }
}