:root {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
  --background: #f8fafc;
  --surface: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
  padding: 20px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: white;
  padding: 2rem;
  text-align: center;
}

.header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
}

.header p {
  margin: 0.5rem 0 0 0;
  opacity: 0.9;
}

.content {
  padding: 2rem;
}

.upload-area {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 2rem 1rem;
  text-align: center;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
  background: #fafbfc;
}

.upload-area:hover, .upload-area.dragover {
  border-color: var(--primary-color);
  background: #f0f9ff;
  transform: translateY(-2px);
}

.upload-area .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.upload-area p {
  margin: 0 0 1rem 0;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

#uploadButton {display: none;}

/* Selected files display */
.selected-files {
  margin: 1rem 0;
  text-align: left;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.selected-file {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.more-files {
  color: var(--text-secondary);
  font-style: italic;
  text-align: center;
  padding: 0.5rem;
}

/* Progress bar styles */
.file-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: #3b82f6;
    width: 0;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: #555;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    font-size: 14px;
}

.notification.success {
    border-color: #10b981;
    color: #10b981;
}

.notification.error {
    border-color: #ef4444;
    color: #ef4444;
}

input[type="file"] {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}
  
.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
}
  
.btn-success {
  background: var(--success-color);
  color: white;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
}
  
.btn-success:hover {
  background: #059669;
}
  
.btn-full {
  width: 100%;
  justify-content: center;
}

.file-info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.file-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.file-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.file-details h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.file-meta {
  display: flex;
  gap: 1rem;
  margin: 0.5rem 0 0 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.code-section {
  margin: 1rem 0;
}

.code-section label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.code-block {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  word-break: break-all;
  position: relative;
  margin-bottom: 0.5rem;
}

.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}

.message {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.message.success {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #065f46;
}

.message.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* Enhanced Notifications */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  min-width: 300px;
  max-width: 500px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease-out;
}

.notification.success {
  background: var(--success-color);
  color: white;
}

.notification.error {
  background: var(--error-color);
  color: white;
}

.notification.warning {
  background: var(--warning-color);
  color: white;
}

.notification-content {
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.notification-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.notification-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

@keyframes slideIn {
  from {
      transform: translateX(100%);
      opacity: 0;
  }
  to {
      transform: translateX(0);
      opacity: 1;
  }
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.info-card {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}

.info-card strong {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.info-card span {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.download-link:hover {
  background: var(--background);
  border-color: var(--border-hover);
}

@media (max-width: 768px) {
  body {
      padding: 10px;
  }
  
  .header {
      padding: 1.5rem;
  }
  
  .content {
      padding: 1.5rem;
  }
  
  .upload-area {
      padding: 2rem 1rem;
  }
  
  .file-header {
      flex-direction: column;
      text-align: center;
  }
  
  .file-meta {
      justify-content: center;
  }
  
  .notification {
      right: 10px;
      left: 10px;
      min-width: auto;
  }
  
  .overall-progress {
      flex-direction: column;
      gap: 0.5rem;
  }
  
  .uploading-file {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.5rem;
  }
  
  .file-info {
      width: 100%;
  }
}