
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --background: #f8fafc;
  --card: rgba(255, 255, 255, 0.9);
  --border: rgba(99, 102, 241, 0.1);
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #e0e7ff 0%, #f0f9ff 100%);
  padding: 20px;
}

.container {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
}
.filter-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.slider.disabled {
  opacity: 0.5;
  pointer-events: none;
}
.download-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.header {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(to right, var(--primary), var(--primary-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 32px;
  text-align: center;
}

.video-container {
  display: grid;
  place-content: center;
}
.drop-zone {
  border: 2px dashed var(--primary);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  min-height: 500px;
  max-height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--card);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  /* transition: all 0.3s ease; */
  position: relative;
  overflow: hidden;
}

.drop-zone::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  /* transition: opacity 0.3s ease; */
}

.drop-zone.drag-over::before {
  opacity: 1;
}

.drop-zone.drag-over {
  transform: scale(1.02);
  box-shadow: 0 12px 48px rgba(99, 102, 241, 0.2);
}

.drop-zone-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 24px;
  color: var(--primary);
  /* animation: float 3s ease-in-out infinite; */
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.drop-zone-text {
  color: #1e293b;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.drop-zone-subtext {
  color: #64748b;
  font-size: 16px;
}

.sidebar {
  background: var(--card);
  padding: 24px;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
/* 
.filter-tabs {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
*/

/*
.filter-tab {
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  position: relative;
  transition: color 0.3s ease;
}
*/

/*
.filter-tab::after {
  content: "";
  position: absolute;
  bottom: -13px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
*/

/*
.filter-tab.active {
  color: var(--primary);
}
*/

/*
.filter-tab.active::after {
  transform: scaleX(1);
}
*/

.filter-section {
  /* margin-bottom: 32px; */
  /* padding-top: 20px; */
}

.filter-section:first-child {
  padding-top: 0;
}

.filter-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.filter-btn {
  padding: 8px 16px;
  border: 2px solid var(--primary);
  border-radius: 24px;
  background: transparent;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--primary);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: -1;
}

.filter-btn:hover {
  color: white;
}

.filter-btn:hover::before {
  transform: translateX(0);
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.controls {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 400px;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding-right: 10px;
}

.controls::-webkit-scrollbar {
  width: 6px;
}

.controls::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.controls::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.controls::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.control-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.control-label {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.control-value {
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
  min-width: 48px;
  text-align: right;
}

.slider {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  appearance: none;
  -webkit-appearance: none;
  margin: 10px 0;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--primary);
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
  transition: all 0.2s;
  margin-top: -6px; /* This centers the thumb on the track */
}
#video-preview {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Ensures the video fits while preserving aspect ratio */
  background: black; /* Optional: adds a background to avoid empty spaces */
}

.slider::-webkit-slider-runnable-track {
  height: 6px;
  background: var(--primary);
  border-radius: 3px;
}

#video-preview {
  max-width: 100%;
  border-radius: 12px;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.download-btn {
  display: block;
  width: fit-content;
  margin: 32px auto;
  padding: 12px 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.download-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(255, 255, 255, 0.2), transparent);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.download-btn:hover::before {
  transform: translateY(0);
}

.download-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
  }
}

/* Custom Video Controls */
#video-preview::-webkit-media-controls-panel {
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
}

#video-preview::-webkit-media-controls-play-button {
  background-color: var(--primary);
  border-radius: 50%;
}

.processing-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.processing-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--primary);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.drop-zone-container {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transform: translate(-50%, -50%);
}

.cancel-btn {
  position: absolute;
  top: -18px;
  right: -15px;
  width: 30px;
  height: 30px;
  border: none;
  cursor: pointer;
  display: none;
  justify-content: center;
  align-items: center;
  font-size: 30px;
  color: var(--primary);
  transition: all 0.2s ease;
  background-color: transparent;
}

.cancel-btn:hover {
  background-color: rgba(255, 255, 255, 1);
  color: var(--primary);
}
.background-blur-toggle {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
  pointer-events: none;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e2e8f0;
  transition: 0.4s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--primary);
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

input:disabled + .toggle-slider {
  background-color: #cbd5e1;
  cursor: not-allowed;
}

input:disabled + .toggle-slider:before {
  background-color: #94a3b8;
}

.toggle-label {
  margin-left: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  transition: opacity 0.3s ease;
}

.toggle-switch input:disabled ~ .toggle-label {
  opacity: 0.5;
}

/* video controllers */

.video-controls {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.1));
  padding: 12px 20px;
  display: flex;
  align-items: center;  /* Align items vertically */
  gap: 16px;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
  width: 70%;  /* Keep your specified width */
  border-radius: 8px;
}

.video-container:hover .video-controls {
  opacity: 1;
}

/* Play/Pause button container */
.control-button {
  position: relative;
  background: none;
  border: none;
  min-width: 32px;
  height: 32px;
  padding: 0;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Individual button styles */
.play-btn, .pause-btn {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.2s ease, transform 0.2s ease;
}



/* Seekbar container */
.seekbar-container {
  flex-grow: 1;
  position: relative;
  height: 40px;  /* Match height with other elements */
  display: flex;
  align-items: center;  /* Center the seekbar vertically */
}

/* Seekbar styles */
.seekbar {
  height: 3px;
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
  cursor: pointer;
  margin: 0;
  padding: 0;
  position: relative;
}

.seekbar::-webkit-slider-runnable-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 1.5px;
}

.seekbar::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 13px;
  width: 13px;
  border-radius: 50%;
  background: white;
  margin-top: -5px;
  opacity: 0;
  transition: opacity 0.2s ease;
  cursor: pointer;
}

.seekbar:hover::-webkit-slider-thumb {
  opacity: 1;
}

/* Time display */
.time-display {
  color: white;
  font-size: 13px;
  min-width: 85px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  flex-shrink: 0;  /* Prevent time from shrinking */
  display: flex;
  align-items: center;
  height: 40px;  /* Match height with other elements */
}

/* Make sure the gradient on seekbar works */
.seekbar {
  background: linear-gradient(
    to right,
    white 0%,
    white var(--seek-percent, 0%),
    rgba(255, 255, 255, 0.3) var(--seek-percent, 0%)
  );
}

.play-btn svg, .pause-btn svg {
  width: 24px;
  height: 24px;
}

/* Show play button when video is paused */
.video-paused .play-btn {
  opacity: 1;
  transform: scale(1);
}

/* Show pause button when video is playing */
.video-playing .pause-btn {
  opacity: 1;
  transform: scale(1);
}
