.library-main[hidden] { display: none !important; }
.library-main { min-height: calc(100dvh - 76px); }
.library-container { width: min(100%, 1240px); margin-inline: auto; padding: 40px clamp(20px, 5vw, 64px) 60px; }
.library-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.library-heading h1 { margin: 0; color: #f3f3f7; font-size: 28px; }
.library-heading p { margin: 8px 0 0; color: #92929e; font-size: 12px; line-height: 1.9; }
.library-heading > span { flex-shrink: 0; color: #a6a6b2; font-size: 12px; }
.library-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 25px; }
.library-toolbar > span { color: #7e7e8c; font-size: 11px; }
.library-filters { display: inline-flex; position: relative; isolation: isolate; gap: 3px; padding: 4px; border-radius: 999px; background: #19191c; }
.library-filters button { min-height: 35px; padding: 0 19px; border: 0; border-radius: 999px; background: transparent; color: #aaaab6; font: 500 12px Vazirmatn, Tahoma, sans-serif; cursor: pointer; }
.library-filters button.active { color: #19191c; }
.library-filter-indicator { position: absolute; z-index: -1; top: 4px; bottom: 4px; left: 0; width: var(--active-width, 50px); transform: translateX(var(--active-left, 0px)); border-radius: 999px; background: #eeeef2; transition: transform .26s ease, width .26s ease; }
.library-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 18px; }
.library-card { position: relative; min-width: 0; }
.library-card-open { display: block; width: 100%; padding: 0; border: 0; background: transparent; color: #f1f1f7; text-align: right; cursor: pointer; }
.library-poster { display: block; position: relative; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 17px; background: #1c1c20; }
.library-poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.library-poster-shade { position: absolute; inset: 0; background: linear-gradient(180deg, #0005 0, transparent 25%, transparent 55%, #000b 100%); }
.library-play { position: absolute; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 7px; font-size: 12px; }
.library-play svg { width: 16px; height: 16px; }
.library-card-copy { display: flex; flex-direction: column; gap: 6px; padding: 14px 3px 4px; }
.library-card-copy small { color: #a4a4af; font-size: 11px; }
.library-card-copy strong { font-size: 16px; font-weight: 700; }
.library-card-copy > span { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 1; -webkit-box-orient: vertical; color: #858592; font-size: 11px; line-height: 1.8; }
.library-remove { position: absolute; top: 9px; left: 9px; display: grid; width: 40px; height: 40px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: #1212149c; backdrop-filter: blur(12px); color: #fff; cursor: pointer; }
.library-remove svg { width: 19px; height: 19px; fill: currentColor; }
.library-empty { display: flex; min-height: min(510px, 58dvh); flex-direction: column; align-items: center; justify-content: center; padding: 35px 20px; text-align: center; }
.library-empty-icon { display: grid; width: 80px; height: 80px; place-items: center; margin-bottom: 23px; border-radius: 26px; background: #1d1d22; color: #b1b1bf; }
.library-empty-icon svg { width: 31px; height: 31px; }
.library-empty h2 { margin: 0 0 13px; color: #eeeef5; font-size: 22px; font-weight: 600; }
.library-empty p { margin: 0; color: #9292a1; font-size: 13px; line-height: 2.1; }
.library-empty button { display: inline-flex; align-items: center; justify-content: center; gap: 15px; min-height: 46px; margin-top: 28px; padding: 0 24px; border: 0; border-radius: 999px; background: #eeeef3; color: #19191f; font: 600 12px Vazirmatn, Tahoma, sans-serif; cursor: pointer; }
.library-empty button svg { width: 17px; height: 17px; }
.library-main button:focus-visible { outline: 2px solid #d3d3df; outline-offset: 4px; }
@media (max-width: 1000px) { .library-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) {
  .library-container { padding: 26px 16px 40px; }
  .library-heading { margin-bottom: 24px; }
  .library-heading h1 { font-size: 25px; }
  .library-heading p { font-size: 11px; }
  .library-heading > span { font-size: 10px; }
  .library-toolbar { gap: 10px; }
  .library-toolbar > span { font-size: 9px; }
  .library-filters button { padding-inline: 14px; font-size: 11px; }
  .library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
  .library-poster { border-radius: 14px; }
  .library-card-copy strong { font-size: 14px; }
  .library-card-copy small, .library-card-copy > span { font-size: 10px; }
  .library-empty { min-height: 57dvh; padding-inline: 0; }
  .library-empty h2 { font-size: 21px; }
  .library-empty p { font-size: 12px; }
}
