* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


.container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 750px;
  position: relative;
  z-index: 1;
  transform: translateY(20px);
  animation: slideUp 0.8s ease-out forwards;
  margin: 40px auto;
}

@keyframes slideUp {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.header {
  text-align: center;
  margin-bottom: 30px;
}

.header h1 {
  color: #333;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header p {
  color: #666;
  font-size: 1.1rem;
  opacity: 0;
  animation: fadeIn 1s ease-out 0.5s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.input-section {
  margin-bottom: 30px;
}

.input-group {
  display: flex;
  gap: 15px;
  align-items: stretch;
  margin-bottom: 20px;
  position: relative;
  box-sizing: border-box;

}

.input-wrapper {
  flex: 1;
  position: relative;
  box-sizing: border-box;

  
}

.ytpro-input {
  width: 100% !important;
  padding: 16px 20px !important;
  font-size: 16px !important;
  border: 2px solid #e1e5e9 !important;
  border-radius: 12px !important;
  background: #f8f9fa !important;
  transition: all 0.3s ease !important;
  outline: none !important;
  box-sizing: border-box !important;

}

.ytpro-input:focus {
  border-color: #667eea !important;
  background: white !important;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1) !important;
  transform: translateY(-2px) !important;
}

.fetch-btn {
  padding: 16px 30px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  background: linear-gradient(135deg, #667eea, #764ba2) !important;
  color: white !important;
  border: none !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  overflow: hidden !important;
  min-width: 120px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.fetch-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3) !important;
}

.fetch-btn:active {
  transform: translateY(0) !important;
}

.fetch-btn.loading {
  pointer-events: none;
}

.btn-text {
  transition: opacity 0.3s ease;
}

.btn-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 25px;
  height: 25px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fetch-btn.loading .btn-text {
  opacity: 0;
}
.fetch-btn.loading .btn-spinner {
  opacity: 1;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.preview-section {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.5s ease;
}

.preview-section.show {
  opacity: 1;
  transform: translateY(0);
}

.video-card {
  background: white;
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  margin-bottom: 25px;
  border: 1px solid #e1e5e9;
}

.video-info {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
  align-items: center;
}

.thumbnail-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  min-width: 200px;
}

.thumbnail {
  width: 200px;
  height: 112px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.thumbnail:hover {
  transform: scale(1.05);
}

.video-details {
  flex: 1;
}

.video-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
  line-height: 1.4;
}

.video-meta {
  color: #666;
  font-size: 0.9rem;
}

/* Professional Format List Styles */
.formats-section {
  margin-top: 25px;
}

.formats-title {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
}

.formats-list {
  display: grid;
  gap: 12px;
}

.format-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: #f8f9fa;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.format-item:hover {
  background: #f0f4f8;
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}

.format-item.selected {
  background: rgba(102, 126, 234, 0.1);
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.format-info {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
}

.format-icon {
  
}
.format-icon img{
  width: 50px;
  /* height: 50px; */
  /* object-fit:cover; */
  /* border-radius: 8px; */
  
}

.format-details {
  flex: 1;
}

.format-quality {
  font-weight: 600;
  color: #333;
  font-size: 1rem;
  margin-bottom: 4px;
}

.format-type {
  font-size: 0.85rem;
  color: #666;
  display: flex;
  align-items: center;
  gap: 8px;
}

.format-badge {
  background: #667eea;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.download-btn {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 100px;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin: 0px auto;
}

.download-btn.downloading {
  pointer-events: none;
  opacity: 0.8;
}

.download-btn-text {
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
}

.download-btn-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 25px;
  height: 25px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.download-btn.downloading .download-btn-text {
  opacity: 0;
}
.download-btn.downloading .download-btn-spinner {
  opacity: 1;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.download-btn:active {
  transform: translateY(0);
}

.error-message {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  font-weight: 500;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 30px 20px;
    margin: 10px;
  }

  .header h1 {
    font-size: 2rem;
  }

  .input-group {
    flex-direction: column;
    gap: 15px;
  }

  .video-info {
    flex-direction: column;
    text-align: center;
  }

  .thumbnail-wrapper {
    min-width: auto;
  }

  .format-item {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .format-info {
    flex-direction: column;
    text-align: center;
  }
}

/* Download progress styles */
.download-progress {
  background: white;
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  margin-bottom: 25px;
  border: 1px solid #e1e5e9;
  text-align: center;
}

.progress-icon {
  margin-bottom: 5px;
  animation: bounce 1s ease-in-out infinite;
  margin-top: 10px;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.progress-text {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.progress-subtext {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e1e5e9;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 15px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 4px;
  animation: progressAnimation 2s ease-in-out infinite;
  width: 0%;
  transition: width 0.3s ease;
}

@keyframes progressAnimation {
  0% {
    width: 10%;
  }
  50% {
    width: 80%;
  }
  100% {
    width: 90%;
  }
}

.success-animation {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 15px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
  transform: translateX(400px);
  animation: slideInRight 0.5s ease-out forwards,
    slideOutRight 0.5s ease-in 3s forwards;
  z-index: 1000;
}

@keyframes slideInRight {
  to {
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  to {
    transform: translateX(400px);
  }
}
.done-img {
  margin: 0px auto;
    width: 70px;
}
.download_icon {
    width: 20px;
}