/* General App Layout */
.App {
  display: flex;
  height: 100vh;
  background-color: #f0f2f5;
}

.app-sidebar {
  height: 100vh;
  position: fixed !important;
  top: 0;
  left: 0;
  z-index: 1000;
}

.app-main {
  flex-grow: 1;
  padding: 20px;
  margin-left: 250px; /* Same as sidebar width */
  transition: margin-left 0.3s;
}

.App.collapsed .app-main {
  margin-left: 80px; /* Same as collapsed sidebar width */
}

/* Sidebar Styles */
.path-section {
  padding: 10px 20px;
  color: #333;
}

.path-section h2 {
  font-size: 16px;
  margin-top: 0;
  margin-bottom: 15px;
}

.path-form {
  display: flex;
  gap: 5px;
  margin-bottom: 15px;
}

.path-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

.add-path-btn {
  padding: 8px 12px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.path-list h3 {
  font-size: 14px;
  margin-top: 0;
  margin-bottom: 10px;
}

.path-list ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.path-list li {
  padding: 8px 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  word-break: break-all;
}

.remove-path-btn {
  background: none;
  border: none;
  color: #dc3545;
  cursor: pointer;
  font-size: 14px;
  margin-left: auto; /* Pushes the button to the right */
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-path-btn:hover {
  color: #c82333;
}

.scan-btn-sidebar {
  width: 100%;
  padding: 10px 20px;
  margin-top: 10px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

.scan-btn-sidebar:hover {
  background-color: #218838;
}

.scan-btn-sidebar:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* Video Library - YouTube Style */
.videos-section h2 {
  font-size: 20px;
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.video-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: box-shadow 0.3s;
  cursor: pointer;
}

.video-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.video-thumbnail {
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  position: relative;
  background-color: #000;
}

.thumbnail-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: white;
  background: linear-gradient(45deg, #222, #444);
}

.video-info {
  padding: 12px;
  display: flex;
  gap: 12px;
}

.video-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #ddd;
  flex-shrink: 0;
}

.video-details {
  flex-grow: 1;
  position: relative; /* For positioning edit/delete buttons */
}

.video-title {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 500;
  color: #0f0f0f;
  line-height: 1.4;
  max-height: 2.8em; /* Limit to 2 lines */
  overflow: hidden;
  text-overflow: ellipsis;
}



.video-path, .video-size {
  margin: 4px 0;
  font-size: 12px;
  color: #606060;
  word-break: break-all;
}





/* Video Player Modal */
.video-player-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.video-player-modal-content {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  position: relative;
  width: 90%;
  max-width: 900px;
  max-height: 90%;
  overflow-y: auto;
}

.close-player-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

.video-player-modal-content h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 22px;
  color: #333;
}

.player-wrapper {
  position: relative;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  margin-bottom: 15px;
}

.react-player {
  position: absolute;
  top: 0;
  left: 0;
}

/* Search Bar */
.search-bar {
  margin-bottom: 20px;
}

.search-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}