.tool-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

.tool-header {
  text-align: center;
  margin-bottom: 2rem;
}

.tool-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.tool-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* WebP Upload Section */
.webp-upload-section {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.webp-upload-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-primary);
}

.webp-upload-area {
  border: 2px dashed rgba(255, 107, 53, 0.3);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  background: rgba(255, 107, 53, 0.02);
}

.webp-upload-area:hover {
  border-color: var(--primary-color);
  background: rgba(255, 107, 53, 0.05);
  transform: translateY(-2px);
}

.webp-upload-area.dragover {
  border-color: var(--primary-color);
  background: rgba(255, 107, 53, 0.1);
  transform: scale(1.02);
}

.webp-upload-content i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: block;
}

.webp-upload-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.webp-upload-content p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.webp-btn-upload {
  padding: 1rem 2rem;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.webp-btn-upload:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
}

/* Options Section */
.webp-options {
  margin-top: 2rem;
}

.webp-option-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.webp-option-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.webp-option-label i {
  color: var(--primary-color);
}

.webp-options-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
  align-items: end;
}

.webp-option-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.webp-option-item label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.webp-option-item input[type="range"] {
  width: 100%;
  accent-color: var(--primary-color);
}

.webp-option-item input[type="number"] {
  padding: 0.5rem;
  background: var(--bg-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.webp-option-item input[type="checkbox"] {
  accent-color: var(--primary-color);
  margin-right: 0.5rem;
}

.webp-option-item span {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Convert Button */
.webp-convert {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.webp-btn-convert {
  padding: 1rem 3rem;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.webp-btn-convert:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(255, 107, 53, 0.3);
}

.webp-btn-convert:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Results Section */
.webp-results {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.webp-results::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-primary);
}

.webp-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.webp-results-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.webp-results-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.webp-btn-action {
  padding: 0.5rem 1rem;
  background: var(--bg-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.webp-btn-action:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.webp-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.webp-result-item {
  background: var(--bg-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.webp-result-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.webp-result-preview {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  background: var(--bg-secondary);
}

.webp-result-info {
  margin-bottom: 1rem;
}

.webp-result-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  word-break: break-word;
}

.webp-result-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.webp-result-actions {
  display: flex;
  gap: 0.5rem;
}

.webp-btn-download {
  flex: 1;
  padding: 0.5rem 1rem;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.webp-btn-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.webp-btn-remove {
  padding: 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.webp-btn-remove:hover {
  background: var(--error-color);
  color: white;
  border-color: var(--error-color);
}

/* Progress Section */
.webp-progress {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.webp-progress::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-primary);
}

.webp-progress-content {
  text-align: center;
}

.webp-progress-content i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: block;
}

.webp-progress-content span {
  display: block;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 1rem;
}

.webp-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.webp-progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  transition: width 0.3s ease;
  width: 0%;
}

/* File List */
.webp-file-list {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.webp-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.2s ease;
}

.webp-file-item:last-child {
  border-bottom: none;
}

.webp-file-item:hover {
  background: rgba(255, 107, 53, 0.05);
}

.webp-file-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.webp-file-icon {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
}

.webp-file-details {
  flex: 1;
}

.webp-file-name {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  word-break: break-word;
}

.webp-file-size {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.webp-file-remove {
  padding: 0.5rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.webp-file-remove:hover {
  background: var(--error-color);
  color: white;
  border-color: var(--error-color);
}

/* Animations */
.webp-result-item {
  animation: fadeInUp 0.3s ease-out;
}

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

.webp-file-item {
  animation: slideInLeft 0.2s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .webp-options-row {
    grid-template-columns: 1fr;
  }
  
  .webp-results-grid {
    grid-template-columns: 1fr;
  }
  
  .webp-results-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .webp-results-actions {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .webp-options-row {
    grid-template-columns: 1fr;
  }
}

.back-button {
  position: fixed;
  top: 2rem;
  left: 2rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  backdrop-filter: blur(20px);
}

.back-button:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
