/* ===== LIBRARY V2 ===== */

.library-v2-hero{
  margin-top:18px;
}

.library-v2-hero__content{
  padding:32px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01)),
    linear-gradient(135deg, rgba(139,92,246,.08), rgba(59,130,246,.02)),
    var(--panel);
  box-shadow:var(--shadow-md);
}

.library-v2-kicker{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  margin-bottom:12px;
}

.library-v2-title{
  font-size:44px;
  line-height:1.02;
  font-weight:950;
  letter-spacing:-.03em;
  margin-bottom:10px;
}

.library-v2-sub{
  color:var(--muted);
  max-width:780px;
  line-height:1.75;
}

.library-v2-layout{
  margin-top:18px;
  display:grid;
  grid-template-columns:280px minmax(0,1fr);
  gap:20px;
  align-items:start;
}

.library-v2-sidebar{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.library-v2-sidecard{
  padding:18px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01)),
    var(--panel);
  box-shadow:var(--shadow-sm);
}

.library-v2-sidecard__title{
  font-size:16px;
  font-weight:900;
  margin-bottom:14px;
}

.library-v2-filterform{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.library-v2-field{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.library-v2-field label{
  font-size:13px;
  font-weight:800;
  color:#ddd6ef;
}

.library-v2-input,
.library-v2-select{
  height:44px;
  padding:0 14px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  color:var(--text);
  outline:none;
  font-weight:700;
}

.library-v2-actions{
  display:grid;
  gap:10px;
  margin-top:4px;
}

/* ===== POPULAR SIDE ===== */

.library-v2-popular-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.library-v2-popular-item{
  display:grid;
  grid-template-columns:54px minmax(0,1fr);
  gap:12px;
  align-items:center;
  padding:10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.06);
  background:rgba(255,255,255,.02);
  transition:.16s ease;
}

.library-v2-popular-item:hover{
  border-color:rgba(139,92,246,.24);
  background:rgba(255,255,255,.03);
}

.library-v2-popular-cover{
  width:54px;
  height:74px;
  border-radius:8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02)),
    #1a1822;
  background-size:cover;
  background-position:center;
}

.library-v2-popular-title{
  font-size:14px;
  font-weight:900;
  line-height:1.3;
  margin-bottom:4px;
}

.library-v2-popular-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  color:var(--muted);
  font-size:12px;
}

/* ===== MAIN ===== */

.library-v2-main{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.library-v2-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  padding:18px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01)),
    var(--panel);
  box-shadow:var(--shadow-sm);
}

.library-v2-result-title{
  font-size:24px;
  font-weight:950;
  letter-spacing:-.02em;
}

.library-v2-result-sub{
  margin-top:4px;
  color:var(--muted);
  font-size:14px;
}

/* ===== GRID ===== */

.library-v2-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:18px;
}

.library-v2-card{
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01)),
    var(--panel);
  box-shadow:var(--shadow-md);
  transition:
    transform .18s ease,
    border-color .18s ease,
    box-shadow .18s ease;
}

.library-v2-card:hover{
  transform:translateY(-4px);
  border-color:rgba(139,92,246,.28);
  box-shadow:var(--shadow-lg);
}

.library-v2-card__media{
  position:relative;
}

.library-v2-card__cover{
  height:340px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01)),
    #1a1822;
  background-size:cover;
  background-position:center;
}

.library-v2-card__media::after{
  content:"";
  position:absolute;
  inset:auto 0 0 0;
  height:45%;
  background:linear-gradient(180deg, rgba(10,9,16,0), rgba(10,9,16,.84));
}

.library-v2-card__status{
  position:absolute;
  top:12px;
  right:12px;
  z-index:2;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  font-size:11px;
  font-weight:900;
  backdrop-filter:blur(10px);
  box-shadow:0 10px 18px rgba(0,0,0,.22);
}

.library-v2-card__status.ongoing{
  background:rgba(34,197,94,.90);
  color:#07130b;
}

.library-v2-card__status.complete{
  background:rgba(239,68,68,.94);
  color:#fff;
}

.library-v2-card__body{
  padding:14px;
}

.library-v2-card__top{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
  margin-bottom:10px;
}

.library-v2-card__title{
  font-size:18px;
  font-weight:950;
  line-height:1.24;
  letter-spacing:-.02em;
}

.library-v2-card__score{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  color:#f7de8d;
  font-size:12px;
  font-weight:900;
}

.library-v2-card__chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:12px;
}

.library-v2-card__chips span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.07);
  background:rgba(255,255,255,.025);
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}

.library-v2-card__desc{
  color:var(--muted);
  font-size:14px;
  line-height:1.7;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
  min-height:72px;
}

.library-v2-card__bottom{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,.06);
  color:#ddd6ef;
  font-size:13px;
  font-weight:800;
}

/* ===== RESPONSIVE ===== */

@media(max-width:1200px){
  .library-v2-grid{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }
}

@media(max-width:980px){
  .library-v2-layout{
    grid-template-columns:1fr;
  }

  .library-v2-title{
    font-size:36px;
  }

  .library-v2-sidebar{
    order:2;
  }

  .library-v2-main{
    order:1;
  }
}

@media(max-width:680px){
  .library-v2-hero__content,
  .library-v2-sidecard,
  .library-v2-toolbar{
    padding:16px;
  }

  .library-v2-title{
    font-size:30px;
  }

  .library-v2-grid{
    grid-template-columns:1fr;
    gap:14px;
  }

  .library-v2-card__cover{
    height:300px;
  }
}