/* ===== BASE ===== */
body {
  background: #111;
  color: white;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px;
}

h1 {
  margin: 0 0 20px;
}

/* ===== GALLERY ===== */
#gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.card {
  background: #1b1b1b;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
}

.card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}



/* ===== MODAL ===== */
#playerModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 999;
}

.hidden {
  display: none !important;
}

/* ===== PLAYER CONTAINER ===== */
.player-content {
  background: #181818;
  width: 100%;
  max-width: 1000px;
  max-height: 90vh;
  border-radius: 12px;
  padding: 16px;
  position: relative;
  overflow: auto;
}

/* ===== CLOSE BUTTON ===== */
.player-close {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 28px;
  cursor: pointer;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  padding: 6px 12px;
  border-radius: 8px;
}

/* ===== WRAPPERS ===== */
.video-wrapper,
.image-wrapper,
.iframe-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ===== VIDEO ===== */
.video-wrapper video {
  width: auto;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

/* ===== IMAGE ===== */
.image-wrapper img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

/* ===== IFRAME ===== */
.iframe-wrapper iframe {
  width: 100%;
  height: 80vh;
  border: 0;
}
.thumb-wrap {
  position: relative;
}

.card-body {
  padding: 10px;
}

.card-title {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}

.card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 6px;
}

.card-duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
}
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-btn {
  background: #222;
  color: white;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  transition: 0.2s ease;
}

.filter-btn:hover {
  background: #333;
}

.filter-btn.active {
  background: #fff;
  color: #111;
  border-color: #fff;
}
.source-btn {
  margin: 5px;
  padding: 6px 10px;
  background: #222;
  color: white;
  border: 1px solid #444;
  cursor: pointer;
  border-radius: 6px;
}
.source-switcher {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.source-btn {
  background: #222;
  color: #fff;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}

.source-btn:hover {
  background: #333;
}

.source-btn.active {
  background: #fff;
  color: #111;
  border-color: #fff;
}