

.page-section {
  margin: 100px 5px 10px 5px;
}
@media (min-width: 768px) {
  .page-section {
  margin: 100px 0 10px 0;
}
}
#library-carousel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  padding: 10px 0;
}
@media (min-width: 768px) {
  #library-carousel {
    grid-template-columns: repeat(7, 1fr);
  }
}

.library-item {
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}
.library-item:hover {
  transform: scale(1.05);
}

.library-thumb-wrapper {
  position: relative;
  width: 100%;
}
.library-thumb-wrapper::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  border-radius: 0 0 6px 6px;
  pointer-events: none;
  z-index: 1;
}
.library-badges {
  z-index: 2;
}
.library-thumb-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}
.library-badges {
  position: absolute;
  bottom: 5px;
  left: 5px;
  right: 8px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.library-rating-badge,
.library-year-badge {
  color: var(--text-color);
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
}
.library-rating-badge i {
  color: var(--theme-color);
}
@media (max-width: 480px) {
  .library-rating-badge,
  .library-year-badge {
    font-size: 10px;
    padding: 2px 5px;
  }
}
.library-info {
  padding: 6px 8px;
  color: var(--text-color);
  text-align: left;
}
.library-title {
  font-size: 18px;
  margin: 4px 0 2px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.library-hover-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 6px;
  z-index: 3;
  pointer-events: auto; 
}


.library-hover-play i {
  font-size: 36px;
  color: white;
}

.library-thumb-wrapper:hover .library-hover-play {
  opacity: 1;
}


@media (max-width: 768px) {
  .library-title {
    font-size: 14px !important;
  }
}
@media (max-width: 480px) {
  .library-title {
    font-size: 13px;
  }
  .library-sub {
    font-size: 12px;
  }
}
.library-sub {
  font-size: 11px;
  color: #aaa;
}
.library-rating i {
  color: #ffc107;
  margin-right: 2px;
}

.library-thumb-wrapper {
  position: relative;
  overflow: hidden;
}

.library-hover-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 99;
}

.library-thumb-wrapper:hover .library-hover-play {
  opacity: 1;
}

.library-hover-play svg {
  width: 40px;
  height: 40px;
  transition: transform 0.3s ease;
}

.library-thumb-wrapper:hover .library-hover-play svg {
  transform: scale(1.1);
}
@media (max-width: 768px) {
  .library-hover-play svg {
    width: 30px;
    height: 30px;
  }
}
/* ==== FILTER ROWS ==== */

.multi-filter-bar{

  margin-bottom:20px;
}
/* General filter row style */
.filter-row {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  gap: 5px;
  padding: 0;
  margin-bottom: 10px;
  scrollbar-width: none;
}
.filter-row::-webkit-scrollbar {
  display: none;
}

/* ---- MAIN CATEGORY TABS (Movies, TV Series, Animes, Variety...) ---- */
.filter-row.main-tabs {
  display: flex;
  gap: 20px; 
  border-bottom: 1px solid #44444463;
  margin-bottom:20px;
}
.filter-row.main-tabs button {
  background: none;
  color: var(--text-color);
  border: none;
  border-bottom: 2px solid transparent;
  padding: 6px 0;
  font-size: 18px;
  cursor: pointer;
  font-weight: 500;
}
.filter-row.main-tabs button.active {
  color: white;
  border-bottom: 2px solid var(--theme-color);
}

/* ---- OTHER FILTER ROWS (Genre, Region, Year...) ---- */
.filter-row:not(.main-tabs) button {
  background: #2e2e2e61;
  color: var(--text-color);
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
.filter-row:not(.main-tabs) button.active {
  background: #2e2e2e61;
  color: var(--theme-color);

}

@media (max-width: 480px) {
  .filter-row:not(.main-tabs) button {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 6px;
  }

  .filter-row.main-tabs button {
    font-size: 15px;
    padding: 4px 0;
  }
}
