/* =========================
   NLBR Library - LUX (clean)
   ========================= */

.nlbr-library{
  max-width: 920px;
  margin: 60px auto;
  padding: 26px 18px;

  background: radial-gradient(1200px 600px at 10% 0%, rgba(143,92,255,0.10), transparent 55%),
              radial-gradient(900px 500px at 90% 20%, rgba(107,107,255,0.10), transparent 50%),
              linear-gradient(180deg, rgba(255,255,255,0.70), rgba(255,255,255,0.30));
  border-radius: 22px;
}

.nlbr-library__grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  align-items: start;
}

/* Card - glass */
.nlbr-library__card{
  position: relative;
  border-radius: 20px;
  overflow: hidden;

  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(20,20,40,0.08);

  box-shadow: 0 16px 45px rgba(14, 20, 33, 0.10);
  backdrop-filter: blur(10px);

  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.nlbr-library__card:hover{
  transform: translateY(-5px);
  box-shadow: 0 22px 55px rgba(14, 20, 33, 0.16);
  border-color: rgba(107,107,255,0.22);
}

/* Luxury glow ring on hover */
.nlbr-library__card::after{
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;

  background: linear-gradient(135deg, rgba(107,107,255,0.55), rgba(143,92,255,0.45), rgba(255,184,92,0.25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px;
}

.nlbr-library__card:hover::after{
  opacity: 1;
}

/* Badge */
.nlbr-library__card::before{
  content: "Доступно";
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;

  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;

  color: rgba(15,27,36,0.92);
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(0,0,0,0.08);

  padding: 6px 10px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.10);
}

/* Cover */
.nlbr-library__cover{
  display: block;
  aspect-ratio: 4 / 5;
  background: #f3f4f6;
  position: relative;
}

.nlbr-library__cover img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.02);
  transition: transform .25s ease;
}

.nlbr-library__card:hover .nlbr-library__cover img{
  transform: scale(1.06);
}

/* Soft overlay */
.nlbr-library__cover::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.28) 100%);
  pointer-events: none;
}

/* Meta */
.nlbr-library__meta{
  padding: 14px 14px 16px;
  display: grid;
  gap: 10px;
}

.nlbr-library__name{
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.2px;
  color: rgba(15, 27, 36, 0.92);
}

/* Button (your requested style) */
.nlbr-library .nlbr-library__btn.button{
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;

  width: 100%;
  padding: 12px 14px;

  border-radius: 16px;
  text-decoration: none;

  background: #4f4f4f !important;
  color: #f5c400 !important;
  border: 1px solid rgba(0,0,0,0.18) !important;

  box-shadow: 0 14px 28px rgba(0,0,0,0.14) !important;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease, color .14s ease;
}

.nlbr-library .nlbr-library__btn.button:hover{
  background: #5a5a5a !important;
  color: #ffd24a !important;
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(0,0,0,0.18) !important;
}

/* Mobile */
@media (max-width: 520px){
  .nlbr-library{
    margin: 28px auto;
    padding: 18px 12px;
    border-radius: 18px;
  }

  .nlbr-library__grid{
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 14px;
  }

  .nlbr-library__name{
    font-size: 14px;
  }

  .nlbr-library .nlbr-library__btn.button{
    border-radius: 14px;
    padding: 11px 12px;
  }
}

/* Library states: login / empty */
.nlbr-library--state{
  max-width: 920px;
  margin: 40px auto;
  padding: 18px 12px;
}

.nlbr-library__state-card{
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(20,20,40,0.08);
  border-radius: 22px;
  box-shadow: 0 16px 45px rgba(14, 20, 33, 0.10);
  backdrop-filter: blur(10px);

  padding: 20px 18px;
}

.nlbr-library__state-title{
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 10px;
}

.nlbr-library__state-text{
  font-size: 15px;
  line-height: 1.45;
  opacity: 0.9;
  margin: 0 0 14px;
}

.nlbr-library__state-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 10px;
}

.nlbr-library__state-btn.button{
  padding: 12px 16px;
  border-radius: 16px;
  text-decoration: none;
}

.nlbr-library__state-note{
  font-size: 13px;
  line-height: 1.4;
  opacity: 0.75;
}

/* Primary CTA button in empty library */
.nlbr-library__state-btn--primary{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 14px 22px;
  border-radius: 18px;

  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;

  text-decoration: none;

  background: linear-gradient(135deg, #6b6bff, #8f5cff);
  color: #fff;

  box-shadow: 0 14px 30px rgba(107,107,255,0.30);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.nlbr-library__state-btn--primary:hover{
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(107,107,255,0.40);
  opacity: 0.95;
}

.nlbr-library__state-btn--primary{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 14px 22px;
  border-radius: 18px;

  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;

  text-decoration: none;

  background: linear-gradient(135deg, #6b6bff, #8f5cff);
  color: #fff;

  box-shadow: 0 14px 30px rgba(107,107,255,0.30);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.nlbr-library__state-btn--primary:hover{
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(107,107,255,0.40);
  opacity: 0.95;
}