/* Image Compressor Tool Specific Styles */

/* Tool Hero Section */
.tool-hero {
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tool-hero::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 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%2319F57" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.03;
  pointer-events: none;
}

.tool-hero-content {
  position: relative;
  z-index: 1;
}

.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #2563EB 0%, #6366F1 100%);
  color: white;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.tool-title {
  font-family: 'Outfit', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.tool-description {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  color: #475569;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.tool-features {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 0.5rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: #2563EB;
}

.feature-icon {
  width: 20px;
  height: 20px;
  color: #2563EB;
}

/* Tool Section */
.tool-section {
  padding: 4rem 0;
  background: #F8FAFC;
}

.tool-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Upload Area */
.tool-input {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.upload-area {
  border: 2px dashed #CBD5E1;
  border-radius: 0.75rem;
  padding: 3rem 2rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  background: #FAFBFC;
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: #2563EB;
  background: #EFF6FF;
}

.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.upload-icon {
  width: 48px;
  height: 48px;
  color: #94A3B8;
  margin-bottom: 1rem;
}

.upload-content h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #0F172A;
  margin: 0;
}

.upload-content p {
  font-family: 'Outfit', sans-serif;
  font-size: 0.875rem;
  color: #64748B;
  margin: 0;
}

.upload-formats {
  font-size: 0.75rem !important;
  color: #94A3B8 !important;
}

#file-input {
  display: none;
}

.upload-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: center;
}

/* Results Area */
.tool-output {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.results-summary {
  background: #F8FAFC;
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid #E2E8F0;
  margin-bottom: 2rem;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.stat-item {
  text-align: center;
}

.stat-label {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  color: #64748B;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  font-weight: 600;
  color: #2563EB;
}

/* Image List */
.image-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 400px;
  overflow-y: auto;
}

.image-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 1rem;
  padding: 1rem;
  background: #F8FAFC;
  border-radius: 0.75rem;
  border: 1px solid #E2E8F0;
  align-items: center;
}

.image-preview {
  width: 80px;
  height: 80px;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #F1F5F9;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-info h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0F172A;
  margin: 0 0 0.5rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-stats {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.image-stats .stat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #64748B;
}

.image-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  min-width: 80px;
}

/* Features Section */
.features-section {
  padding: 4rem 0;
  background: white;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: 1rem;
  border: 1px solid #E5E7EB;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  border-color: #2563EB;
}

.feature-icon-wrapper {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.feature-icon-wrapper svg {
  width: 32px;
  height: 32px;
  color: #2563EB;
}

.feature-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #0F172A;
  margin-bottom: 1rem;
}

.feature-card p {
  font-family: 'Outfit', sans-serif;
  font-size: 0.875rem;
  color: #64748B;
  line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
  .tool-hero {
    padding: 3rem 0;
  }
  
  .tool-title {
    font-size: 2.5rem;
  }
  
  .tool-description {
    font-size: 1.125rem;
    padding: 0 1rem;
  }
  
  .tool-features {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .tool-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .upload-area {
    padding: 2rem 1rem;
  }
  
  .summary-stats {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .image-item {
    grid-template-columns: 60px 1fr;
    gap: 0.75rem;
  }
  
  .image-preview {
    width: 60px;
    height: 60px;
  }
  
  .image-actions {
    flex-direction: row;
    justify-content: flex-end;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .upload-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .tool-title {
    font-size: 2rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .feature-card {
    padding: 1.5rem 1rem;
  }
  
  .image-item {
    padding: 0.75rem;
  }
  
  .btn-sm {
    min-width: 70px;
    font-size: 0.7rem;
    padding: 0.4rem 0.8rem;
  }
}

/* Loading States */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn:disabled:hover {
  transform: none;
}

/* Scrollbar Styling */
.image-list::-webkit-scrollbar {
  width: 6px;
}

.image-list::-webkit-scrollbar-track {
  background: #F1F5F9;
  border-radius: 3px;
}

.image-list::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 3px;
}

.image-list::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Animation for drag over state */
@keyframes pulse {
  0%, 100% {
    border-color: #CBD5E1;
  }
  50% {
    border-color: #2563EB;
  }
}

.upload-area.drag-over {
  animation: pulse 2s infinite;
}
