/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables for consistent theming */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --info-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  
  --text-primary: #2d3748;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --bg-light: #f7fafc;
  --bg-white: #ffffff;
  --border-light: #e2e8f0;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin-bottom: 60px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-light);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Hero Section */
.hero-section {
  position: relative;
  background: var(--primary-gradient);
  min-height: 60vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="300" fill="url(%23a)"/><circle cx="800" cy="300" r="200" fill="url(%23a)"/><circle cx="400" cy="700" r="250" fill="url(%23a)"/></svg>');
  opacity: 0.3;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.1);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: white;
  text-align: center;
  padding: 2rem 0;
}

.hero-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  animation: float 3s ease-in-out infinite;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-features {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.feature-badge {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Main Content */
.main-content {
  padding: 4rem 0;
  position: relative;
  z-index: 1;
}

/* Step Cards */
.step-card {
  background: var(--bg-white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  border: none;
  overflow: hidden;
  transition: var(--transition);
  opacity: 1;
  transform: translateY(0);
}

.step-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.step-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.step-card-1 {
  border-left: 4px solid #667eea;
}

.step-card-2 {
  border-left: 4px solid #4facfe;
}

.step-header {
  display: flex;
  align-items: center;
  padding: 2rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-bottom: 1px solid var(--border-light);
}

.step-number {
  background: var(--primary-gradient);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-right: 1.5rem;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.step-title i {
  margin-right: 0.5rem;
  color: #667eea;
}

.step-description {
  color: var(--text-secondary);
  margin: 0;
  font-size: 1rem;
}

.step-body {
  padding: 2rem;
}

/* Upload Area */
.upload-area {
  border: 2px dashed var(--border-light);
  border-radius: var(--border-radius);
  padding: 3rem 2rem;
  text-align: center;
  transition: var(--transition);
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.upload-area:hover {
  border-color: #667eea;
  background: linear-gradient(135deg, #f0f4ff 0%, #e6f0ff 100%);
}

.upload-area.drag-over {
  border-color: #667eea;
  background: linear-gradient(135deg, #e6f0ff 0%, #cce7ff 100%);
  transform: scale(1.02);
}

.upload-icon {
  font-size: 3rem;
  color: #667eea;
  margin-bottom: 1rem;
}

.upload-content {
  position: relative;
}

.upload-label {
  cursor: pointer;
  display: block;
}

.upload-text {
  display: block;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.upload-subtext {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.upload-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

/* File Upload Groups */
.file-upload-group {
  margin-bottom: 1.5rem;
}

.file-label {
  display: flex;
  align-items: center;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.file-label i {
  margin-right: 0.5rem;
  font-size: 1.125rem;
}

.file-input {
  border: 2px solid var(--border-light);
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  transition: var(--transition);
}

.file-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.file-help {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Privacy Option */
.privacy-option {
  background: linear-gradient(135deg, #f0fff4 0%, #e6fffa 100%);
  border: 1px solid #9ae6b4;
  border-radius: var(--border-radius);
  padding: 1rem;
  margin: 1.5rem 0;
}

.custom-checkbox .form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
}

.custom-checkbox .form-check-label {
  display: flex;
  align-items: center;
  font-weight: 500;
  color: var(--text-primary);
}

.custom-checkbox .form-check-label i {
  margin-right: 0.5rem;
  color: #38a169;
}

/* Buttons */
.btn {
  border-radius: var(--border-radius);
  font-weight: 600;
  padding: 0.75rem 2rem;
  transition: var(--transition);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-extract {
  background: var(--info-gradient);
}

.btn-generate {
  background: var(--success-gradient);
}

.btn-download {
  background: var(--primary-gradient);
  color: white;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-download:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn.processing {
  transform: scale(0.98);
}

/* Result Cards */
.result-card {
  background: var(--bg-white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  border: none;
  overflow: hidden;
  transition: var(--transition);
  opacity: 1;
  transform: translateY(0);
}

.result-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.result-success {
  border-left: 4px solid #38a169;
}

.result-error {
  border-left: 4px solid #e53e3e;
}

.result-header {
  display: flex;
  align-items: center;
  padding: 2rem;
  background: linear-gradient(135deg, #f0fff4 0%, #e6fffa 100%);
}

.result-error .result-header {
  background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
}

.result-icon {
  font-size: 2.5rem;
  margin-right: 1.5rem;
  color: #38a169;
}

.result-error .result-icon {
  color: #e53e3e;
}

.result-content {
  flex: 1;
}

.result-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.result-description {
  color: var(--text-secondary);
  margin: 0;
}

.result-actions {
  padding: 0 2rem 2rem;
}

/* Instructions Card */
.instructions-card {
  background: var(--bg-white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  border: none;
  overflow: hidden;
  transition: var(--transition);
  opacity: 1;
  transform: translateY(0);
}

.instructions-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.instructions-header {
  padding: 2rem 2rem 1rem;
  text-align: center;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.instructions-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.instructions-title i {
  color: #f6ad55;
  margin-right: 0.5rem;
}

.instructions-subtitle {
  color: var(--text-secondary);
  margin: 0;
}

.instructions-body {
  padding: 2rem;
}

.instruction-step {
  text-align: center;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.instruction-step:hover {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  transform: translateY(-5px);
}

.instruction-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 2rem;
  color: white;
}

.instruction-step:nth-child(1) .instruction-icon {
  background: var(--info-gradient);
}

.instruction-step:nth-child(2) .instruction-icon {
  background: var(--success-gradient);
}

.instruction-step:nth-child(3) .instruction-icon {
  background: var(--primary-gradient);
}

.instruction-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.instruction-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Focus States */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .step-header {
    flex-direction: column;
    text-align: center;
  }
  
  .step-number {
    margin-right: 0;
    margin-bottom: 1rem;
  }
  
  .hero-features {
    flex-direction: column;
    align-items: center;
  }
  
  .instruction-step {
    margin-bottom: 2rem;
  }
}

/* Loading States */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}