/* Modern CSS Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.upload-card {
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
}

.header h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Form */
.upload-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.file-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.file-hint {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--text-light);
}

input[type="text"],
input[type="file"] {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s ease;
  font-family: inherit;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

input[type="file"] {
  cursor: pointer;
  padding: 0.5rem;
}

input[type="file"]::file-selector-button {
  padding: 0.5rem 1rem;
  border: none;
  background: var(--primary);
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  margin-right: 1rem;
  transition: background 0.2s ease;
}

input[type="file"]::file-selector-button:hover {
  background: var(--primary-dark);
}

/* File List */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: 6px;
  font-size: 0.9rem;
}

.file-item-icon {
  font-size: 1.2rem;
}

.file-item-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-item-size {
  color: var(--text-light);
  font-size: 0.85rem;
}

/* Progress Bar */
.progress-container {
  margin: 1rem 0;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, #6366f1 100%);
  border-radius: 10px;
  transition: width 0.3s ease;
  width: 0%;
}

.progress-text {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 500;
}

/* Messages */
.message-container {
  display: none;
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.message-container.show {
  display: block;
}

.message-container.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid var(--success);
}

.message-container.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid var(--error);
}

.message-container.warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid var(--warning);
}

/* Submit Button */
.submit-btn {
  padding: 1rem 2rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
}

.submit-btn:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px -2px rgba(79, 70, 229, 0.4);
}

.submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.submit-btn:disabled {
  background: var(--text-light);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-icon {
  font-size: 1.2rem;
}

/* Footer */
.footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--border);
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
}

.small-text {
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

/* Responsive Design */
@media (max-width: 640px) {
  .upload-card {
    padding: 1.5rem;
  }

  .header h1 {
    font-size: 1.5rem;
  }

  .submit-btn {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
}

/* Loading State */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  to {
    left: 100%;
  }
}




