/* Folder Button */
.folder-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: absolute;
  left: 0;
}

.animation-btn {
  left: 54px;
}

.folder-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}

/* Dialog Styles */
.dialog-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.dialog-content {
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dialog-header h3 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.dialog-body {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.dialog-body p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 20px;
  font-size: 14px;
}

.selection-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.select-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

#folderCheckboxes {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 8px;
}

/* Custom scrollbar styling */
#folderCheckboxes::-webkit-scrollbar {
  width: 6px;
}

#folderCheckboxes::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

#folderCheckboxes::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

#folderCheckboxes::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

#folderCheckboxes label {
  display: flex;
  align-items: center;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

#folderCheckboxes label:hover {
  background: rgba(255, 255, 255, 0.05);
}

#folderCheckboxes input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  accent-color: #4fc3f7;
  cursor: pointer;
}

.dialog-footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: flex-end;
}

.apply-btn {
  background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 100%);
  border: none;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.apply-btn:hover {
  background: linear-gradient(135deg, #29b6f6 0%, #0288d1 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(79, 195, 247, 0.3);
}

#animationOptions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#animationOptions label {
  display: flex;
  align-items: center;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

#animationOptions label:hover {
  background: rgba(255, 255, 255, 0.05);
}

#animationOptions input[type="radio"] {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  accent-color: #4fc3f7;
  cursor: pointer;
}

/* Remove old dropdown styles */

/* Playback Controls */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #000;
  color: #fff;
  height: 100vh;
  overflow: hidden;
}

.slideshow-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 100%);
}

.meme-display {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  position: relative;
  perspective: 1200px;
}

.meme-display img,
.meme-display video {
  width: 100%;
  height: 90vh;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
  object-fit: contain;
  object-position: center;
  transition: all 0.3s ease;
}

#memeVideo {
  display: none;
}

.meme-display img:hover,
.meme-display video:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.9);
}

.media-controls {
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px;
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  gap: 20px;
  position: relative;
}

/* Playback Controls */
.playback-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.playback-controls button {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-family: inherit;
}

.playback-controls button:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}

.playback-controls button:active {
  transform: scale(0.98);
}

#playPauseBtn {
  width: 52px;
  height: 52px;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.15);
}

#playPauseBtn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Interval Control - positioned on the right */
.interval-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 140px;
  position: absolute;
  right: 0;
}

.interval-control label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  min-width: 30px;
  text-align: center;
}

.interval-control input[type="range"] {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.interval-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.interval-control input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.interval-control input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  .control-row {
    flex-direction: column;
    gap: 15px;
    position: static;
  }
  
  .playback-controls {
    order: -1;
  }
  
  .interval-control {
    width: 100%;
    max-width: 200px;
    position: static;
  }
  
  #themeSelector {
    width: 100%;
    max-width: 200px;
    position: static;
  }
}

@media (max-width: 480px) {
  .meme-display {
    padding: 3px;
  }
  
  .meme-display img,
  .meme-display video {
    height: 85vh;
  }
  
  .media-controls {
    padding: 8px;
  }
  
  .playback-controls button {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
  
  #playPauseBtn {
    width: 48px;
    height: 48px;
    font-size: 16px;
  }
}
