.ig-downloader {
  max-width: 700px;
  margin: 0 auto;
}

.download-form {
  margin-bottom: 2rem;
}

.input-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

#igUrl {
  flex: 1;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

#igUrl:focus {
  outline: none;
  border-color: #E1306C;
}

.btn-primary {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #E1306C 0%, #C13584 50%, #833AB4 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(225, 48, 108, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.hint {
  color: #666;
  font-size: 0.875rem;
  margin: 0;
}

.result-area {
  margin-top: 2rem;
  animation: slideIn 0.3s ease-out;
}

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

.preview-card {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

#thumbnail {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.download-options {
  flex: 1;
}

.download-options h3 {
  margin: 0 0 1rem 0;
  font-size: 1.125rem;
  color: #333;
}

#downloadLinks {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #E1306C;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: background 0.2s;
}

.download-btn:hover {
  background: #C13584;
}

.download-btn svg {
  width: 20px;
  height: 20px;
}

.error-msg {
  margin-top: 1rem;
  padding: 1rem;
  background: #fee;
  border-left: 4px solid #c00;
  border-radius: 4px;
  color: #c00;
}

.loading {
  margin-top: 2rem;
  text-align: center;
  padding: 2rem;
}

.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 1rem;
  border: 4px solid #f0f0f0;
  border-top-color: #E1306C;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .input-group {
    flex-direction: column;
  }
  
  .btn-primary {
    width: 100%;
  }
  
  .preview-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  #thumbnail {
    width: 100%;
    max-width: 300px;
    height: auto;
  }
}