/* Reset and Base Styles */
#pixylinx-compressor * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

#pixylinx-compressor .body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  transition: all 0.3s ease;
}

#pixylinx-compressor .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* TOOL CONTAINER */

#pixylinx-compressor .tool-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

/* Upload Area */
#pixylinx-compressor .upload-area {
  border: 2px dashed #667eea;
  border-radius: 12px;
  padding: 3rem;
  text-align: center;
  margin-bottom: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(102, 126, 234, 0.05);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.upload-area:hover {
  border-color: #553c9a;
  background: rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.upload-area.dragover {
  border-color: #553c9a;
  background: rgba(102, 126, 234, 0.15);
  transform: scale(1.02);
}

#pixylinx-compressor .upload-icon {
  font-size: 3rem;
  color: #667eea;
  margin-bottom: 1rem;
}

#pixylinx-compressor .upload-area h3 {
  color: #2d3748;
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

#pixylinx-compressor .upload-area p {
  color: #4a5568;
  margin-bottom: 1rem;
}

#pixylinx-compressor .upload-btn {
  background: #667eea;
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

#pixylinx-compressor .upload-btn:hover {
  background: #553c9a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Settings Container */
#pixylinx-compressor .settings-container {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

#pixylinx-compressor .settings-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

#pixylinx-compressor .settings-header i {
  color: #667eea;
  font-size: 1.2rem;
}

#pixylinx-compressor .settings-header h3 {
  color: #2d3748;
  font-size: 1.2rem;
  font-weight: 600;
}

#pixylinx-compressor .settings-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

#pixylinx-compressor .settings-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

#pixylinx-compressor .setting-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#pixylinx-compressor .setting-group label {
  font-weight: 500;
  color: #4a5568;
}

#pixylinx-compressor .setting-group input,
#pixylinx-compressor .setting-group select {
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

#pixylinx-compressor .setting-group input:focus,
#pixylinx-compressor .setting-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#pixylinx-compressor .setting-group input[type="range"] {
  appearance: none;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  outline: none;
}

#pixylinx-compressor .setting-group input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  background: #667eea;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

#pixylinx-compressor .setting-group input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #667eea;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

/* Action Buttons */
#pixylinx-compressor .action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

#pixylinx-compressor .btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 150px;
  justify-content: center;
}

#pixylinx-compressor .btn-primary {
  background: #667eea;
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

#pixylinx-compressor .btn-primary:hover:not(:disabled) {
  background: #553c9a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

#pixylinx-compressor .btn-secondary {
  background: transparent;
  color: #667eea;
  border: 2px solid #667eea;
}

#pixylinx-compressor .btn-secondary:hover:not(:disabled) {
  background: #667eea;
  color: white;
  transform: translateY(-2px);
}

#pixylinx-compressor .btn-danger {
  background: #e53e3e;
  color: white;
  box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

#pixylinx-compressor .btn-danger:hover:not(:disabled) {
  background: #c53030;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(229, 62, 62, 0.4);
}

#pixylinx-compressor .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#pixylinx-compressor .btn-loading {
  display: none;
}

/* Image Grid */
#pixylinx-compressor .image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

#pixylinx-compressor .image-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

#pixylinx-compressor .image-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

#pixylinx-compressor .image-preview {
  position: relative;
  height: 200px;
  overflow: hidden;
}

#pixylinx-compressor .image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#pixylinx-compressor .remove-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: #e53e3e;
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#pixylinx-compressor .remove-btn:hover {
  background: #c53030;
  transform: scale(1.1);
}

#pixylinx-compressor .image-info {
  padding: 1rem;
}

#pixylinx-compressor .image-name {
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#pixylinx-compressor .image-size {
  color: #4a5568;
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

#pixylinx-compressor .image-savings {
  color: #38a169;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

#pixylinx-compressor .download-btn {
  background: #667eea;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  justify-content: center;
}

#pixylinx-compressor .download-btn:hover {
  background: #553c9a;
  transform: translateY(-1px);
}

/* Toast Notification */
#pixylinx-compressor .toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #38a169;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
  max-width: 400px;
}

#pixylinx-compressor .toast.show {
  transform: translateX(0);
  opacity: 1;
}

#pixylinx-compressor .toast.error {
  background: #e53e3e;
}

#pixylinx-compressor .toast.warning {
  background: #ed8936;
}

#pixylinx-compressor .toast-message {
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
#pixylinx-compressor .tool-container {
    padding: 1.5rem;
  }

#pixylinx-compressor .upload-area {
    padding: 2rem;
  }

#pixylinx-compressor .settings-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

#pixylinx-compressor  .action-buttons {
    flex-direction: column;
  }

#pixylinx-compressor  .btn {
    width: 100%;
  }

#pixylinx-compressor  .image-grid {
    grid-template-columns: 1fr;
  }

@media (max-width: 480px) {
#pixylinx-compressor  .container {
    padding: 0 15px;
  }

#pixylinx-compressor  .tool-container {
    padding: 1rem;
  }

#pixylinx-compressor  .upload-area {
    padding: 1.5rem;
  }

#pixylinx-compressor  .upload-area h3 {
    font-size: 1.1rem;
  }

#pixylinx-compressor  .settings-container {
    padding: 1rem;
  }
  }
}