/* Media and Library View: Modern Dark Pro */

.mgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 145px));
  gap: 12px;
  margin-top: 14px;
  justify-content: start;
}

.mcard {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: #141f36;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.16s ease;
}

.mcard.pick {
  cursor: pointer;
}

.mcard.pick:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.mcard.sel {
  border-color: #10b981;
  box-shadow: 0 0 0 2px #10b981;
}

.mcard.off {
  opacity: 0.4;
  cursor: not-allowed;
}

.mthumb {
  position: relative;
  height: 120px;
  background: #090e1a;
}

.mthumb img,
.mthumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mbadge {
  position: absolute;
  left: 8px;
  top: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  letter-spacing: 0.02em;
}

.mtick {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #ffffff;
}

.mcard.sel .mtick {
  background: #10b981;
  border-color: #10b981;
}

.minfo {
  padding: 10px 12px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #cbd5e1;
}

.mname {
  font-weight: 700;
  color: #ffffff !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
