/* ===== Base Styles ===== */
:root {
  --primary: #4361ee;
  --primary-dark: #3a56d4;
  --secondary: #3f37c9;
  --success: #4cc9f0;
  --danger: #f72585;
  --warning: #f8961e;
  --light: #f8f9fa;
  --dark: #212529;
  --gray: #6c757d;
  --border-radius: 0.375rem;
  --transition: all 0.2s ease;
}

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

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background-color: white;
  font-size: 16px;
}

h1, h2, h3 {
  margin-bottom: 1rem;
  color: var(--primary);
}

/* ===== Utility Classes ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.alert-danger {
  background-color: #fee2e2;
  color: #b91c1c;
  border-left: 4px solid #dc2626;
}

.alert-warning {
  background-color: #fef3c7;
  color: #92400e;
  border-left: 4px solid #f59e0b;
}

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

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

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

/* ===== Upload Form ===== */
.upload-container {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  max-width: none;
  margin: 0;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-control {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ced4da;
  border-radius: var(--border-radius);
}

.form-control-file {
  width: 100%;
  padding: 0.5rem 0;
}

/* ===== Progress Tracking ===== */
.progress-container {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  max-width: 95vw;
  margin: 2rem auto;
  text-align: center;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  margin: 2rem 0;
  position: relative;
}

.progress-steps::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: #e9ecef;
  z-index: 1;
}

.progress-step {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-number {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  color: var(--gray);
  font-weight: bold;
  transition: var(--transition);
}

.progress-step.active .step-number {
  background: var(--primary);
  color: white;
}

.progress-step.completed .step-number {
  background: var(--success);
  color: white;
}

.progress-step.error .step-number {
  background: var(--danger);
  color: white;
}

.progress {
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  margin: 1rem 0;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.3s ease;
}

.status-text {
  color: var(--gray);
  margin-top: 0.5rem;
  min-height: 1.5rem;
}

/* ===== Results Page ===== */
.results-container {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  max-width: none;
  margin: 0;
}

.download-list {
  margin-top: 2rem;
}

.download-list ul {
  list-style: none;
}

.download-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
}

.download-link {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

.download-link:hover {
  text-decoration: underline;
}

.file-size {
  color: var(--gray);
  font-size: 0.875rem;
}

/* ===== Toasts (Flash Messages) ===== */
.toast {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  padding: 1rem;
  border-radius: var(--border-radius);
  color: white;
  animation: slideIn 0.3s ease-out;
  z-index: 1000;
}

.toast-error {
  background: var(--danger);
}

.toast-success {
  background: var(--success);
}

@keyframes slideIn {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
  .progress-steps {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .progress-steps::before {
    display: none;
  }

  body {
    font-size: 18px; /* Larger on mobile */
  }
  
  h1 {
    font-size: 2rem; /* Larger headings */
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  .btn {
    padding: 0.75rem 1.25rem; /* Bigger buttons */
    font-size: 16px;
  }

  .form-control {
    padding: 0.75rem; /* Bigger inputs */
    font-size: 16px;
  }
}