/* Video Clipper Enhancements */

/* Video Controls */
.video-wrapper {
  position: relative;
  background: #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
}

.video-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  flex-wrap: wrap;
}

.control-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
  min-width: 40px;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
}

.control-btn:active {
  transform: scale(0.95);
}

.time-display {
  font-family: monospace;
  font-size: 0.9rem;
  color: #ccc;
  min-width: 80px;
}

.speed-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.speed-select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

.seek-controls {
  display: flex;
  gap: 0.25rem;
}

/* Keyboard Shortcuts Help */
.shortcuts-help {
  margin-top: 1rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.shortcuts-help summary {
  cursor: pointer;
  padding: 0.5rem;
  font-weight: 500;
  color: #666;
}

.shortcuts-help[open] summary {
  color: #333;
}

.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.5rem;
}

.shortcuts-grid > div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

kbd {
  background: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 2px 6px;
  font-family: monospace;
  font-size: 0.75rem;
  color: #333;
  min-width: 24px;
  text-align: center;
  display: inline-block;
}

/* Export Settings */
.export-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.preset-controls,
.filename-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filename-controls {
  position: relative;
}

.filename-controls .form-control {
  padding-right: 50px;
}

.file-extension {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  font-size: 0.9rem;
  pointer-events: none;
}

/* Keyboard Notifications */
.keyboard-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  z-index: 1000;
  animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateX(100%); }
  15%, 85% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(100%); }
}

/* Enhanced Timeline */
.timeline-track {
  cursor: pointer;
  position: relative;
}

.timeline-track::after {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 40px;
  cursor: pointer;
}

/* Improved handle visibility */
.timeline-handle {
  cursor: grab;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border: 2px solid white;
}

.timeline-handle:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.timeline-handle:active {
  cursor: grabbing;
  transform: scale(1.2);
}

/* Progress improvements */
.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.progress-details {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.5rem;
  font-family: monospace;
}

/* Responsive Design */
@media (max-width: 768px) {
  .video-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .seek-controls {
    justify-content: center;
  }
  
  .export-settings {
    grid-template-columns: 1fr;
  }
  
  .shortcuts-grid {
    grid-template-columns: 1fr;
  }
  
  .control-btn {
    padding: 0.75rem;
    font-size: 1.1rem;
  }
}

/* Dark mode enhancements */
[data-color-scheme="dark"] .keyboard-notification {
  background: rgba(45, 166, 178, 0.95);
  color: white;
}

[data-color-scheme="dark"] .export-settings {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-color-scheme="dark"] kbd {
  background: #333;
  border-color: #555;
  color: #ccc;
}

/* Loading and success states */
.export-settings.loading {
  opacity: 0.6;
  pointer-events: none;
}

.form-control:focus {
  outline: 2px solid rgba(45, 166, 178, 0.5);
  border-color: #2da6b2;
}