body {
  font-family: Arial, sans-serif;
  background: #f4f4f4;
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 20px auto;
  background: #fff;
  padding: 20px;
  border-radius: 10px;
}

.hidden {
  display: none;
}

/* Input styles */
input, select, button {
  padding: 0.6rem;
  border-radius: 5px;
  border: 1px solid #ccc;
  margin: 5px 0;
  font-size: 14px;
  width: 100%;
  max-width: 300px;
  box-sizing: border-box;
}

/* Buttons */
button {
  background: #4f46e5;
  color: white;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover {
  background: #3730a3;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
}

.tab {
  padding: 1rem;
  background: #e4e4e4;
  border-radius: 5px 5px 0 0;
  cursor: pointer;
  color: #555;
  flex: 1;
  text-align: center;
  font-weight: bold;
}

.tab.active {
  background: #4f46e5;
  color: white;
}

/* Tab content */
.tab-content {
  padding: 1rem;
  border: 1px solid #ccc;
  border-top: none;
}

/* Video grid */
/* .video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
} */
/* .video-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start; 
  align-items: flex-start;
  max-height: calc(100vh - 300px); 
  overflow-y: auto; 
  padding: 10px;
} */
/* .video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
  max-height: calc(100vh - 300px);
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

.video-entry {
 
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  padding: 0.5rem;
  text-align: center;
  transition: transform 0.2s ease;
} */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

.video-entry {
  width: 240px;
  height: 160px;
  overflow: hidden;
  text-align: center;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0.3rem;
  box-sizing: border-box;
  position: relative;
  transition: transform 0.2s ease;
}


.video-entry:hover {
  transform: scale(1.02);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.video-entry iframe {
  width: 100%;
  height: 160px;
  border: none;
  pointer-events: none;
  border-radius: 6px;
}

/* Table styling */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 14px;
}

thead {
  background: #f0f0f0;
}

th, td {
  padding: 10px;
  border-bottom: 1px solid #ddd;
  text-align: left;
  word-break: break-word;
}

th {
  font-weight: bold;
}

/* Action buttons */
.video-action-btn {
  margin-right: 5px;
  padding: 5px 8px;
  border: none;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.edit-btn {
  background-color: #f59e0b;
}

.edit-btn:hover {
  background-color: #d97706;
}

.delete-btn {
  background-color: #ef4444;
}

.delete-btn:hover {
  background-color: #dc2626;
}

.move-btn {
  background-color: #10b981;
}

.move-btn:hover {
  background-color: #059669;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

#page-info {
  font-weight: bold;
}

/* Messages */
.error {
  color: red;
  font-size: 14px;
}

.info {
  color: green;
  font-size: 14px;
}

/* Search bar */
#view-search,
#search-table,
#group-search {
  max-width: 300px;
  margin-bottom: 10px;
}

/* Responsive table (mobile) */
@media (max-width: 600px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }

  tr {
    margin-bottom: 1rem;
    border-bottom: 2px solid #ccc;
  }

  td {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
  }

  th {
    display: none;
  }
  

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

/* Modal content box */
.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.modal-content h3 {
  margin-top: 0;
  font-size: 1.25rem;
}

.modal-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

#edit-modal.hidden {
  display: none;
}
#edit-group-modal.hidden {
  display: none;
}
iframe {
  pointer-events: auto !important;
  z-index: 9999 !important;
  display: block;
  width: 100%;
  height: 300px;
}